API Reference¶
This page provides a breakdown of the Ablaze API.
Gateway Client¶
- class ablaze.GatewayClient(http, intents, shard_ids=None, shard_count=None)¶
- Parameters
http (ablaze.RESTClient) –
intents (int) –
shard_ids (list) –
shard_count (int) –
- Return type
None
REST Client¶
- class ablaze.RESTClient(token)¶
- Parameters
token (str) –
- Return type
None
- staticmethod get_params(**params)¶
Get a dictionary of query string or JSON parameters that are not UNSET.
- Returns
The dictionary of query string or JSON parameters.
- Return type
dict
- await request(method, route, files=None, json=<ablaze.internal.utils._UNSET object>, reason=None, qparams=None, format='json')¶
Make a request to the Discord API, following ratelimits.
- Parameters
method (HTTPMethod) – The HTTP method to use.
route (Route) – The route to request on.
files (List[File], optional) – Files to upload, defaults to None
json (JSON, optional) – JSON body for the request, defaults to None
reason (str, optional) – The audit log reason for applicable actions, defaults to None
qparams (dict, optional) – The query parameters for the request, defaults to None
format (ResponseFormat, optional) – The format to return the response in, defaults to ‘json’
- Returns
The response, formatted according to the format argument
- Return type
Any