emnify.api_manager¶
Attributes¶
Classes¶
Base manager for api calls handling |
|
Base manager for api calls handling |
Module Contents¶
- emnify.api_manager.MAIN_URL¶
- emnify.api_manager.MAX_PAGES_IN_PAGINATOR = 1000¶
- class emnify.api_manager.BaseApiManager¶
Base manager for api calls handling
- response_handlers¶
- request_url_prefix = ''¶
- request_method_name = ''¶
- static _build_headers(token='')¶
- process_exception(response: requests.Response, client, data: dict = None, *args, **kwargs)¶
- return_paginator(response: requests.Response, client, data: dict = None, files=None, path_params: dict = None, query_params: dict = None) Generator ¶
- build_method_url(url_params)¶
- unauthorised(response: requests.Response, client, data: dict = None, path_params=None, *args, **kwargs)¶
method for 1 cycle retry - re authentication
- call_api(client, data: dict = None, files=None, path_params: dict = None, query_params: dict = None)¶
- make_get_request(main_url: str, method_name: str, headers: dict, params: str = None)¶
- make_post_request(main_url: str, method_name: str, headers: dict, params: dict = None, data: dict = None)¶
- make_patch_request(main_url: str, method_name: str, headers: dict, params: dict = None, data: dict = None)¶
- make_delete_request(main_url: str, method_name: str, headers: dict, params: dict = None, data: dict = None)¶
- make_put_request(main_url: str, method_name: str, headers: dict, params: dict = None, data: dict = None)¶
- make_request(client, method_url: str, data=None, files=None, query_params=None)¶
- static return_success(*_, **__) True ¶
- static return_unwrapped(response: requests.Response, *args, **kwargs) requests.Response.json ¶
- static resource_path(main_url: str, method_name: str)¶
- class emnify.api_manager.Authenticate(*args, **kwargs)¶
Bases:
BaseApiManager
Base manager for api calls handling
- request_url_prefix¶
- request_method_name¶
- response_handlers¶
- unauthorised(response: requests.Response, client, data: dict = None, files=None, path_params: list = None, **kwargs)¶
method for 1 cycle retry - re authentication
- unexpected_error(response: requests.Response, client, data: dict = None, files=None, path_params: list = None)¶