fluxpoint.http
¶
Module Contents¶
Classes¶
The base class for making http requests |
- class fluxpoint.http.BaseHTTP(api_token)[source]¶
The base class for making http requests
- Parameters:
api_token (str) – The fluxpoint api token https://fluxpoint.dev/api/access
- __slots__ = ['api_token']¶
- await request(self, method, endpoint, json=None, headers=None, _base_url='https://api.fluxpoint.dev/', retry=True, return_json=True, return_bytes=False, retry_times=1)[source]¶
Makes an API request
- Raises:
RateLimited – When the 429 response is returned
WrongReturnType – When the
UnicodeDecodeError
is raisedParameterError – When the 400 response is returned
Unauthorised – When the 401 response is returned
ApiError – When the 500 response is returned
HttpException – For the other and generall http exceptions
- Returns:
Bytes data for the image
- Return type:
Union[aiohttp.ClientResponse, dict, io.IOBase]
- Parameters: