response
DeleteResponse
dataclass
Delete response object returned from the Nylas API.
Attributes:
Name | Type | Description |
---|---|---|
request_id |
str
|
The request ID returned from the API. |
Source code in nylas/models/response.py
102 103 104 105 106 107 108 109 110 111 112 |
|
ListResponse
Bases: tuple
, Generic[T]
List response object returned from the Nylas API.
Attributes:
Name | Type | Description |
---|---|---|
data |
List[T]
|
The list of requested data objects. |
request_id |
str
|
The request ID. |
next_cursor |
Optional[str]
|
The cursor to use to get the next page of data. |
Source code in nylas/models/response.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
__new__(data, request_id, next_cursor=None)
Initialize the response object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List[T]
|
The list of requested data objects. |
required |
request_id |
str
|
The request ID. |
required |
next_cursor |
Optional[str]
|
The cursor to use to get the next page of data. |
None
|
Source code in nylas/models/response.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
from_dict(resp, generic_type)
classmethod
Convert a dictionary to a response object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resp |
dict
|
The dictionary to convert. |
required |
generic_type |
The type to deserialize the data objects into. |
required |
Source code in nylas/models/response.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
RequestIdOnlyResponse
dataclass
Response object returned from the Nylas API that only contains a request ID.
Attributes:
Name | Type | Description |
---|---|---|
request_id |
str
|
The request ID returned from the API. |
Source code in nylas/models/response.py
115 116 117 118 119 120 121 122 123 124 125 |
|
Response
Bases: tuple
, Generic[T]
Response object returned from the Nylas API.
Attributes:
Name | Type | Description |
---|---|---|
data |
T
|
The requested data object. |
request_id |
str
|
The request ID. |
Source code in nylas/models/response.py
9 10 11 12 13 14 15 16 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 |
|
__new__(data, request_id)
Initialize the response object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
T
|
The requested data object. |
required |
request_id |
str
|
The request ID. |
required |
Source code in nylas/models/response.py
21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
from_dict(resp, generic_type)
classmethod
Convert a dictionary to a response object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resp |
dict
|
The dictionary to convert. |
required |
generic_type |
The type to deserialize the data object into. |
required |
Source code in nylas/models/response.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|