_request
_request ¶
The one request helper shared by the publish routes (private to the package).
publish_request
async
¶
publish_request(
auth: DomoAuth,
path: str,
*,
method: str = "GET",
body: Any = None,
params: dict | None = None,
timeout: int | None = None,
return_raw: bool = False,
context: RouteContext | None = None,
error: type[RouteError] = GET_Publish_Error,
) -> ResponseGetData
Send one request to /api/publish/v2/{path} and raise on a failed response.
body, params and timeout reach get_data only when given, so
each route sends the same request it sent before the helper existed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authenticated Domo session. |
required |
path
|
str
|
Path below |
required |
method
|
str
|
HTTP verb. |
'GET'
|
body
|
Any
|
JSON body for writes. |
None
|
params
|
dict | None
|
Query parameters. |
None
|
timeout
|
int | None
|
Request timeout in seconds. |
None
|
return_raw
|
bool
|
Return the response even when it is not a success. |
False
|
context
|
RouteContext | None
|
Route context passed through to |
None
|
error
|
type[RouteError]
|
Error class raised on a failed response; called with the response. |
GET_Publish_Error
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
The response from Domo. |
Raises:
| Type | Description |
|---|---|
RouteError
|
|
Source code in src/crew_dcs/routes/publish/_request.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |