gamebench_api_client.api.requests_retriever.request_adapter package¶
Submodules¶
gamebench_api_client.api.requests_retriever.request_adapter.adapter module¶
-
class
gamebench_api_client.api.requests_retriever.request_adapter.adapter.
Adapter
[source]¶ Bases:
abc.ABC
Abstract adapter for external HTTP request services.
-
class
gamebench_api_client.api.requests_retriever.request_adapter.adapter.
RequestsAdapter
(**request_attributes)[source]¶ Bases:
gamebench_api_client.api.requests_retriever.request_adapter.adapter.Adapter
Concrete adapter to use the Requests library to send an api call.
-
__init__
(**request_attributes)[source]¶ Receives request attributes to use for the request and creates _service object.
The request library is imported within the init to help define exactly where it is used.
Parameters: request_attributes – Dictionary containing the following keys and values: method - Request method to use (POST, GET, etc.). url - Rest endpoint to send a request to. attributes - Dictionary containing other keyword arguments to add to the request.
-
request
()[source]¶ Concrete implementation to send a request call through Requests.
Returns: A requests.Response object - http://docs.python-requests.org/en/master/api/#requests.Response
-