generated/google/apis/gmail_v1/service.rb in google-api-client-0.9.3 vs generated/google/apis/gmail_v1/service.rb in google-api-client-0.9.4
- old
+ new
@@ -20,11 +20,11 @@
module Google
module Apis
module GmailV1
# Gmail API
#
- # The Gmail REST API.
+ # Access Gmail mailboxes including sending user email.
#
# @example
# require 'google/apis/gmail_v1'
#
# Gmail = Google::Apis::GmailV1 # Alias the module
@@ -292,10 +292,12 @@
# Lists the drafts in the user's mailbox.
# @param [String] user_id
# The user's email address. The special value me can be used to indicate the
# authenticated user.
+ # @param [Boolean] include_spam_trash
+ # Include drafts from SPAM and TRASH in the results.
# @param [Fixnum] max_results
# Maximum number of drafts to return.
# @param [String] page_token
# Page token to retrieve a specific page of results in the list.
# @param [String] fields
@@ -317,15 +319,16 @@
# @return [Google::Apis::GmailV1::ListDraftsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
- def list_user_drafts(user_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
+ def list_user_drafts(user_id, include_spam_trash: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{userId}/drafts', options)
command.response_representation = Google::Apis::GmailV1::ListDraftsResponse::Representation
command.response_class = Google::Apis::GmailV1::ListDraftsResponse
command.params['userId'] = user_id unless user_id.nil?
+ command.query['includeSpamTrash'] = include_spam_trash unless include_spam_trash.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
@@ -720,9 +723,47 @@
command.request_object = label_object
command.response_representation = Google::Apis::GmailV1::Label::Representation
command.response_class = Google::Apis::GmailV1::Label
command.params['userId'] = user_id unless user_id.nil?
command.params['id'] = id unless id.nil?
+ command.query['fields'] = fields unless fields.nil?
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
+ command.query['userIp'] = user_ip unless user_ip.nil?
+ execute_or_queue_command(command, &block)
+ end
+
+ # Deletes many messages by message ID. Provides no guarantees that messages were
+ # not already deleted or even existed at all.
+ # @param [String] user_id
+ # The user's email address. The special value me can be used to indicate the
+ # authenticated user.
+ # @param [Google::Apis::GmailV1::BatchDeleteMessagesRequest] batch_delete_messages_request_object
+ # @param [String] fields
+ # Selector specifying which fields to include in a partial response.
+ # @param [String] quota_user
+ # Available to use for quota purposes for server-side applications. Can be any
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
+ # Overrides userIp if both are provided.
+ # @param [String] user_ip
+ # IP address of the site where the request originates. Use this if you want to
+ # enforce per-user limits.
+ # @param [Google::Apis::RequestOptions] options
+ # Request-specific options
+ #
+ # @yield [result, err] Result & error if block supplied
+ # @yieldparam result [NilClass] No result returned for this method
+ # @yieldparam err [StandardError] error object if request failed
+ #
+ # @return [void]
+ #
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
+ def batch_delete_messages(user_id, batch_delete_messages_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
+ command = make_simple_command(:post, '{userId}/messages/batchDelete', options)
+ command.request_representation = Google::Apis::GmailV1::BatchDeleteMessagesRequest::Representation
+ command.request_object = batch_delete_messages_request_object
+ command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end