Skip to content

Latest commit

 

History

History
33 lines (32 loc) · 1.14 KB

async.md

File metadata and controls

33 lines (32 loc) · 1.14 KB

Async API Client Usage

Initialize Async API Client

>>> from biggo_api.async_clients import APIClient
>>> api_client = APIClient()

Authorize Async API Client

Client Credentials

Grant client using client credentials.

>>> from biggo_api.clients import ClientCredentials
>>> credentials = ClientCredentials(
...     client_id='CLIENT_ID', client_secret='CLIENT_SECRET',
... )
>>> api_client.authorize(client_credentials=credentials)

Async Instance Client Method Usage

All the asynchronous instance clients' methods are the same as synchornous instance clients'. The only difference is that async method returns coroutine, remember to await it. For example:

>>> video_upload_resp = await api_client.video.upload(file='FILENAME')
>>> video_upload_resp.video_id
'example_video_id'

⬅️ Back to docs ⬆️ Back to top