api_client module
ApiClient
class edgeimpulse_api.api_client.ApiClient(
configuration=None,
header_name=None,
header_value=None,
cookie=None,
pool_threads=1
)
Parameters
configuration=None
header_name=None
header_value=None
cookie=None
pool_threads=1
Class variables
NATIVE_TYPES_MAPPING
The type of the None singleton.PRIMITIVE_TYPES
The type of the None singleton.
Instance variables
pool
Create thread pool on first request avoids instantiating unused threadpool for blocking clients.user_agent
User agent for this API client
Static methods
get_default
edgeimpulse_api.api_client.get_default(
)
Return new instance of ApiClient.
This method returns newly created, based on default constructor, object of ApiClient class or returns a copy of default ApiClient.
set_default
edgeimpulse_api.api_client.set_default(
default
)
Set default instance of ApiClient.
It stores default ApiClient.
Parameters
default
Methods
call_api
edgeimpulse_api.api_client.call_api(
self,
resource_path,
method,
path_params=None,
query_params=None,
header_params=None,
body=None,
post_params=None,
files=None,
response_types_map=None,
auth_settings=None,
async_req=None,
collection_formats=None
)
Makes the HTTP request (synchronous) and returns deserialized data.
To make an async_req request, set the async_req parameter.
Parameters
self
resource_path
method
path_params=None
query_params=None
header_params=None
body=None
post_params=None
files=None
response_types_map=None
auth_settings=None
async_req=None
collection_formats=None
close
edgeimpulse_api.api_client.close(
self
)
Parameters
self
deserialize
edgeimpulse_api.api_client.deserialize(
self,
response,
response_type
)
Deserializes response into an object.
Parameters
self
response
response_type
files_parameters
edgeimpulse_api.api_client.files_parameters(
self,
files=None
)
Builds form parameters.
Parameters
self
files=None
parameters_to_tuples
edgeimpulse_api.api_client.parameters_to_tuples(
self,
params,
collection_formats
)
Get parameters as list of tuples, formatting collections.
Parameters
self
params
collection_formats
parameters_to_url_query
edgeimpulse_api.api_client.parameters_to_url_query(
self,
params,
collection_formats
)
Get parameters as list of tuples, formatting collections.
Parameters
self
params
collection_formats
request
edgeimpulse_api.api_client.request(
self,
method,
url,
query_params=None,
headers=None,
post_params=None,
body=None
)
Makes the HTTP request using RESTClient.
Parameters
self
method
url
query_params=None
headers=None
post_params=None
body=None
sanitize_for_serialization
edgeimpulse_api.api_client.sanitize_for_serialization(
self,
obj
)
Builds a JSON POST object.
If obj is None, return None. If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict.
Parameters
self
obj
select_header_accept
edgeimpulse_api.api_client.select_header_accept(
self,
accepts
)
Returns Accept
based on an array of accepts provided.
Parameters
self
accepts
select_header_content_type
edgeimpulse_api.api_client.select_header_content_type(
self,
content_types
)
Returns Content-Type
based on an array of content_types provided.
Parameters
self
content_types
set_default_header
edgeimpulse_api.api_client.set_default_header(
self,
header_name,
header_value
)
Parameters
self
header_name
header_value
update_params_for_auth
edgeimpulse_api.api_client.update_params_for_auth(
self,
headers,
queries,
auth_settings,
resource_path,
method,
body,
request_auth=None
)
Updates header and query params based on authentication setting.
Parameters
self
headers
queries
auth_settings
resource_path
method
body
request_auth=None
Last updated
Was this helpful?