Client

class tokki.abc.Client(useragent, loop=None)

Base client for all of the APIs.

Parameters

useragent (str) – The User-Agent header that the REST calls should use.

async _get_request(url)

Makes a standard GET request.

Parameters

url (str) – The URL to use for the request.

Returns

The JSON response.

Return type

dict

async _post_request(url, data)

Makes a standard POST request.

Parameters
  • url (str) – The URL to use for the request.

  • data (dict) – The data to send as part of the request.

Returns

The JSON response.

Return type

dict