Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="gmail_v1.html">Gmail API</a> . <a href="gmail_v1.users.html">users</a> . <a href="gmail_v1.users.threads.html">threads</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 78 | <code><a href="#delete">delete(userId, id, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline">Immediately and permanently deletes the specified thread. This operation</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 80 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 81 | <code><a href="#get">get(userId, id, format=None, metadataHeaders=None, x__xgafv=None)</a></code></p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 82 | <p class="firstline">Gets the specified thread.</p> |
| 83 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 84 | <code><a href="#list">list(userId, q=None, includeSpamTrash=None, pageToken=None, maxResults=None, labelIds=None, x__xgafv=None)</a></code></p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 85 | <p class="firstline">Lists the threads in the user's mailbox.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 88 | <p class="firstline">Retrieves the next page of results.</p> |
| 89 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 90 | <code><a href="#modify">modify(userId, id, body=None, x__xgafv=None)</a></code></p> |
| 91 | <p class="firstline">Modifies the labels applied to the thread. This applies to all messages</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 92 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 93 | <code><a href="#trash">trash(userId, id, x__xgafv=None)</a></code></p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 94 | <p class="firstline">Moves the specified thread to the trash.</p> |
| 95 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 96 | <code><a href="#untrash">untrash(userId, id, x__xgafv=None)</a></code></p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 97 | <p class="firstline">Removes the specified thread from the trash.</p> |
| 98 | <h3>Method Details</h3> |
| 99 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 100 | <code class="details" id="delete">delete(userId, id, x__xgafv=None)</code> |
| 101 | <pre>Immediately and permanently deletes the specified thread. This operation |
| 102 | cannot be undone. Prefer `threads.trash` instead. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 103 | |
| 104 | Args: |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 105 | userId: string, The user's email address. The special value `me` |
| 106 | can be used to indicate the authenticated user. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 107 | id: string, ID of the Thread to delete. (required) |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 108 | x__xgafv: string, V1 error format. |
| 109 | Allowed values |
| 110 | 1 - v1 error format |
| 111 | 2 - v2 error format |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 112 | </pre> |
| 113 | </div> |
| 114 | |
| 115 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 116 | <code class="details" id="get">get(userId, id, format=None, metadataHeaders=None, x__xgafv=None)</code> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 117 | <pre>Gets the specified thread. |
| 118 | |
| 119 | Args: |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 120 | userId: string, The user's email address. The special value `me` |
| 121 | can be used to indicate the authenticated user. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 122 | id: string, The ID of the thread to retrieve. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 123 | format: string, The format to return the messages in. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 124 | metadataHeaders: string, When given and format is METADATA, only include headers specified. (repeated) |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 125 | x__xgafv: string, V1 error format. |
| 126 | Allowed values |
| 127 | 1 - v1 error format |
| 128 | 2 - v2 error format |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 129 | |
| 130 | Returns: |
| 131 | An object of the form: |
| 132 | |
| 133 | { # A collection of messages representing a conversation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 134 | "id": "A String", # The unique ID of the thread. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 135 | "historyId": "A String", # The ID of the last history record that modified this thread. |
| 136 | "snippet": "A String", # A short part of the message text. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 137 | "messages": [ # The list of messages in the thread. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 138 | { # An email message. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 139 | "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to |
| 140 | # a thread, the following criteria must be met: |
| 141 | # <ol><li>The requested `threadId` must be specified on the |
| 142 | # `Message` or `Draft.Message` you supply with your |
| 143 | # request.</li> |
| 144 | # <li>The `References` and `In-Reply-To` headers must |
| 145 | # be set in compliance with the |
| 146 | # <a href="https://tools.ietf.org/html/rfc2822">RFC 2822</a> standard.</li> |
| 147 | # <li>The `Subject` headers must match. |
| 148 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 149 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
| 150 | "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines |
| 151 | # ordering in the inbox. For normal SMTP-received email, this represents the |
| 152 | # time the message was originally accepted by Google, which is more reliable |
| 153 | # than the `Date` header. However, for API-migrated mail, it can |
| 154 | # be configured by client to be based on the `Date` header. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 155 | "id": "A String", # The immutable ID of the message. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 156 | "sizeEstimate": 42, # Estimated size in bytes of the message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 157 | "payload": { # A single MIME message part. # The parsed email structure in the message parts. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 158 | "mimeType": "A String", # The MIME type of the message part. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 159 | "parts": [ # The child MIME message parts of this part. This only applies to container |
| 160 | # MIME message parts, for example `multipart/*`. For non- |
| 161 | # container MIME message part types, such as `text/plain`, this |
| 162 | # field is empty. For more information, see |
| 163 | # <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 164 | # Object with schema name: MessagePart |
| 165 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 166 | "headers": [ # List of headers on this message part. For the top-level message part, |
| 167 | # representing the entire message payload, it will contain the standard |
| 168 | # RFC 2822 email headers such as `To`, `From`, and |
| 169 | # `Subject`. |
| 170 | { |
| 171 | "name": "A String", # The name of the header before the `:` separator. For |
| 172 | # example, `To`. |
| 173 | "value": "A String", # The value of the header after the `:` separator. For example, |
| 174 | # `someuser@example.com`. |
| 175 | }, |
| 176 | ], |
| 177 | "filename": "A String", # The filename of the attachment. Only present if this message part |
| 178 | # represents an attachment. |
| 179 | "partId": "A String", # The immutable ID of the message part. |
| 180 | "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for |
| 181 | # container MIME message parts. |
| 182 | "size": 42, # Number of bytes for the message part data (encoding notwithstanding). |
| 183 | "attachmentId": "A String", # When present, contains the ID of an external attachment that can be |
| 184 | # retrieved in a separate `messages.attachments.get` request. |
| 185 | # When not present, the entire content of the message part body is |
| 186 | # contained in the data field. |
| 187 | "data": "A String", # The body data of a MIME message part as a base64url encoded string. |
| 188 | # May be empty for MIME container |
| 189 | # types that have no message body or when the body data is sent as a |
| 190 | # separate attachment. An attachment ID is present if the body data is |
| 191 | # contained in a separate attachment. |
| 192 | }, |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 193 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 194 | "historyId": "A String", # The ID of the last history record that modified this message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 195 | "snippet": "A String", # A short part of the message text. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 196 | "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url |
| 197 | # encoded string. Returned in `messages.get` and |
| 198 | # `drafts.get` responses when the `format=RAW` |
| 199 | # parameter is supplied. |
| 200 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 201 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
| 202 | "labelIds": [ # List of IDs of labels applied to this message. |
| 203 | # @mutable gmail.users.messages.insert gmail.users.messages.modify |
| 204 | "A String", |
| 205 | ], |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 206 | }, |
| 207 | ], |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 208 | }</pre> |
| 209 | </div> |
| 210 | |
| 211 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 212 | <code class="details" id="list">list(userId, q=None, includeSpamTrash=None, pageToken=None, maxResults=None, labelIds=None, x__xgafv=None)</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 213 | <pre>Lists the threads in the user's mailbox. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 214 | |
| 215 | Args: |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 216 | userId: string, The user's email address. The special value `me` |
| 217 | can be used to indicate the authenticated user. (required) |
| 218 | q: string, Only return threads matching the specified query. Supports the same |
| 219 | query format as the Gmail search box. For example, |
| 220 | `"from:someuser@example.com rfc822msgid:<somemsgid@example.com> |
| 221 | is:unread"`. Parameter cannot be used when accessing the api |
| 222 | using the gmail.metadata scope. |
| 223 | includeSpamTrash: boolean, Include threads from `SPAM` and `TRASH` |
| 224 | in the results. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 225 | pageToken: string, Page token to retrieve a specific page of results in the list. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 226 | maxResults: integer, Maximum number of threads to return. |
| 227 | labelIds: string, Only return threads with labels that match all of the specified label IDs. (repeated) |
| 228 | x__xgafv: string, V1 error format. |
| 229 | Allowed values |
| 230 | 1 - v1 error format |
| 231 | 2 - v2 error format |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 232 | |
| 233 | Returns: |
| 234 | An object of the form: |
| 235 | |
| 236 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 237 | "resultSizeEstimate": 42, # Estimated total number of results. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 238 | "threads": [ # List of threads. Note that each thread resource does not contain a list of |
| 239 | # `messages`. The list of `messages` for a given thread |
| 240 | # can be fetched using the |
| 241 | # <a href="/gmail/api/v1/reference/users/threads/get">threads.get</a> method. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 242 | { # A collection of messages representing a conversation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 243 | "id": "A String", # The unique ID of the thread. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 244 | "historyId": "A String", # The ID of the last history record that modified this thread. |
| 245 | "snippet": "A String", # A short part of the message text. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 246 | "messages": [ # The list of messages in the thread. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 247 | { # An email message. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 248 | "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to |
| 249 | # a thread, the following criteria must be met: |
| 250 | # <ol><li>The requested `threadId` must be specified on the |
| 251 | # `Message` or `Draft.Message` you supply with your |
| 252 | # request.</li> |
| 253 | # <li>The `References` and `In-Reply-To` headers must |
| 254 | # be set in compliance with the |
| 255 | # <a href="https://tools.ietf.org/html/rfc2822">RFC 2822</a> standard.</li> |
| 256 | # <li>The `Subject` headers must match. |
| 257 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 258 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
| 259 | "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines |
| 260 | # ordering in the inbox. For normal SMTP-received email, this represents the |
| 261 | # time the message was originally accepted by Google, which is more reliable |
| 262 | # than the `Date` header. However, for API-migrated mail, it can |
| 263 | # be configured by client to be based on the `Date` header. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 264 | "id": "A String", # The immutable ID of the message. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 265 | "sizeEstimate": 42, # Estimated size in bytes of the message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 266 | "payload": { # A single MIME message part. # The parsed email structure in the message parts. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 267 | "mimeType": "A String", # The MIME type of the message part. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 268 | "parts": [ # The child MIME message parts of this part. This only applies to container |
| 269 | # MIME message parts, for example `multipart/*`. For non- |
| 270 | # container MIME message part types, such as `text/plain`, this |
| 271 | # field is empty. For more information, see |
| 272 | # <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 273 | # Object with schema name: MessagePart |
| 274 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 275 | "headers": [ # List of headers on this message part. For the top-level message part, |
| 276 | # representing the entire message payload, it will contain the standard |
| 277 | # RFC 2822 email headers such as `To`, `From`, and |
| 278 | # `Subject`. |
| 279 | { |
| 280 | "name": "A String", # The name of the header before the `:` separator. For |
| 281 | # example, `To`. |
| 282 | "value": "A String", # The value of the header after the `:` separator. For example, |
| 283 | # `someuser@example.com`. |
| 284 | }, |
| 285 | ], |
| 286 | "filename": "A String", # The filename of the attachment. Only present if this message part |
| 287 | # represents an attachment. |
| 288 | "partId": "A String", # The immutable ID of the message part. |
| 289 | "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for |
| 290 | # container MIME message parts. |
| 291 | "size": 42, # Number of bytes for the message part data (encoding notwithstanding). |
| 292 | "attachmentId": "A String", # When present, contains the ID of an external attachment that can be |
| 293 | # retrieved in a separate `messages.attachments.get` request. |
| 294 | # When not present, the entire content of the message part body is |
| 295 | # contained in the data field. |
| 296 | "data": "A String", # The body data of a MIME message part as a base64url encoded string. |
| 297 | # May be empty for MIME container |
| 298 | # types that have no message body or when the body data is sent as a |
| 299 | # separate attachment. An attachment ID is present if the body data is |
| 300 | # contained in a separate attachment. |
| 301 | }, |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 302 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 303 | "historyId": "A String", # The ID of the last history record that modified this message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 304 | "snippet": "A String", # A short part of the message text. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 305 | "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url |
| 306 | # encoded string. Returned in `messages.get` and |
| 307 | # `drafts.get` responses when the `format=RAW` |
| 308 | # parameter is supplied. |
| 309 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 310 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
| 311 | "labelIds": [ # List of IDs of labels applied to this message. |
| 312 | # @mutable gmail.users.messages.insert gmail.users.messages.modify |
| 313 | "A String", |
| 314 | ], |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 315 | }, |
| 316 | ], |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 317 | }, |
| 318 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 319 | "nextPageToken": "A String", # Page token to retrieve the next page of results in the list. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 320 | }</pre> |
| 321 | </div> |
| 322 | |
| 323 | <div class="method"> |
| 324 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 325 | <pre>Retrieves the next page of results. |
| 326 | |
| 327 | Args: |
| 328 | previous_request: The request for the previous page. (required) |
| 329 | previous_response: The response from the request for the previous page. (required) |
| 330 | |
| 331 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 332 | A request object that you can call 'execute()' on to request the next |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 333 | page. Returns None if there are no more items in the collection. |
| 334 | </pre> |
| 335 | </div> |
| 336 | |
| 337 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 338 | <code class="details" id="modify">modify(userId, id, body=None, x__xgafv=None)</code> |
| 339 | <pre>Modifies the labels applied to the thread. This applies to all messages |
| 340 | in the thread. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 341 | |
| 342 | Args: |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 343 | userId: string, The user's email address. The special value `me` |
| 344 | can be used to indicate the authenticated user. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 345 | id: string, The ID of the thread to modify. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 346 | body: object, The request body. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 347 | The object takes the form of: |
| 348 | |
| 349 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 350 | "addLabelIds": [ # A list of IDs of labels to add to this thread. |
| 351 | "A String", |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 352 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 353 | "removeLabelIds": [ # A list of IDs of labels to remove from this thread. |
| 354 | "A String", |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 355 | ], |
| 356 | } |
| 357 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 358 | x__xgafv: string, V1 error format. |
| 359 | Allowed values |
| 360 | 1 - v1 error format |
| 361 | 2 - v2 error format |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 362 | |
| 363 | Returns: |
| 364 | An object of the form: |
| 365 | |
| 366 | { # A collection of messages representing a conversation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 367 | "id": "A String", # The unique ID of the thread. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 368 | "historyId": "A String", # The ID of the last history record that modified this thread. |
| 369 | "snippet": "A String", # A short part of the message text. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 370 | "messages": [ # The list of messages in the thread. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 371 | { # An email message. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 372 | "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to |
| 373 | # a thread, the following criteria must be met: |
| 374 | # <ol><li>The requested `threadId` must be specified on the |
| 375 | # `Message` or `Draft.Message` you supply with your |
| 376 | # request.</li> |
| 377 | # <li>The `References` and `In-Reply-To` headers must |
| 378 | # be set in compliance with the |
| 379 | # <a href="https://tools.ietf.org/html/rfc2822">RFC 2822</a> standard.</li> |
| 380 | # <li>The `Subject` headers must match. |
| 381 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 382 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
| 383 | "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines |
| 384 | # ordering in the inbox. For normal SMTP-received email, this represents the |
| 385 | # time the message was originally accepted by Google, which is more reliable |
| 386 | # than the `Date` header. However, for API-migrated mail, it can |
| 387 | # be configured by client to be based on the `Date` header. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 388 | "id": "A String", # The immutable ID of the message. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 389 | "sizeEstimate": 42, # Estimated size in bytes of the message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 390 | "payload": { # A single MIME message part. # The parsed email structure in the message parts. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 391 | "mimeType": "A String", # The MIME type of the message part. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 392 | "parts": [ # The child MIME message parts of this part. This only applies to container |
| 393 | # MIME message parts, for example `multipart/*`. For non- |
| 394 | # container MIME message part types, such as `text/plain`, this |
| 395 | # field is empty. For more information, see |
| 396 | # <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 397 | # Object with schema name: MessagePart |
| 398 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 399 | "headers": [ # List of headers on this message part. For the top-level message part, |
| 400 | # representing the entire message payload, it will contain the standard |
| 401 | # RFC 2822 email headers such as `To`, `From`, and |
| 402 | # `Subject`. |
| 403 | { |
| 404 | "name": "A String", # The name of the header before the `:` separator. For |
| 405 | # example, `To`. |
| 406 | "value": "A String", # The value of the header after the `:` separator. For example, |
| 407 | # `someuser@example.com`. |
| 408 | }, |
| 409 | ], |
| 410 | "filename": "A String", # The filename of the attachment. Only present if this message part |
| 411 | # represents an attachment. |
| 412 | "partId": "A String", # The immutable ID of the message part. |
| 413 | "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for |
| 414 | # container MIME message parts. |
| 415 | "size": 42, # Number of bytes for the message part data (encoding notwithstanding). |
| 416 | "attachmentId": "A String", # When present, contains the ID of an external attachment that can be |
| 417 | # retrieved in a separate `messages.attachments.get` request. |
| 418 | # When not present, the entire content of the message part body is |
| 419 | # contained in the data field. |
| 420 | "data": "A String", # The body data of a MIME message part as a base64url encoded string. |
| 421 | # May be empty for MIME container |
| 422 | # types that have no message body or when the body data is sent as a |
| 423 | # separate attachment. An attachment ID is present if the body data is |
| 424 | # contained in a separate attachment. |
| 425 | }, |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 426 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 427 | "historyId": "A String", # The ID of the last history record that modified this message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 428 | "snippet": "A String", # A short part of the message text. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 429 | "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url |
| 430 | # encoded string. Returned in `messages.get` and |
| 431 | # `drafts.get` responses when the `format=RAW` |
| 432 | # parameter is supplied. |
| 433 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 434 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
| 435 | "labelIds": [ # List of IDs of labels applied to this message. |
| 436 | # @mutable gmail.users.messages.insert gmail.users.messages.modify |
| 437 | "A String", |
| 438 | ], |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 439 | }, |
| 440 | ], |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 441 | }</pre> |
| 442 | </div> |
| 443 | |
| 444 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 445 | <code class="details" id="trash">trash(userId, id, x__xgafv=None)</code> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 446 | <pre>Moves the specified thread to the trash. |
| 447 | |
| 448 | Args: |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 449 | userId: string, The user's email address. The special value `me` |
| 450 | can be used to indicate the authenticated user. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 451 | id: string, The ID of the thread to Trash. (required) |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 452 | x__xgafv: string, V1 error format. |
| 453 | Allowed values |
| 454 | 1 - v1 error format |
| 455 | 2 - v2 error format |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 456 | |
| 457 | Returns: |
| 458 | An object of the form: |
| 459 | |
| 460 | { # A collection of messages representing a conversation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 461 | "id": "A String", # The unique ID of the thread. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 462 | "historyId": "A String", # The ID of the last history record that modified this thread. |
| 463 | "snippet": "A String", # A short part of the message text. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 464 | "messages": [ # The list of messages in the thread. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 465 | { # An email message. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 466 | "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to |
| 467 | # a thread, the following criteria must be met: |
| 468 | # <ol><li>The requested `threadId` must be specified on the |
| 469 | # `Message` or `Draft.Message` you supply with your |
| 470 | # request.</li> |
| 471 | # <li>The `References` and `In-Reply-To` headers must |
| 472 | # be set in compliance with the |
| 473 | # <a href="https://tools.ietf.org/html/rfc2822">RFC 2822</a> standard.</li> |
| 474 | # <li>The `Subject` headers must match. |
| 475 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 476 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
| 477 | "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines |
| 478 | # ordering in the inbox. For normal SMTP-received email, this represents the |
| 479 | # time the message was originally accepted by Google, which is more reliable |
| 480 | # than the `Date` header. However, for API-migrated mail, it can |
| 481 | # be configured by client to be based on the `Date` header. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 482 | "id": "A String", # The immutable ID of the message. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 483 | "sizeEstimate": 42, # Estimated size in bytes of the message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 484 | "payload": { # A single MIME message part. # The parsed email structure in the message parts. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 485 | "mimeType": "A String", # The MIME type of the message part. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 486 | "parts": [ # The child MIME message parts of this part. This only applies to container |
| 487 | # MIME message parts, for example `multipart/*`. For non- |
| 488 | # container MIME message part types, such as `text/plain`, this |
| 489 | # field is empty. For more information, see |
| 490 | # <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 491 | # Object with schema name: MessagePart |
| 492 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 493 | "headers": [ # List of headers on this message part. For the top-level message part, |
| 494 | # representing the entire message payload, it will contain the standard |
| 495 | # RFC 2822 email headers such as `To`, `From`, and |
| 496 | # `Subject`. |
| 497 | { |
| 498 | "name": "A String", # The name of the header before the `:` separator. For |
| 499 | # example, `To`. |
| 500 | "value": "A String", # The value of the header after the `:` separator. For example, |
| 501 | # `someuser@example.com`. |
| 502 | }, |
| 503 | ], |
| 504 | "filename": "A String", # The filename of the attachment. Only present if this message part |
| 505 | # represents an attachment. |
| 506 | "partId": "A String", # The immutable ID of the message part. |
| 507 | "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for |
| 508 | # container MIME message parts. |
| 509 | "size": 42, # Number of bytes for the message part data (encoding notwithstanding). |
| 510 | "attachmentId": "A String", # When present, contains the ID of an external attachment that can be |
| 511 | # retrieved in a separate `messages.attachments.get` request. |
| 512 | # When not present, the entire content of the message part body is |
| 513 | # contained in the data field. |
| 514 | "data": "A String", # The body data of a MIME message part as a base64url encoded string. |
| 515 | # May be empty for MIME container |
| 516 | # types that have no message body or when the body data is sent as a |
| 517 | # separate attachment. An attachment ID is present if the body data is |
| 518 | # contained in a separate attachment. |
| 519 | }, |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 520 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 521 | "historyId": "A String", # The ID of the last history record that modified this message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 522 | "snippet": "A String", # A short part of the message text. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 523 | "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url |
| 524 | # encoded string. Returned in `messages.get` and |
| 525 | # `drafts.get` responses when the `format=RAW` |
| 526 | # parameter is supplied. |
| 527 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 528 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
| 529 | "labelIds": [ # List of IDs of labels applied to this message. |
| 530 | # @mutable gmail.users.messages.insert gmail.users.messages.modify |
| 531 | "A String", |
| 532 | ], |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 533 | }, |
| 534 | ], |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 535 | }</pre> |
| 536 | </div> |
| 537 | |
| 538 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 539 | <code class="details" id="untrash">untrash(userId, id, x__xgafv=None)</code> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 540 | <pre>Removes the specified thread from the trash. |
| 541 | |
| 542 | Args: |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 543 | userId: string, The user's email address. The special value `me` |
| 544 | can be used to indicate the authenticated user. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 545 | id: string, The ID of the thread to remove from Trash. (required) |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 546 | x__xgafv: string, V1 error format. |
| 547 | Allowed values |
| 548 | 1 - v1 error format |
| 549 | 2 - v2 error format |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 550 | |
| 551 | Returns: |
| 552 | An object of the form: |
| 553 | |
| 554 | { # A collection of messages representing a conversation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 555 | "id": "A String", # The unique ID of the thread. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 556 | "historyId": "A String", # The ID of the last history record that modified this thread. |
| 557 | "snippet": "A String", # A short part of the message text. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 558 | "messages": [ # The list of messages in the thread. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 559 | { # An email message. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 560 | "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to |
| 561 | # a thread, the following criteria must be met: |
| 562 | # <ol><li>The requested `threadId` must be specified on the |
| 563 | # `Message` or `Draft.Message` you supply with your |
| 564 | # request.</li> |
| 565 | # <li>The `References` and `In-Reply-To` headers must |
| 566 | # be set in compliance with the |
| 567 | # <a href="https://tools.ietf.org/html/rfc2822">RFC 2822</a> standard.</li> |
| 568 | # <li>The `Subject` headers must match. |
| 569 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 570 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
| 571 | "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines |
| 572 | # ordering in the inbox. For normal SMTP-received email, this represents the |
| 573 | # time the message was originally accepted by Google, which is more reliable |
| 574 | # than the `Date` header. However, for API-migrated mail, it can |
| 575 | # be configured by client to be based on the `Date` header. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 576 | "id": "A String", # The immutable ID of the message. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 577 | "sizeEstimate": 42, # Estimated size in bytes of the message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 578 | "payload": { # A single MIME message part. # The parsed email structure in the message parts. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 579 | "mimeType": "A String", # The MIME type of the message part. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 580 | "parts": [ # The child MIME message parts of this part. This only applies to container |
| 581 | # MIME message parts, for example `multipart/*`. For non- |
| 582 | # container MIME message part types, such as `text/plain`, this |
| 583 | # field is empty. For more information, see |
| 584 | # <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 585 | # Object with schema name: MessagePart |
| 586 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 587 | "headers": [ # List of headers on this message part. For the top-level message part, |
| 588 | # representing the entire message payload, it will contain the standard |
| 589 | # RFC 2822 email headers such as `To`, `From`, and |
| 590 | # `Subject`. |
| 591 | { |
| 592 | "name": "A String", # The name of the header before the `:` separator. For |
| 593 | # example, `To`. |
| 594 | "value": "A String", # The value of the header after the `:` separator. For example, |
| 595 | # `someuser@example.com`. |
| 596 | }, |
| 597 | ], |
| 598 | "filename": "A String", # The filename of the attachment. Only present if this message part |
| 599 | # represents an attachment. |
| 600 | "partId": "A String", # The immutable ID of the message part. |
| 601 | "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for |
| 602 | # container MIME message parts. |
| 603 | "size": 42, # Number of bytes for the message part data (encoding notwithstanding). |
| 604 | "attachmentId": "A String", # When present, contains the ID of an external attachment that can be |
| 605 | # retrieved in a separate `messages.attachments.get` request. |
| 606 | # When not present, the entire content of the message part body is |
| 607 | # contained in the data field. |
| 608 | "data": "A String", # The body data of a MIME message part as a base64url encoded string. |
| 609 | # May be empty for MIME container |
| 610 | # types that have no message body or when the body data is sent as a |
| 611 | # separate attachment. An attachment ID is present if the body data is |
| 612 | # contained in a separate attachment. |
| 613 | }, |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 614 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 615 | "historyId": "A String", # The ID of the last history record that modified this message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 616 | "snippet": "A String", # A short part of the message text. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 617 | "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url |
| 618 | # encoded string. Returned in `messages.get` and |
| 619 | # `drafts.get` responses when the `format=RAW` |
| 620 | # parameter is supplied. |
| 621 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 622 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
| 623 | "labelIds": [ # List of IDs of labels applied to this message. |
| 624 | # @mutable gmail.users.messages.insert gmail.users.messages.modify |
| 625 | "A String", |
| 626 | ], |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 627 | }, |
| 628 | ], |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 629 | }</pre> |
| 630 | </div> |
| 631 | |
| 632 | </body></html> |