Exemplo n.º 1
0
 def api(self):
     # Setup device api with token
     api_conf = devices_api.Configuration.get_default_copy()
     api_conf.access_token = self.jwt
     return devices_api.DeviceAPIClient(devices_api.ApiClient(api_conf))
Exemplo n.º 2
0
def devices_api_with_params(device_id, plan=None, tenant_id=None):
    api_conf = devices_api.Configuration.get_default_copy()
    api_conf.access_token = make_device_token(device_id, plan, tenant_id)
    return devices_api.DevicesAPIClient(devices_api.ApiClient(api_conf))