Lines Matching full:endpoint

94     def delete(self, endpoint: str, path: str):
96 return self.delete_raw(f'/clients/{endpoint}/{path}')
98 def execute(self, endpoint: str, path: str):
100 return self.post(f'/clients/{endpoint}/{path}')
102 def write(self, endpoint: str, path: str, value: bool | int | str):
109 return self.put(f'/clients/{endpoint}/{path}', self._define_resource(rid, value, kind))
111 def write_attributes(self, endpoint: str, path: str, attributes: dict):
114 leshan.write_attributes(endpoint, '1/2/3, {'pmin': 10, 'pmax': 40})
116 return self.put_raw(f'/clients/{endpoint}/{path}/attributes', params=attributes)
118 def remove_attributes(self, endpoint: str, path: str, attributes: list):
121 leshan.remove_attributes(endpoint, '1/2/3, ['pmin', 'pmax'])
124 return self.put_raw(f'/clients/{endpoint}/{path}/attributes?'+ attrs)
126 def update_obj_instance(self, endpoint: str, path: str, resources: dict):
129 return self.put(f'/clients/{endpoint}/{path}', data, uri_options='&replace=false')
131 def replace_obj_instance(self, endpoint: str, path: str, resources: dict):
134 return self.put(f'/clients/{endpoint}/{path}', data, uri_options='&replace=true')
136 def create_obj_instance(self, endpoint: str, path: str, resources: dict):
140 return self.post(f'/clients/{endpoint}/{path}', data)
253 def read(self, endpoint: str, path: str):
255 resp = self.get(f'/clients/{endpoint}/{path}')
320 def composite_read(self, endpoint: str, paths: list[str]):
323 …resp = self._s.get(f'{self.api_url}/clients/{endpoint}/composite', params=parameters, timeout=self…
327 def composite_write(self, endpoint: str, resources: dict):
362 …resp = self._s.put(f'{self.api_url}/clients/{endpoint}/composite', params=parameters, json=data, t…
365 def discover(self, endpoint: str, path: str):
366 …resp = self.handle_response(self._s.get(f'{self.api_url}/clients/{endpoint}/{path}/discover', time…
372 def create_psk_device(self, endpoint: str, passwd: str):
374 …self.put('/security/clients/', f'{{"endpoint":"{endpoint}","tls":{{"mode":"psk","details":{{"ident…
376 def delete_device(self, endpoint: str):
377 self.delete_raw(f'/security/clients/{endpoint}')
379 def create_bs_device(self, endpoint: str, server_uri: str, bs_passwd: str, passwd: str):
381 … f'{{"tls":{{"mode":"psk","details":{{"identity":"{endpoint}","key":"{psk}"}}}},"endpoint":"{endpo…
383 ep = str([ord(n) for n in endpoint])
386 self.post(f'/bootstrap/{endpoint}', content)
388 def delete_bs_device(self, endpoint: str):
389 self.delete_raw(f'/security/clients/{endpoint}')
390 self.delete_raw(f'/bootstrap/{endpoint}')
392 def observe(self, endpoint: str, path: str):
393 return self.post(f'/clients/{endpoint}/{path}/observe', data="")
395 def cancel_observe(self, endpoint: str, path: str):
396 return self.delete_raw(f'/clients/{endpoint}/{path}/observe?active')
398 def passive_cancel_observe(self, endpoint: str, path: str):
399 return self.delete_raw(f'/clients/{endpoint}/{path}/observe')
401 def composite_observe(self, endpoint: str, paths: list[str]):
403 …resp = self._s.post(f'{self.api_url}/clients/{endpoint}/composite/observe', params=parameters, tim…
407 def cancel_composite_observe(self, endpoint: str, paths: list[str]):
409 …return self.delete_raw(f'/clients/{endpoint}/composite/observe?paths=' + ','.join(paths) + '&activ…
411 def passive_cancel_composite_observe(self, endpoint: str, paths: list[str]):
413 return self.delete_raw(f'/clients/{endpoint}/composite/observe?paths=' + ','.join(paths))
416 def get_event_stream(self, endpoint: str, timeout: int = None):
418 Get stream of events regarding the given endpoint.
430 …r = requests.get(f'{self.api_url}/event?{endpoint}', stream=True, headers={'Accept': 'text/event-s…