Release v1.6.0 (#324)
* Update version and changelog for v1.6.0
* Update docs
diff --git a/docs/dyn/gmail_v1.users.messages.html b/docs/dyn/gmail_v1.users.messages.html
index 65bb870..e66cef7 100644
--- a/docs/dyn/gmail_v1.users.messages.html
+++ b/docs/dyn/gmail_v1.users.messages.html
@@ -83,16 +83,19 @@
<code><a href="#batchDelete">batchDelete(userId, body)</a></code></p>
<p class="firstline">Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.</p>
<p class="toc_element">
+ <code><a href="#batchModify">batchModify(userId, body)</a></code></p>
+<p class="firstline">Modifies the labels on the specified messages.</p>
+<p class="toc_element">
<code><a href="#delete">delete(userId, id)</a></code></p>
<p class="firstline">Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer messages.trash instead.</p>
<p class="toc_element">
<code><a href="#get">get(userId, id, format=None, metadataHeaders=None)</a></code></p>
<p class="firstline">Gets the specified message.</p>
<p class="toc_element">
- <code><a href="#import_">import_(userId, body=None, media_body=None, internalDateSource=None, neverMarkSpam=None, processForCalendar=None, deleted=None)</a></code></p>
+ <code><a href="#import_">import_(userId, body=None, media_body=None, internalDateSource=None, neverMarkSpam=None, media_mime_type=None, deleted=None, processForCalendar=None)</a></code></p>
<p class="firstline">Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. Does not send a message.</p>
<p class="toc_element">
- <code><a href="#insert">insert(userId, body=None, media_body=None, internalDateSource=None, deleted=None)</a></code></p>
+ <code><a href="#insert">insert(userId, body=None, media_body=None, internalDateSource=None, media_mime_type=None, deleted=None)</a></code></p>
<p class="firstline">Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message.</p>
<p class="toc_element">
<code><a href="#list">list(userId, labelIds=None, q=None, pageToken=None, maxResults=None, includeSpamTrash=None)</a></code></p>
@@ -104,7 +107,7 @@
<code><a href="#modify">modify(userId, id, body)</a></code></p>
<p class="firstline">Modifies the labels on the specified message.</p>
<p class="toc_element">
- <code><a href="#send">send(userId, body=None, media_body=None)</a></code></p>
+ <code><a href="#send">send(userId, body=None, media_body=None, media_mime_type=None)</a></code></p>
<p class="firstline">Sends the specified message to the recipients in the To, Cc, and Bcc headers.</p>
<p class="toc_element">
<code><a href="#trash">trash(userId, id)</a></code></p>
@@ -132,6 +135,30 @@
</div>
<div class="method">
+ <code class="details" id="batchModify">batchModify(userId, body)</code>
+ <pre>Modifies the labels on the specified messages.
+
+Args:
+ userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
+ body: object, The request body. (required)
+ The object takes the form of:
+
+{
+ "removeLabelIds": [ # A list of label IDs to remove from messages.
+ "A String",
+ ],
+ "ids": [ # The IDs of the messages to modify. There is a limit of 1000 ids per request.
+ "A String",
+ ],
+ "addLabelIds": [ # A list of label IDs to add to messages.
+ "A String",
+ ],
+ }
+
+</pre>
+</div>
+
+<div class="method">
<code class="details" id="delete">delete(userId, id)</code>
<pre>Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer messages.trash instead.
@@ -164,9 +191,9 @@
"historyId": "A String", # The ID of the last history record that modified this message.
"payload": { # A single MIME message part. # The parsed email structure in the message parts.
"body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
- "data": "A String", # The body data of a MIME message part. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
+ "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
"attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
- "size": 42, # Total number of bytes in the body of the message part.
+ "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
},
"mimeType": "A String", # The MIME type of the message part.
"partId": "A String", # The immutable ID of the message part.
@@ -196,7 +223,7 @@
</div>
<div class="method">
- <code class="details" id="import_">import_(userId, body=None, media_body=None, internalDateSource=None, neverMarkSpam=None, processForCalendar=None, deleted=None)</code>
+ <code class="details" id="import_">import_(userId, body=None, media_body=None, internalDateSource=None, neverMarkSpam=None, media_mime_type=None, deleted=None, processForCalendar=None)</code>
<pre>Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. Does not send a message.
Args:
@@ -209,9 +236,9 @@
"historyId": "A String", # The ID of the last history record that modified this message.
"payload": { # A single MIME message part. # The parsed email structure in the message parts.
"body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
- "data": "A String", # The body data of a MIME message part. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
+ "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
"attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
- "size": 42, # Total number of bytes in the body of the message part.
+ "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
},
"mimeType": "A String", # The MIME type of the message part.
"partId": "A String", # The immutable ID of the message part.
@@ -245,8 +272,9 @@
dateHeader -
receivedTime -
neverMarkSpam: boolean, Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox.
- processForCalendar: boolean, Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user.
+ media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
deleted: boolean, Mark the email as permanently deleted (not TRASH) and only visible in Google Apps Vault to a Vault administrator. Only used for Google Apps for Work accounts.
+ processForCalendar: boolean, Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user.
Returns:
An object of the form:
@@ -256,9 +284,9 @@
"historyId": "A String", # The ID of the last history record that modified this message.
"payload": { # A single MIME message part. # The parsed email structure in the message parts.
"body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
- "data": "A String", # The body data of a MIME message part. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
+ "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
"attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
- "size": 42, # Total number of bytes in the body of the message part.
+ "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
},
"mimeType": "A String", # The MIME type of the message part.
"partId": "A String", # The immutable ID of the message part.
@@ -288,7 +316,7 @@
</div>
<div class="method">
- <code class="details" id="insert">insert(userId, body=None, media_body=None, internalDateSource=None, deleted=None)</code>
+ <code class="details" id="insert">insert(userId, body=None, media_body=None, internalDateSource=None, media_mime_type=None, deleted=None)</code>
<pre>Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message.
Args:
@@ -301,9 +329,9 @@
"historyId": "A String", # The ID of the last history record that modified this message.
"payload": { # A single MIME message part. # The parsed email structure in the message parts.
"body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
- "data": "A String", # The body data of a MIME message part. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
+ "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
"attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
- "size": 42, # Total number of bytes in the body of the message part.
+ "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
},
"mimeType": "A String", # The MIME type of the message part.
"partId": "A String", # The immutable ID of the message part.
@@ -336,6 +364,7 @@
Allowed values
dateHeader -
receivedTime -
+ media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
deleted: boolean, Mark the email as permanently deleted (not TRASH) and only visible in Google Apps Vault to a Vault administrator. Only used for Google Apps for Work accounts.
Returns:
@@ -346,9 +375,9 @@
"historyId": "A String", # The ID of the last history record that modified this message.
"payload": { # A single MIME message part. # The parsed email structure in the message parts.
"body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
- "data": "A String", # The body data of a MIME message part. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
+ "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
"attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
- "size": 42, # Total number of bytes in the body of the message part.
+ "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
},
"mimeType": "A String", # The MIME type of the message part.
"partId": "A String", # The immutable ID of the message part.
@@ -384,7 +413,7 @@
Args:
userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
labelIds: string, Only return messages with labels that match all of the specified label IDs. (repeated)
- q: string, Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread".
+ q: string, Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread". Parameter cannot be used when accessing the api using the gmail.metadata scope.
pageToken: string, Page token to retrieve a specific page of results in the list.
maxResults: integer, Maximum number of messages to return.
includeSpamTrash: boolean, Include messages from SPAM and TRASH in the results.
@@ -401,9 +430,9 @@
"historyId": "A String", # The ID of the last history record that modified this message.
"payload": { # A single MIME message part. # The parsed email structure in the message parts.
"body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
- "data": "A String", # The body data of a MIME message part. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
+ "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
"attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
- "size": 42, # Total number of bytes in the body of the message part.
+ "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
},
"mimeType": "A String", # The MIME type of the message part.
"partId": "A String", # The immutable ID of the message part.
@@ -476,9 +505,9 @@
"historyId": "A String", # The ID of the last history record that modified this message.
"payload": { # A single MIME message part. # The parsed email structure in the message parts.
"body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
- "data": "A String", # The body data of a MIME message part. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
+ "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
"attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
- "size": 42, # Total number of bytes in the body of the message part.
+ "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
},
"mimeType": "A String", # The MIME type of the message part.
"partId": "A String", # The immutable ID of the message part.
@@ -508,7 +537,7 @@
</div>
<div class="method">
- <code class="details" id="send">send(userId, body=None, media_body=None)</code>
+ <code class="details" id="send">send(userId, body=None, media_body=None, media_mime_type=None)</code>
<pre>Sends the specified message to the recipients in the To, Cc, and Bcc headers.
Args:
@@ -521,9 +550,9 @@
"historyId": "A String", # The ID of the last history record that modified this message.
"payload": { # A single MIME message part. # The parsed email structure in the message parts.
"body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
- "data": "A String", # The body data of a MIME message part. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
+ "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
"attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
- "size": 42, # Total number of bytes in the body of the message part.
+ "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
},
"mimeType": "A String", # The MIME type of the message part.
"partId": "A String", # The immutable ID of the message part.
@@ -552,6 +581,7 @@
}
media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
+ media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Returns:
An object of the form:
@@ -561,9 +591,9 @@
"historyId": "A String", # The ID of the last history record that modified this message.
"payload": { # A single MIME message part. # The parsed email structure in the message parts.
"body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
- "data": "A String", # The body data of a MIME message part. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
+ "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
"attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
- "size": 42, # Total number of bytes in the body of the message part.
+ "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
},
"mimeType": "A String", # The MIME type of the message part.
"partId": "A String", # The immutable ID of the message part.
@@ -608,9 +638,9 @@
"historyId": "A String", # The ID of the last history record that modified this message.
"payload": { # A single MIME message part. # The parsed email structure in the message parts.
"body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
- "data": "A String", # The body data of a MIME message part. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
+ "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
"attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
- "size": 42, # Total number of bytes in the body of the message part.
+ "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
},
"mimeType": "A String", # The MIME type of the message part.
"partId": "A String", # The immutable ID of the message part.
@@ -655,9 +685,9 @@
"historyId": "A String", # The ID of the last history record that modified this message.
"payload": { # A single MIME message part. # The parsed email structure in the message parts.
"body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
- "data": "A String", # The body data of a MIME message part. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
+ "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
"attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
- "size": 42, # Total number of bytes in the body of the message part.
+ "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
},
"mimeType": "A String", # The MIME type of the message part.
"partId": "A String", # The immutable ID of the message part.