DuploAPI
The HTTP client for interacting with the Duplo API. Handles authentication, request caching, and response validation.
Duplo API Client
HTTP client for the Duplo API. Handles authentication, request caching, and response validation.
Properties
token: str
property
HTTP Methods
The following methods are used to make requests to the Duplo API. They are simply the standard HTTP methods scoped to the configured host and token.
get
Get a Duplo resource.
This request is cached for 60 seconds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path to the resource. |
required |
Returns: The resource as a JSON object.
post
Post data to a Duplo resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path to the resource. |
required |
data
|
dict
|
The data to post. |
{}
|
Returns: The response as a JSON object.
put
Put data to a Duplo resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path to the resource. |
required |
data
|
dict
|
The data to post. |
{}
|
Returns: The response as a JSON object.
delete
Delete a Duplo resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path to the resource. |
required |
Returns: The response as a JSON object.