base
Base Response
This module contains the base response class for the API.
Classes:
BaseResponse: ATypedDictthat represents the structure of the base responseError: ATypedDictthat represents the structure of the errorErrorInformation: ATypedDictthat represents the structure of the error information
BaseResponse
Bases: TypedDict, Generic[T]
Base Response.
Attributes:
| Name | Type | Description |
|---|---|---|
data |
T
|
Data. |
error |
dict[str, str] | None
|
Error. |
status_code |
int
|
Status code. |
success |
bool
|
Success. |
Examples:
>>> BaseResponse(data=..., error=..., status_code=..., success=...)
{
'data': ...,
'error': ...,
'status_code': ...,
'success': ...
}
Source code in src/bit24/types/responses/base.py
Error
Bases: TypedDict
Error.
Attributes:
| Name | Type | Description |
|---|---|---|
message |
str
|
Message. |
errors |
list[ErrorInformation]
|
Errors. |
Examples:
Source code in src/bit24/types/responses/base.py
ErrorInformation
Bases: TypedDict
Error Information.
Attributes:
| Name | Type | Description |
|---|---|---|
reason |
str
|
Reason. |
message |
str
|
Message. |
Examples: