AsyncResource
An AsyncClient which returns json content and has syntactic support for requests.
Usage
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. |
request()
Send request with path and return processed content.
Usage
request(method, path, **kwargs)update()
PATCH request with json params.
Usage
update(path="", callback=None, **json)Parameters
callback: Callable | None = None-
optionally update with GET and validated PUT.
callbackis called on the json result with keyword params, i.e.,dictcorrectly implements the simple update case.
updating()
Context manager to GET and conditionally PUT json data.
Usage
updating(path="", **kwargs)