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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 81 | <code><a href="#get">get(userId, id, format=None, x__xgafv=None, metadataHeaders=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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 84 | <code><a href="#list">list(userId, labelIds=None, pageToken=None, includeSpamTrash=None, maxResults=None, q=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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -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 <code>threads.trash</code> instead. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 103 | |
| 104 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 105 | userId: string, The user's email address. The special value <code>me</code> |
| 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) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 116 | <code class="details" id="get">get(userId, id, format=None, x__xgafv=None, metadataHeaders=None)</code> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 117 | <pre>Gets the specified thread. |
| 118 | |
| 119 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 120 | userId: string, The user's email address. The special value <code>me</code> |
| 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. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 124 | x__xgafv: string, V1 error format. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 125 | Allowed values |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 126 | 1 - v1 error format |
| 127 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 128 | metadataHeaders: string, When given and format is METADATA, only include headers specified. (repeated) |
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. |
| 134 | "snippet": "A String", # A short part of the message text. |
| 135 | "messages": [ # The list of messages in the thread. |
| 136 | { # An email message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 137 | "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines |
| 138 | # ordering in the inbox. For normal SMTP-received email, this represents the |
| 139 | # time the message was originally accepted by Google, which is more reliable |
| 140 | # than the <code>Date</code> header. However, for API-migrated mail, it can |
| 141 | # be configured by client to be based on the <code>Date</code> header. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 142 | "historyId": "A String", # The ID of the last history record that modified this message. |
| 143 | "payload": { # A single MIME message part. # The parsed email structure in the message parts. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 144 | "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for |
| 145 | # container MIME message parts. |
| 146 | "data": "A String", # The body data of a MIME message part as a base64url encoded string. |
| 147 | # May be empty for MIME container |
| 148 | # types that have no message body or when the body data is sent as a |
| 149 | # separate attachment. An attachment ID is present if the body data is |
| 150 | # contained in a separate attachment. |
| 151 | "attachmentId": "A String", # When present, contains the ID of an external attachment that can be |
| 152 | # retrieved in a separate <code>messages.attachments.get</code> request. |
| 153 | # When not present, the entire content of the message part body is |
| 154 | # contained in the data field. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 155 | "size": 42, # Number of bytes for the message part data (encoding notwithstanding). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 156 | }, |
| 157 | "mimeType": "A String", # The MIME type of the message part. |
| 158 | "partId": "A String", # The immutable ID of the message part. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 159 | "filename": "A String", # The filename of the attachment. Only present if this message part |
| 160 | # represents an attachment. |
| 161 | "headers": [ # List of headers on this message part. For the top-level message part, |
| 162 | # representing the entire message payload, it will contain the standard |
| 163 | # RFC 2822 email headers such as <code>To</code>, <code>From</code>, and |
| 164 | # <code>Subject</code>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 165 | { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 166 | "name": "A String", # The name of the header before the <code>:</code> separator. For |
| 167 | # example, <code>To</code>. |
| 168 | "value": "A String", # The value of the header after the <code>:</code> separator. For example, |
| 169 | # <code>someuser@example.com</code>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 170 | }, |
| 171 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 172 | "parts": [ # The child MIME message parts of this part. This only applies to container |
| 173 | # MIME message parts, for example <code>multipart/*</code>. For non- |
| 174 | # container MIME message part types, such as <code>text/plain</code>, this |
| 175 | # field is empty. For more information, see |
| 176 | # <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 177 | # Object with schema name: MessagePart |
| 178 | ], |
| 179 | }, |
| 180 | "snippet": "A String", # A short part of the message text. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 181 | "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url |
| 182 | # encoded string. Returned in <code>messages.get</code> and |
| 183 | # <code>drafts.get</code> responses when the <code>format=RAW</code> |
| 184 | # parameter is supplied. |
| 185 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 186 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 187 | "sizeEstimate": 42, # Estimated size in bytes of the message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 188 | "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to |
| 189 | # a thread, the following criteria must be met: |
| 190 | # <ol><li>The requested <code>threadId</code> must be specified on the |
| 191 | # <code>Message</code> or <code>Draft.Message</code> you supply with your |
| 192 | # request.</li> |
| 193 | # <li>The <code>References</code> and <code>In-Reply-To</code> headers must |
| 194 | # be set in compliance with the |
| 195 | # <a href="https://tools.ietf.org/html/rfc2822">RFC 2822</a> standard.</li> |
| 196 | # <li>The <code>Subject</code> headers must match. |
| 197 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 198 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 199 | "labelIds": [ # List of IDs of labels applied to this message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 200 | # @mutable gmail.users.messages.insert gmail.users.messages.modify |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 201 | "A String", |
| 202 | ], |
| 203 | "id": "A String", # The immutable ID of the message. |
| 204 | }, |
| 205 | ], |
| 206 | "id": "A String", # The unique ID of the thread. |
| 207 | "historyId": "A String", # The ID of the last history record that modified this thread. |
| 208 | }</pre> |
| 209 | </div> |
| 210 | |
| 211 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 212 | <code class="details" id="list">list(userId, labelIds=None, pageToken=None, includeSpamTrash=None, maxResults=None, q=None, x__xgafv=None)</code> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 213 | <pre>Lists the threads in the user's mailbox. |
| 214 | |
| 215 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 216 | userId: string, The user's email address. The special value <code>me</code> |
| 217 | can be used to indicate the authenticated user. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 218 | labelIds: string, Only return threads with labels that match all of the specified label IDs. (repeated) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 219 | pageToken: string, Page token to retrieve a specific page of results in the list. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 220 | includeSpamTrash: boolean, Include threads from <code>SPAM</code> and <code>TRASH</code> |
| 221 | in the results. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 222 | maxResults: integer, Maximum number of threads to return. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 223 | q: string, Only return threads matching the specified query. Supports the same |
| 224 | query format as the Gmail search box. For example, |
| 225 | <code>"from:someuser@example.com rfc822msgid:<somemsgid@example.com> |
| 226 | is:unread"</code>. Parameter cannot be used when accessing the api |
| 227 | using the gmail.metadata scope. |
| 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 | { |
| 237 | "nextPageToken": "A String", # Page token to retrieve the next page of results in the list. |
| 238 | "resultSizeEstimate": 42, # Estimated total number of results. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 239 | "threads": [ # List of threads. Note that each thread resource does not contain a list of |
| 240 | # <code>messages</code>. The list of <code>messages</code> for a given thread |
| 241 | # can be fetched using the |
| 242 | # <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] | 243 | { # A collection of messages representing a conversation. |
| 244 | "snippet": "A String", # A short part of the message text. |
| 245 | "messages": [ # The list of messages in the thread. |
| 246 | { # An email message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 247 | "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines |
| 248 | # ordering in the inbox. For normal SMTP-received email, this represents the |
| 249 | # time the message was originally accepted by Google, which is more reliable |
| 250 | # than the <code>Date</code> header. However, for API-migrated mail, it can |
| 251 | # be configured by client to be based on the <code>Date</code> header. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 252 | "historyId": "A String", # The ID of the last history record that modified this message. |
| 253 | "payload": { # A single MIME message part. # The parsed email structure in the message parts. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 254 | "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for |
| 255 | # container MIME message parts. |
| 256 | "data": "A String", # The body data of a MIME message part as a base64url encoded string. |
| 257 | # May be empty for MIME container |
| 258 | # types that have no message body or when the body data is sent as a |
| 259 | # separate attachment. An attachment ID is present if the body data is |
| 260 | # contained in a separate attachment. |
| 261 | "attachmentId": "A String", # When present, contains the ID of an external attachment that can be |
| 262 | # retrieved in a separate <code>messages.attachments.get</code> request. |
| 263 | # When not present, the entire content of the message part body is |
| 264 | # contained in the data field. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 265 | "size": 42, # Number of bytes for the message part data (encoding notwithstanding). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 266 | }, |
| 267 | "mimeType": "A String", # The MIME type of the message part. |
| 268 | "partId": "A String", # The immutable ID of the message part. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 269 | "filename": "A String", # The filename of the attachment. Only present if this message part |
| 270 | # represents an attachment. |
| 271 | "headers": [ # List of headers on this message part. For the top-level message part, |
| 272 | # representing the entire message payload, it will contain the standard |
| 273 | # RFC 2822 email headers such as <code>To</code>, <code>From</code>, and |
| 274 | # <code>Subject</code>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 275 | { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 276 | "name": "A String", # The name of the header before the <code>:</code> separator. For |
| 277 | # example, <code>To</code>. |
| 278 | "value": "A String", # The value of the header after the <code>:</code> separator. For example, |
| 279 | # <code>someuser@example.com</code>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 280 | }, |
| 281 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 282 | "parts": [ # The child MIME message parts of this part. This only applies to container |
| 283 | # MIME message parts, for example <code>multipart/*</code>. For non- |
| 284 | # container MIME message part types, such as <code>text/plain</code>, this |
| 285 | # field is empty. For more information, see |
| 286 | # <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 287 | # Object with schema name: MessagePart |
| 288 | ], |
| 289 | }, |
| 290 | "snippet": "A String", # A short part of the message text. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 291 | "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url |
| 292 | # encoded string. Returned in <code>messages.get</code> and |
| 293 | # <code>drafts.get</code> responses when the <code>format=RAW</code> |
| 294 | # parameter is supplied. |
| 295 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 296 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 297 | "sizeEstimate": 42, # Estimated size in bytes of the message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 298 | "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to |
| 299 | # a thread, the following criteria must be met: |
| 300 | # <ol><li>The requested <code>threadId</code> must be specified on the |
| 301 | # <code>Message</code> or <code>Draft.Message</code> you supply with your |
| 302 | # request.</li> |
| 303 | # <li>The <code>References</code> and <code>In-Reply-To</code> headers must |
| 304 | # be set in compliance with the |
| 305 | # <a href="https://tools.ietf.org/html/rfc2822">RFC 2822</a> standard.</li> |
| 306 | # <li>The <code>Subject</code> headers must match. |
| 307 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 308 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 309 | "labelIds": [ # List of IDs of labels applied to this message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 310 | # @mutable gmail.users.messages.insert gmail.users.messages.modify |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 311 | "A String", |
| 312 | ], |
| 313 | "id": "A String", # The immutable ID of the message. |
| 314 | }, |
| 315 | ], |
| 316 | "id": "A String", # The unique ID of the thread. |
| 317 | "historyId": "A String", # The ID of the last history record that modified this thread. |
| 318 | }, |
| 319 | ], |
| 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: |
| 332 | A request object that you can call 'execute()' on to request the next |
| 333 | page. Returns None if there are no more items in the collection. |
| 334 | </pre> |
| 335 | </div> |
| 336 | |
| 337 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -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: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 343 | userId: string, The user's email address. The special value <code>me</code> |
| 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 | { |
| 350 | "removeLabelIds": [ # A list of IDs of labels to remove from this thread. |
| 351 | "A String", |
| 352 | ], |
| 353 | "addLabelIds": [ # A list of IDs of labels to add to this thread. |
| 354 | "A String", |
| 355 | ], |
| 356 | } |
| 357 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -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. |
| 367 | "snippet": "A String", # A short part of the message text. |
| 368 | "messages": [ # The list of messages in the thread. |
| 369 | { # An email message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 370 | "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines |
| 371 | # ordering in the inbox. For normal SMTP-received email, this represents the |
| 372 | # time the message was originally accepted by Google, which is more reliable |
| 373 | # than the <code>Date</code> header. However, for API-migrated mail, it can |
| 374 | # be configured by client to be based on the <code>Date</code> header. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 375 | "historyId": "A String", # The ID of the last history record that modified this message. |
| 376 | "payload": { # A single MIME message part. # The parsed email structure in the message parts. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 377 | "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for |
| 378 | # container MIME message parts. |
| 379 | "data": "A String", # The body data of a MIME message part as a base64url encoded string. |
| 380 | # May be empty for MIME container |
| 381 | # types that have no message body or when the body data is sent as a |
| 382 | # separate attachment. An attachment ID is present if the body data is |
| 383 | # contained in a separate attachment. |
| 384 | "attachmentId": "A String", # When present, contains the ID of an external attachment that can be |
| 385 | # retrieved in a separate <code>messages.attachments.get</code> request. |
| 386 | # When not present, the entire content of the message part body is |
| 387 | # contained in the data field. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 388 | "size": 42, # Number of bytes for the message part data (encoding notwithstanding). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 389 | }, |
| 390 | "mimeType": "A String", # The MIME type of the message part. |
| 391 | "partId": "A String", # The immutable ID of the message part. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 392 | "filename": "A String", # The filename of the attachment. Only present if this message part |
| 393 | # represents an attachment. |
| 394 | "headers": [ # List of headers on this message part. For the top-level message part, |
| 395 | # representing the entire message payload, it will contain the standard |
| 396 | # RFC 2822 email headers such as <code>To</code>, <code>From</code>, and |
| 397 | # <code>Subject</code>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 398 | { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 399 | "name": "A String", # The name of the header before the <code>:</code> separator. For |
| 400 | # example, <code>To</code>. |
| 401 | "value": "A String", # The value of the header after the <code>:</code> separator. For example, |
| 402 | # <code>someuser@example.com</code>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 403 | }, |
| 404 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 405 | "parts": [ # The child MIME message parts of this part. This only applies to container |
| 406 | # MIME message parts, for example <code>multipart/*</code>. For non- |
| 407 | # container MIME message part types, such as <code>text/plain</code>, this |
| 408 | # field is empty. For more information, see |
| 409 | # <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 410 | # Object with schema name: MessagePart |
| 411 | ], |
| 412 | }, |
| 413 | "snippet": "A String", # A short part of the message text. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 414 | "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url |
| 415 | # encoded string. Returned in <code>messages.get</code> and |
| 416 | # <code>drafts.get</code> responses when the <code>format=RAW</code> |
| 417 | # parameter is supplied. |
| 418 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 419 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 420 | "sizeEstimate": 42, # Estimated size in bytes of the message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 421 | "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to |
| 422 | # a thread, the following criteria must be met: |
| 423 | # <ol><li>The requested <code>threadId</code> must be specified on the |
| 424 | # <code>Message</code> or <code>Draft.Message</code> you supply with your |
| 425 | # request.</li> |
| 426 | # <li>The <code>References</code> and <code>In-Reply-To</code> headers must |
| 427 | # be set in compliance with the |
| 428 | # <a href="https://tools.ietf.org/html/rfc2822">RFC 2822</a> standard.</li> |
| 429 | # <li>The <code>Subject</code> headers must match. |
| 430 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 431 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 432 | "labelIds": [ # List of IDs of labels applied to this message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 433 | # @mutable gmail.users.messages.insert gmail.users.messages.modify |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 434 | "A String", |
| 435 | ], |
| 436 | "id": "A String", # The immutable ID of the message. |
| 437 | }, |
| 438 | ], |
| 439 | "id": "A String", # The unique ID of the thread. |
| 440 | "historyId": "A String", # The ID of the last history record that modified this thread. |
| 441 | }</pre> |
| 442 | </div> |
| 443 | |
| 444 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -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: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 449 | userId: string, The user's email address. The special value <code>me</code> |
| 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) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -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. |
| 461 | "snippet": "A String", # A short part of the message text. |
| 462 | "messages": [ # The list of messages in the thread. |
| 463 | { # An email message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 464 | "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines |
| 465 | # ordering in the inbox. For normal SMTP-received email, this represents the |
| 466 | # time the message was originally accepted by Google, which is more reliable |
| 467 | # than the <code>Date</code> header. However, for API-migrated mail, it can |
| 468 | # be configured by client to be based on the <code>Date</code> header. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 469 | "historyId": "A String", # The ID of the last history record that modified this message. |
| 470 | "payload": { # A single MIME message part. # The parsed email structure in the message parts. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 471 | "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for |
| 472 | # container MIME message parts. |
| 473 | "data": "A String", # The body data of a MIME message part as a base64url encoded string. |
| 474 | # May be empty for MIME container |
| 475 | # types that have no message body or when the body data is sent as a |
| 476 | # separate attachment. An attachment ID is present if the body data is |
| 477 | # contained in a separate attachment. |
| 478 | "attachmentId": "A String", # When present, contains the ID of an external attachment that can be |
| 479 | # retrieved in a separate <code>messages.attachments.get</code> request. |
| 480 | # When not present, the entire content of the message part body is |
| 481 | # contained in the data field. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 482 | "size": 42, # Number of bytes for the message part data (encoding notwithstanding). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 483 | }, |
| 484 | "mimeType": "A String", # The MIME type of the message part. |
| 485 | "partId": "A String", # The immutable ID of the message part. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 486 | "filename": "A String", # The filename of the attachment. Only present if this message part |
| 487 | # represents an attachment. |
| 488 | "headers": [ # List of headers on this message part. For the top-level message part, |
| 489 | # representing the entire message payload, it will contain the standard |
| 490 | # RFC 2822 email headers such as <code>To</code>, <code>From</code>, and |
| 491 | # <code>Subject</code>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 492 | { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 493 | "name": "A String", # The name of the header before the <code>:</code> separator. For |
| 494 | # example, <code>To</code>. |
| 495 | "value": "A String", # The value of the header after the <code>:</code> separator. For example, |
| 496 | # <code>someuser@example.com</code>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 497 | }, |
| 498 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 499 | "parts": [ # The child MIME message parts of this part. This only applies to container |
| 500 | # MIME message parts, for example <code>multipart/*</code>. For non- |
| 501 | # container MIME message part types, such as <code>text/plain</code>, this |
| 502 | # field is empty. For more information, see |
| 503 | # <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 504 | # Object with schema name: MessagePart |
| 505 | ], |
| 506 | }, |
| 507 | "snippet": "A String", # A short part of the message text. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 508 | "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url |
| 509 | # encoded string. Returned in <code>messages.get</code> and |
| 510 | # <code>drafts.get</code> responses when the <code>format=RAW</code> |
| 511 | # parameter is supplied. |
| 512 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 513 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 514 | "sizeEstimate": 42, # Estimated size in bytes of the message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 515 | "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to |
| 516 | # a thread, the following criteria must be met: |
| 517 | # <ol><li>The requested <code>threadId</code> must be specified on the |
| 518 | # <code>Message</code> or <code>Draft.Message</code> you supply with your |
| 519 | # request.</li> |
| 520 | # <li>The <code>References</code> and <code>In-Reply-To</code> headers must |
| 521 | # be set in compliance with the |
| 522 | # <a href="https://tools.ietf.org/html/rfc2822">RFC 2822</a> standard.</li> |
| 523 | # <li>The <code>Subject</code> headers must match. |
| 524 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 525 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 526 | "labelIds": [ # List of IDs of labels applied to this message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 527 | # @mutable gmail.users.messages.insert gmail.users.messages.modify |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 528 | "A String", |
| 529 | ], |
| 530 | "id": "A String", # The immutable ID of the message. |
| 531 | }, |
| 532 | ], |
| 533 | "id": "A String", # The unique ID of the thread. |
| 534 | "historyId": "A String", # The ID of the last history record that modified this thread. |
| 535 | }</pre> |
| 536 | </div> |
| 537 | |
| 538 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -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: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 543 | userId: string, The user's email address. The special value <code>me</code> |
| 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) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -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. |
| 555 | "snippet": "A String", # A short part of the message text. |
| 556 | "messages": [ # The list of messages in the thread. |
| 557 | { # An email message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 558 | "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines |
| 559 | # ordering in the inbox. For normal SMTP-received email, this represents the |
| 560 | # time the message was originally accepted by Google, which is more reliable |
| 561 | # than the <code>Date</code> header. However, for API-migrated mail, it can |
| 562 | # be configured by client to be based on the <code>Date</code> header. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 563 | "historyId": "A String", # The ID of the last history record that modified this message. |
| 564 | "payload": { # A single MIME message part. # The parsed email structure in the message parts. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 565 | "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for |
| 566 | # container MIME message parts. |
| 567 | "data": "A String", # The body data of a MIME message part as a base64url encoded string. |
| 568 | # May be empty for MIME container |
| 569 | # types that have no message body or when the body data is sent as a |
| 570 | # separate attachment. An attachment ID is present if the body data is |
| 571 | # contained in a separate attachment. |
| 572 | "attachmentId": "A String", # When present, contains the ID of an external attachment that can be |
| 573 | # retrieved in a separate <code>messages.attachments.get</code> request. |
| 574 | # When not present, the entire content of the message part body is |
| 575 | # contained in the data field. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 576 | "size": 42, # Number of bytes for the message part data (encoding notwithstanding). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 577 | }, |
| 578 | "mimeType": "A String", # The MIME type of the message part. |
| 579 | "partId": "A String", # The immutable ID of the message part. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 580 | "filename": "A String", # The filename of the attachment. Only present if this message part |
| 581 | # represents an attachment. |
| 582 | "headers": [ # List of headers on this message part. For the top-level message part, |
| 583 | # representing the entire message payload, it will contain the standard |
| 584 | # RFC 2822 email headers such as <code>To</code>, <code>From</code>, and |
| 585 | # <code>Subject</code>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 586 | { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 587 | "name": "A String", # The name of the header before the <code>:</code> separator. For |
| 588 | # example, <code>To</code>. |
| 589 | "value": "A String", # The value of the header after the <code>:</code> separator. For example, |
| 590 | # <code>someuser@example.com</code>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 591 | }, |
| 592 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 593 | "parts": [ # The child MIME message parts of this part. This only applies to container |
| 594 | # MIME message parts, for example <code>multipart/*</code>. For non- |
| 595 | # container MIME message part types, such as <code>text/plain</code>, this |
| 596 | # field is empty. For more information, see |
| 597 | # <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 598 | # Object with schema name: MessagePart |
| 599 | ], |
| 600 | }, |
| 601 | "snippet": "A String", # A short part of the message text. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 602 | "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url |
| 603 | # encoded string. Returned in <code>messages.get</code> and |
| 604 | # <code>drafts.get</code> responses when the <code>format=RAW</code> |
| 605 | # parameter is supplied. |
| 606 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 607 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 608 | "sizeEstimate": 42, # Estimated size in bytes of the message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 609 | "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to |
| 610 | # a thread, the following criteria must be met: |
| 611 | # <ol><li>The requested <code>threadId</code> must be specified on the |
| 612 | # <code>Message</code> or <code>Draft.Message</code> you supply with your |
| 613 | # request.</li> |
| 614 | # <li>The <code>References</code> and <code>In-Reply-To</code> headers must |
| 615 | # be set in compliance with the |
| 616 | # <a href="https://tools.ietf.org/html/rfc2822">RFC 2822</a> standard.</li> |
| 617 | # <li>The <code>Subject</code> headers must match. |
| 618 | # @mutable gmail.users.messages.insert gmail.users.messages.send |
| 619 | # @mutable gmail.users.drafts.create gmail.users.drafts.update |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 620 | "labelIds": [ # List of IDs of labels applied to this message. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 621 | # @mutable gmail.users.messages.insert gmail.users.messages.modify |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 622 | "A String", |
| 623 | ], |
| 624 | "id": "A String", # The immutable ID of the message. |
| 625 | }, |
| 626 | ], |
| 627 | "id": "A String", # The unique ID of the thread. |
| 628 | "historyId": "A String", # The ID of the last history record that modified this thread. |
| 629 | }</pre> |
| 630 | </div> |
| 631 | |
| 632 | </body></html> |