## AsyncResource


An [AsyncClient](AsyncClient.md#clients.AsyncClient) which returns json content and has syntactic support for requests.


Usage

``` python
AsyncResource(
    url,
    *,
    trailing="",
    **attrs,
)
```


## Methods

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

------------------------------------------------------------------------


#### authorize()


Acquire oauth access token and set `Authorization` header.


Usage

``` python
authorize(path="", **kwargs)
```


------------------------------------------------------------------------


#### request()


Send request with path and return processed content.


Usage

``` python
request(method, path, **kwargs)
```


------------------------------------------------------------------------


#### update()


PATCH request with json params.


Usage

``` python
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

``` python
updating(path="", **kwargs)
```
