AsyncResource

An AsyncClient which returns json content and has syntactic support for requests.

Usage

Source

AsyncResource()

Methods

Name Description
authorize() Acquire oauth access token and set Authorization header.
request() Send request with path and return processed content.
update() PATCH request with json params.
updating() Context manager to GET and conditionally PUT json data.

authorize()

Acquire oauth access token and set Authorization header.

Usage

Source

authorize(path="", **kwargs)

request()

Send request with path and return processed content.

Usage

Source

request(method, path, **kwargs)

update()

PATCH request with json params.

Usage

Source

update(path="", callback=None, **json)
Parameters
callback: Callable | None = None
optionally update with GET and validated PUT. callback is called on the json result with keyword params, i.e., dict correctly implements the simple update case.

updating()

Context manager to GET and conditionally PUT json data.

Usage

Source

updating(path="", **kwargs)