statspost.http
¶
Module Contents¶
Classes¶
The base class for making http requests |
- class statspost.http.BaseHTTP[source]¶
The base class for making http requests
- silently_fail :bool = True¶
- __slots__ = []¶
- await request(method, _base_url, api_token, json=MISSING, headers=MISSING, bot=False, bots=False, retry=True, 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: