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. |
headers |
Optional[CaseInsensitiveDict]
|
The headers returned from the API. |
Source code in nylas/models/response.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
|
from_dict(resp, headers=None)
classmethod
Convert a dictionary to a response object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resp |
dict
|
The dictionary to convert. |
required |
headers |
Optional[CaseInsensitiveDict]
|
The headers returned from the API. |
None
|
Source code in nylas/models/response.py
138 139 140 141 142 143 144 145 146 147 |
|
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. |
headers |
Optional[CaseInsensitiveDict]
|
The headers returned from the API. |
Source code in nylas/models/response.py
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 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
__new__(data, request_id, next_cursor=None, headers=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
|
headers |
Optional[CaseInsensitiveDict]
|
The headers returned from the API. |
None
|
Source code in nylas/models/response.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|
from_dict(resp, generic_type, headers=None)
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 | |
headers |
Optional[CaseInsensitiveDict]
|
The headers returned from the API. |
None
|
Source code in nylas/models/response.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
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. |
headers |
Optional[CaseInsensitiveDict]
|
The headers returned from the API. |
Source code in nylas/models/response.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
from_dict(resp, headers=None)
classmethod
Convert a dictionary to a response object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resp |
dict
|
The dictionary to convert. |
required |
headers |
Optional[CaseInsensitiveDict]
|
The headers returned from the API. |
None
|
Source code in nylas/models/response.py
163 164 165 166 167 168 169 170 171 172 |
|
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
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 49 50 51 52 53 54 55 56 57 |
|
__new__(data, request_id, headers=None)
Initialize the response object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
T
|
The requested data object. |
required |
request_id |
str
|
The request ID. |
required |
headers |
Optional[CaseInsensitiveDict]
|
The headers returned from the API. |
None
|
Source code in nylas/models/response.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
from_dict(resp, generic_type, headers=None)
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 | |
headers |
Optional[CaseInsensitiveDict]
|
The headers returned from the API. |
None
|
Source code in nylas/models/response.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|