Class: Google::Apis::GmailV1::GmailService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::GmailV1::GmailService
- Defined in:
- lib/google/apis/gmail_v1/service.rb
Overview
Gmail API
The Gmail API lets you view and manage Gmail mailbox data like threads, messages, and labels.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#batch_delete_messages(user_id, batch_delete_messages_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes many messages by message ID.
-
#batch_modify_messages(user_id, batch_modify_messages_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Modifies the labels on the specified messages.
-
#create_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Draft
Creates a new draft with the
DRAFTlabel. -
#create_user_label(user_id, label_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Label
Creates a new label.
-
#create_user_setting_delegate(user_id, delegate_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Delegate
Adds a delegate with its verification status set directly to
accepted, without sending any verification email. -
#create_user_setting_filter(user_id, filter_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Filter
Creates a filter.
-
#create_user_setting_forwarding_address(user_id, forwarding_address_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ForwardingAddress
Creates a forwarding address.
-
#create_user_setting_send_as(user_id, send_as_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::SendAs
Creates a custom "from" send-as alias.
-
#delete_user_draft(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Immediately and permanently deletes the specified draft.
-
#delete_user_label(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.
-
#delete_user_message(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Immediately and permanently deletes the specified message.
-
#delete_user_setting_delegate(user_id, delegate_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Removes the specified delegate (which can be of any verification status), and revokes any verification that may have been required for using it.
-
#delete_user_setting_filter(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes a filter.
-
#delete_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes the specified forwarding address and revokes any verification that may have been required.
-
#delete_user_setting_send_a_smime_info(user_id, send_as_email, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes the specified S/MIME config for the specified send-as alias.
-
#delete_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes the specified send-as alias.
-
#delete_user_thread(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Immediately and permanently deletes the specified thread.
-
#get_user_draft(user_id, id, format: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Draft
Gets the specified draft.
-
#get_user_label(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Label
Gets the specified label.
-
#get_user_message(user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Gets the specified message.
-
#get_user_message_attachment(user_id, message_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::MessagePartBody
Gets the specified message attachment.
-
#get_user_profile(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Profile
Gets the current user's Gmail profile.
-
#get_user_setting_auto_forwarding(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::AutoForwarding
Gets the auto-forwarding setting for the specified account.
-
#get_user_setting_delegate(user_id, delegate_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Delegate
Gets the specified delegate.
-
#get_user_setting_filter(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Filter
Gets a filter.
-
#get_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ForwardingAddress
Gets the specified forwarding address.
-
#get_user_setting_imap(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ImapSettings
Gets IMAP settings.
-
#get_user_setting_language(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::LanguageSettings
Gets language settings.
-
#get_user_setting_pop(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::PopSettings
Gets POP settings.
-
#get_user_setting_send_a_smime_info(user_id, send_as_email, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::SmimeInfo
Gets the specified S/MIME config for the specified send-as alias.
-
#get_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::SendAs
Gets the specified send-as alias.
-
#get_user_setting_vacation(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::VacationSettings
Gets vacation responder settings.
-
#get_user_thread(user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Thread
Gets the specified thread.
-
#import_user_message(user_id, message_object = nil, deleted: nil, internal_date_source: nil, never_mark_spam: nil, process_for_calendar: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP.
-
#initialize ⇒ GmailService
constructor
A new instance of GmailService.
-
#insert_user_message(user_id, message_object = nil, deleted: nil, internal_date_source: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Directly inserts a message into only this user's mailbox similar to
IMAP APPEND, bypassing most scanning and classification. -
#insert_user_setting_send_a_smime_info(user_id, send_as_email, smime_info_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::SmimeInfo
Insert (upload) the given S/MIME config for the specified send-as alias.
-
#list_user_drafts(user_id, include_spam_trash: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListDraftsResponse
Lists the drafts in the user's mailbox.
-
#list_user_histories(user_id, history_types: nil, label_id: nil, max_results: nil, page_token: nil, start_history_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListHistoryResponse
Lists the history of all changes to the given mailbox.
-
#list_user_labels(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListLabelsResponse
Lists all labels in the user's mailbox.
-
#list_user_messages(user_id, include_spam_trash: nil, label_ids: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListMessagesResponse
Lists the messages in the user's mailbox.
-
#list_user_setting_delegates(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListDelegatesResponse
Lists the delegates for the specified account.
-
#list_user_setting_filters(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListFiltersResponse
Lists the message filters of a Gmail user.
-
#list_user_setting_forwarding_addresses(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListForwardingAddressesResponse
Lists the forwarding addresses for the specified account.
-
#list_user_setting_send_a_smime_infos(user_id, send_as_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListSmimeInfoResponse
Lists S/MIME configs for the specified send-as alias.
-
#list_user_setting_send_as(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListSendAsResponse
Lists the send-as aliases for the specified account.
-
#list_user_threads(user_id, include_spam_trash: nil, label_ids: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListThreadsResponse
Lists the threads in the user's mailbox.
-
#modify_message(user_id, id, modify_message_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Modifies the labels on the specified message.
-
#modify_thread(user_id, id, modify_thread_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Thread
Modifies the labels applied to the thread.
-
#patch_user_label(user_id, id, label_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Label
Patch the specified label.
-
#patch_user_setting_send_as(user_id, send_as_email, send_as_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::SendAs
Patch the specified send-as alias.
-
#send_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Sends the specified, existing draft to the recipients in the
To,Cc, andBccheaders. -
#send_user_message(user_id, message_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Sends the specified message to the recipients in the
To,Cc, andBccheaders. -
#set_user_setting_send_a_smime_info_default(user_id, send_as_email, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Sets the default S/MIME config for the specified send-as alias.
-
#stop_user(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Stop receiving push notifications for the given user mailbox.
-
#trash_user_message(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Moves the specified message to the trash.
-
#trash_user_thread(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Thread
Moves the specified thread to the trash.
-
#untrash_user_message(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Removes the specified message from the trash.
-
#untrash_user_thread(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Thread
Removes the specified thread from the trash.
-
#update_user_draft(user_id, id, draft_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Draft
Replaces a draft's content.
-
#update_user_label(user_id, id, label_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Label
Updates the specified label.
-
#update_user_setting_auto_forwarding(user_id, auto_forwarding_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::AutoForwarding
Updates the auto-forwarding setting for the specified account.
-
#update_user_setting_imap(user_id, imap_settings_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ImapSettings
Updates IMAP settings.
-
#update_user_setting_language(user_id, language_settings_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::LanguageSettings
Updates language settings.
-
#update_user_setting_pop(user_id, pop_settings_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::PopSettings
Updates POP settings.
-
#update_user_setting_send_as(user_id, send_as_email, send_as_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::SendAs
Updates a send-as alias.
-
#update_user_setting_vacation(user_id, vacation_settings_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::VacationSettings
Updates vacation responder settings.
-
#verify_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Sends a verification email to the specified send-as alias address.
-
#watch_user(user_id, watch_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::WatchResponse
Set up or update a push notification watch on the given user mailbox.
Constructor Details
#initialize ⇒ GmailService
Returns a new instance of GmailService.
46 47 48 49 50 51 |
# File 'lib/google/apis/gmail_v1/service.rb', line 46 def initialize super('https://gmail.googleapis.com/', '', client_name: 'google-apis-gmail_v1', client_version: Google::Apis::GmailV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
39 40 41 |
# File 'lib/google/apis/gmail_v1/service.rb', line 39 def key @key end |
#quota_user ⇒ String
Returns 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.
44 45 46 |
# File 'lib/google/apis/gmail_v1/service.rb', line 44 def quota_user @quota_user end |
Instance Method Details
#batch_delete_messages(user_id, batch_delete_messages_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.
685 686 687 688 689 690 691 692 693 |
# File 'lib/google/apis/gmail_v1/service.rb', line 685 def (user_id, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/messages/batchDelete', ) command.request_representation = Google::Apis::GmailV1::BatchDeleteMessagesRequest::Representation command.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? execute_or_queue_command(command, &block) end |
#batch_modify_messages(user_id, batch_modify_messages_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Modifies the labels on the specified messages.
717 718 719 720 721 722 723 724 725 |
# File 'lib/google/apis/gmail_v1/service.rb', line 717 def (user_id, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/messages/batchModify', ) command.request_representation = Google::Apis::GmailV1::BatchModifyMessagesRequest::Representation command.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? execute_or_queue_command(command, &block) end |
#create_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Draft
Creates a new draft with the DRAFT label.
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/google/apis/gmail_v1/service.rb', line 173 def create_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, 'gmail/v1/users/{userId}/drafts', ) else command = make_upload_command(:post, 'gmail/v1/users/{userId}/drafts', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::GmailV1::Draft::Representation command.request_object = draft_object command.response_representation = Google::Apis::GmailV1::Draft::Representation command.response_class = Google::Apis::GmailV1::Draft 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? execute_or_queue_command(command, &block) end |
#create_user_label(user_id, label_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Label
Creates a new label.
478 479 480 481 482 483 484 485 486 487 488 |
# File 'lib/google/apis/gmail_v1/service.rb', line 478 def create_user_label(user_id, label_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/labels', ) command.request_representation = Google::Apis::GmailV1::Label::Representation 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.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_user_setting_delegate(user_id, delegate_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Delegate
Adds a delegate with its verification status set directly to accepted,
without sending any verification email. The delegate user must be a member of
the same G Suite organization as the delegator user. Gmail imposes limitations
on the number of delegates and delegators each user in a G Suite organization
can have. These limits depend on your organization, but in general each user
can have up to 25 delegates and up to 10 delegators. Note that a delegate user
must be referred to by their primary email address, and not an email alias.
Also note that when a new delegate is created, there may be up to a one minute
delay before the new delegate is available for use. This method is only
available to service account clients that have been delegated domain-wide
authority.
1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1517 def create_user_setting_delegate(user_id, delegate_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/settings/delegates', ) command.request_representation = Google::Apis::GmailV1::Delegate::Representation command.request_object = delegate_object command.response_representation = Google::Apis::GmailV1::Delegate::Representation command.response_class = Google::Apis::GmailV1::Delegate 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? execute_or_queue_command(command, &block) end |
#create_user_setting_filter(user_id, filter_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Filter
Creates a filter. Note: you can only create a maximum of 1,000 filters.
1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1656 def create_user_setting_filter(user_id, filter_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/settings/filters', ) command.request_representation = Google::Apis::GmailV1::Filter::Representation command.request_object = filter_object command.response_representation = Google::Apis::GmailV1::Filter::Representation command.response_class = Google::Apis::GmailV1::Filter 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? execute_or_queue_command(command, &block) end |
#create_user_setting_forwarding_address(user_id, forwarding_address_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ForwardingAddress
Creates a forwarding address. If ownership verification is required, a message
will be sent to the recipient and the resource's verification status will be
set to pending; otherwise, the resource will be created with verification
status set to accepted. This method is only available to service account
clients that have been delegated domain-wide authority.
1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1791 def create_user_setting_forwarding_address(user_id, forwarding_address_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/settings/forwardingAddresses', ) command.request_representation = Google::Apis::GmailV1::ForwardingAddress::Representation command.request_object = forwarding_address_object command.response_representation = Google::Apis::GmailV1::ForwardingAddress::Representation command.response_class = Google::Apis::GmailV1::ForwardingAddress 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? execute_or_queue_command(command, &block) end |
#create_user_setting_send_as(user_id, send_as_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::SendAs
Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail will
attempt to connect to the SMTP service to validate the configuration before
creating the alias. If ownership verification is required for the alias, a
message will be sent to the email address and the resource's verification
status will be set to pending; otherwise, the resource will be created with
verification status set to accepted. If a signature is provided, Gmail will
sanitize the HTML before saving it with the alias. This method is only
available to service account clients that have been delegated domain-wide
authority.
1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1932 def create_user_setting_send_as(user_id, send_as_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/settings/sendAs', ) command.request_representation = Google::Apis::GmailV1::SendAs::Representation command.request_object = send_as_object command.response_representation = Google::Apis::GmailV1::SendAs::Representation command.response_class = Google::Apis::GmailV1::SendAs 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? execute_or_queue_command(command, &block) end |
#delete_user_draft(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Immediately and permanently deletes the specified draft. Does not simply trash it.
215 216 217 218 219 220 221 222 |
# File 'lib/google/apis/gmail_v1/service.rb', line 215 def delete_user_draft(user_id, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'gmail/v1/users/{userId}/drafts/{id}', ) 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? execute_or_queue_command(command, &block) end |
#delete_user_label(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.
514 515 516 517 518 519 520 521 |
# File 'lib/google/apis/gmail_v1/service.rb', line 514 def delete_user_label(user_id, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'gmail/v1/users/{userId}/labels/{id}', ) 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? execute_or_queue_command(command, &block) end |
#delete_user_message(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Immediately and permanently deletes the specified message. This operation
cannot be undone. Prefer messages.trash instead.
751 752 753 754 755 756 757 758 |
# File 'lib/google/apis/gmail_v1/service.rb', line 751 def (user_id, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'gmail/v1/users/{userId}/messages/{id}', ) 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? execute_or_queue_command(command, &block) end |
#delete_user_setting_delegate(user_id, delegate_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Removes the specified delegate (which can be of any verification status), and revokes any verification that may have been required for using it. Note that a delegate user must be referred to by their primary email address, and not an email alias. This method is only available to service account clients that have been delegated domain-wide authority.
1556 1557 1558 1559 1560 1561 1562 1563 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1556 def delete_user_setting_delegate(user_id, delegate_email, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'gmail/v1/users/{userId}/settings/delegates/{delegateEmail}', ) command.params['userId'] = user_id unless user_id.nil? command.params['delegateEmail'] = delegate_email unless delegate_email.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_user_setting_filter(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a filter.
1691 1692 1693 1694 1695 1696 1697 1698 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1691 def delete_user_setting_filter(user_id, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'gmail/v1/users/{userId}/settings/filters/{id}', ) 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? execute_or_queue_command(command, &block) end |
#delete_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes the specified forwarding address and revokes any verification that may have been required. This method is only available to service account clients that have been delegated domain-wide authority.
1828 1829 1830 1831 1832 1833 1834 1835 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1828 def delete_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}', ) command.params['userId'] = user_id unless user_id.nil? command.params['forwardingEmail'] = forwarding_email unless forwarding_email.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_user_setting_send_a_smime_info(user_id, send_as_email, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes the specified S/MIME config for the specified send-as alias.
2183 2184 2185 2186 2187 2188 2189 2190 2191 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2183 def delete_user_setting_send_a_smime_info(user_id, send_as_email, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}', ) command.params['userId'] = user_id unless user_id.nil? command.params['sendAsEmail'] = send_as_email unless send_as_email.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes the specified send-as alias. Revokes any verification that may have been required for using it. This method is only available to service account clients that have been delegated domain-wide authority.
1969 1970 1971 1972 1973 1974 1975 1976 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1969 def delete_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', ) command.params['userId'] = user_id unless user_id.nil? command.params['sendAsEmail'] = send_as_email unless send_as_email.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_user_thread(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Immediately and permanently deletes the specified thread. This operation
cannot be undone. Prefer threads.trash instead.
2365 2366 2367 2368 2369 2370 2371 2372 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2365 def delete_user_thread(user_id, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'gmail/v1/users/{userId}/threads/{id}', ) 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? execute_or_queue_command(command, &block) end |
#get_user_draft(user_id, id, format: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Draft
Gets the specified draft.
249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/google/apis/gmail_v1/service.rb', line 249 def get_user_draft(user_id, id, format: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/drafts/{id}', ) command.response_representation = Google::Apis::GmailV1::Draft::Representation command.response_class = Google::Apis::GmailV1::Draft command.params['userId'] = user_id unless user_id.nil? command.params['id'] = id unless id.nil? command.query['format'] = format unless format.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_label(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Label
Gets the specified label.
546 547 548 549 550 551 552 553 554 555 |
# File 'lib/google/apis/gmail_v1/service.rb', line 546 def get_user_label(user_id, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/labels/{id}', ) 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? execute_or_queue_command(command, &block) end |
#get_user_message(user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Gets the specified message.
789 790 791 792 793 794 795 796 797 798 799 800 |
# File 'lib/google/apis/gmail_v1/service.rb', line 789 def (user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/messages/{id}', ) command.response_representation = Google::Apis::GmailV1::Message::Representation command.response_class = Google::Apis::GmailV1::Message command.params['userId'] = user_id unless user_id.nil? command.params['id'] = id unless id.nil? command.query['format'] = format unless format.nil? command.query['metadataHeaders'] = unless .nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_message_attachment(user_id, message_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::MessagePartBody
Gets the specified message attachment.
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1141 def (user_id, , id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}', ) command.response_representation = Google::Apis::GmailV1::MessagePartBody::Representation command.response_class = Google::Apis::GmailV1::MessagePartBody command.params['userId'] = user_id unless user_id.nil? command.params['messageId'] = unless .nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_profile(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Profile
Gets the current user's Gmail profile.
74 75 76 77 78 79 80 81 82 |
# File 'lib/google/apis/gmail_v1/service.rb', line 74 def get_user_profile(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/profile', ) command.response_representation = Google::Apis::GmailV1::Profile::Representation command.response_class = Google::Apis::GmailV1::Profile 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? execute_or_queue_command(command, &block) end |
#get_user_setting_auto_forwarding(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::AutoForwarding
Gets the auto-forwarding setting for the specified account.
1174 1175 1176 1177 1178 1179 1180 1181 1182 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1174 def get_user_setting_auto_forwarding(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/autoForwarding', ) command.response_representation = Google::Apis::GmailV1::AutoForwarding::Representation command.response_class = Google::Apis::GmailV1::AutoForwarding 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? execute_or_queue_command(command, &block) end |
#get_user_setting_delegate(user_id, delegate_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Delegate
Gets the specified delegate. Note that a delegate user must be referred to by their primary email address, and not an email alias. This method is only available to service account clients that have been delegated domain-wide authority.
1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1591 def get_user_setting_delegate(user_id, delegate_email, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/delegates/{delegateEmail}', ) command.response_representation = Google::Apis::GmailV1::Delegate::Representation command.response_class = Google::Apis::GmailV1::Delegate command.params['userId'] = user_id unless user_id.nil? command.params['delegateEmail'] = delegate_email unless delegate_email.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_setting_filter(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Filter
Gets a filter.
1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1723 def get_user_setting_filter(user_id, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/filters/{id}', ) command.response_representation = Google::Apis::GmailV1::Filter::Representation command.response_class = Google::Apis::GmailV1::Filter 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? execute_or_queue_command(command, &block) end |
#get_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ForwardingAddress
Gets the specified forwarding address.
1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1860 def get_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}', ) command.response_representation = Google::Apis::GmailV1::ForwardingAddress::Representation command.response_class = Google::Apis::GmailV1::ForwardingAddress command.params['userId'] = user_id unless user_id.nil? command.params['forwardingEmail'] = forwarding_email unless forwarding_email.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_setting_imap(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ImapSettings
Gets IMAP settings.
1205 1206 1207 1208 1209 1210 1211 1212 1213 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1205 def get_user_setting_imap(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/imap', ) command.response_representation = Google::Apis::GmailV1::ImapSettings::Representation command.response_class = Google::Apis::GmailV1::ImapSettings 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? execute_or_queue_command(command, &block) end |
#get_user_setting_language(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::LanguageSettings
Gets language settings.
1236 1237 1238 1239 1240 1241 1242 1243 1244 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1236 def get_user_setting_language(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/language', ) command.response_representation = Google::Apis::GmailV1::LanguageSettings::Representation command.response_class = Google::Apis::GmailV1::LanguageSettings 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? execute_or_queue_command(command, &block) end |
#get_user_setting_pop(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::PopSettings
Gets POP settings.
1267 1268 1269 1270 1271 1272 1273 1274 1275 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1267 def get_user_setting_pop(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/pop', ) command.response_representation = Google::Apis::GmailV1::PopSettings::Representation command.response_class = Google::Apis::GmailV1::PopSettings 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? execute_or_queue_command(command, &block) end |
#get_user_setting_send_a_smime_info(user_id, send_as_email, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::SmimeInfo
Gets the specified S/MIME config for the specified send-as alias.
2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2219 def get_user_setting_send_a_smime_info(user_id, send_as_email, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}', ) command.response_representation = Google::Apis::GmailV1::SmimeInfo::Representation command.response_class = Google::Apis::GmailV1::SmimeInfo command.params['userId'] = user_id unless user_id.nil? command.params['sendAsEmail'] = send_as_email unless send_as_email.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::SendAs
Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a member of the collection.
2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2002 def get_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', ) command.response_representation = Google::Apis::GmailV1::SendAs::Representation command.response_class = Google::Apis::GmailV1::SendAs command.params['userId'] = user_id unless user_id.nil? command.params['sendAsEmail'] = send_as_email unless send_as_email.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_setting_vacation(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::VacationSettings
Gets vacation responder settings.
1298 1299 1300 1301 1302 1303 1304 1305 1306 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1298 def get_user_setting_vacation(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/vacation', ) command.response_representation = Google::Apis::GmailV1::VacationSettings::Representation command.response_class = Google::Apis::GmailV1::VacationSettings 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? execute_or_queue_command(command, &block) end |
#get_user_thread(user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Thread
Gets the specified thread.
2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2401 def get_user_thread(user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/threads/{id}', ) command.response_representation = Google::Apis::GmailV1::Thread::Representation command.response_class = Google::Apis::GmailV1::Thread command.params['userId'] = user_id unless user_id.nil? command.params['id'] = id unless id.nil? command.query['format'] = format unless format.nil? command.query['metadataHeaders'] = unless .nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#import_user_message(user_id, message_object = nil, deleted: nil, internal_date_source: nil, never_mark_spam: nil, process_for_calendar: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
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. Note: This function doesn't trigger forwarding rules or filters set up by the user.
842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 |
# File 'lib/google/apis/gmail_v1/service.rb', line 842 def (user_id, = nil, deleted: nil, internal_date_source: nil, never_mark_spam: nil, process_for_calendar: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, 'gmail/v1/users/{userId}/messages/import', ) else command = make_upload_command(:post, 'gmail/v1/users/{userId}/messages/import', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::GmailV1::Message::Representation command.request_object = command.response_representation = Google::Apis::GmailV1::Message::Representation command.response_class = Google::Apis::GmailV1::Message command.params['userId'] = user_id unless user_id.nil? command.query['deleted'] = deleted unless deleted.nil? command.query['internalDateSource'] = internal_date_source unless internal_date_source.nil? command.query['neverMarkSpam'] = never_mark_spam unless never_mark_spam.nil? command.query['processForCalendar'] = process_for_calendar unless process_for_calendar.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_user_message(user_id, message_object = nil, deleted: nil, internal_date_source: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Directly inserts a message into only this user's mailbox similar to IMAP
APPEND, bypassing most scanning and classification. Does not send a message.
896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 |
# File 'lib/google/apis/gmail_v1/service.rb', line 896 def (user_id, = nil, deleted: nil, internal_date_source: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, 'gmail/v1/users/{userId}/messages', ) else command = make_upload_command(:post, 'gmail/v1/users/{userId}/messages', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::GmailV1::Message::Representation command.request_object = command.response_representation = Google::Apis::GmailV1::Message::Representation command.response_class = Google::Apis::GmailV1::Message command.params['userId'] = user_id unless user_id.nil? command.query['deleted'] = deleted unless deleted.nil? command.query['internalDateSource'] = internal_date_source unless internal_date_source.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_user_setting_send_a_smime_info(user_id, send_as_email, smime_info_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::SmimeInfo
Insert (upload) the given S/MIME config for the specified send-as alias. Note that pkcs12 format is required for the key.
2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2257 def insert_user_setting_send_a_smime_info(user_id, send_as_email, smime_info_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo', ) command.request_representation = Google::Apis::GmailV1::SmimeInfo::Representation command.request_object = smime_info_object command.response_representation = Google::Apis::GmailV1::SmimeInfo::Representation command.response_class = Google::Apis::GmailV1::SmimeInfo command.params['userId'] = user_id unless user_id.nil? command.params['sendAsEmail'] = send_as_email unless send_as_email.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_user_drafts(user_id, include_spam_trash: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListDraftsResponse
Lists the drafts in the user's mailbox.
293 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/google/apis/gmail_v1/service.rb', line 293 def list_user_drafts(user_id, include_spam_trash: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/drafts', ) 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['q'] = q unless q.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_user_histories(user_id, history_types: nil, label_id: nil, max_results: nil, page_token: nil, start_history_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListHistoryResponse
Lists the history of all changes to the given mailbox. History results are
returned in chronological order (increasing historyId).
441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/google/apis/gmail_v1/service.rb', line 441 def list_user_histories(user_id, history_types: nil, label_id: nil, max_results: nil, page_token: nil, start_history_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/history', ) command.response_representation = Google::Apis::GmailV1::ListHistoryResponse::Representation command.response_class = Google::Apis::GmailV1::ListHistoryResponse command.params['userId'] = user_id unless user_id.nil? command.query['historyTypes'] = history_types unless history_types.nil? command.query['labelId'] = label_id unless label_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['startHistoryId'] = start_history_id unless start_history_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_user_labels(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListLabelsResponse
Lists all labels in the user's mailbox.
578 579 580 581 582 583 584 585 586 |
# File 'lib/google/apis/gmail_v1/service.rb', line 578 def list_user_labels(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/labels', ) command.response_representation = Google::Apis::GmailV1::ListLabelsResponse::Representation command.response_class = Google::Apis::GmailV1::ListLabelsResponse 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? execute_or_queue_command(command, &block) end |
#list_user_messages(user_id, include_spam_trash: nil, label_ids: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListMessagesResponse
Lists the messages in the user's mailbox.
951 952 953 954 955 956 957 958 959 960 961 962 963 964 |
# File 'lib/google/apis/gmail_v1/service.rb', line 951 def (user_id, include_spam_trash: nil, label_ids: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/messages', ) command.response_representation = Google::Apis::GmailV1::ListMessagesResponse::Representation command.response_class = Google::Apis::GmailV1::ListMessagesResponse command.params['userId'] = user_id unless user_id.nil? command.query['includeSpamTrash'] = include_spam_trash unless include_spam_trash.nil? command.query['labelIds'] = label_ids unless label_ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['q'] = q unless q.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_user_setting_delegates(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListDelegatesResponse
Lists the delegates for the specified account. This method is only available to service account clients that have been delegated domain-wide authority.
1624 1625 1626 1627 1628 1629 1630 1631 1632 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1624 def list_user_setting_delegates(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/delegates', ) command.response_representation = Google::Apis::GmailV1::ListDelegatesResponse::Representation command.response_class = Google::Apis::GmailV1::ListDelegatesResponse 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? execute_or_queue_command(command, &block) end |
#list_user_setting_filters(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListFiltersResponse
Lists the message filters of a Gmail user.
1755 1756 1757 1758 1759 1760 1761 1762 1763 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1755 def list_user_setting_filters(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/filters', ) command.response_representation = Google::Apis::GmailV1::ListFiltersResponse::Representation command.response_class = Google::Apis::GmailV1::ListFiltersResponse 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? execute_or_queue_command(command, &block) end |
#list_user_setting_forwarding_addresses(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListForwardingAddressesResponse
Lists the forwarding addresses for the specified account.
1892 1893 1894 1895 1896 1897 1898 1899 1900 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1892 def list_user_setting_forwarding_addresses(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/forwardingAddresses', ) command.response_representation = Google::Apis::GmailV1::ListForwardingAddressesResponse::Representation command.response_class = Google::Apis::GmailV1::ListForwardingAddressesResponse 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? execute_or_queue_command(command, &block) end |
#list_user_setting_send_a_smime_infos(user_id, send_as_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListSmimeInfoResponse
Lists S/MIME configs for the specified send-as alias.
2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2294 def list_user_setting_send_a_smime_infos(user_id, send_as_email, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo', ) command.response_representation = Google::Apis::GmailV1::ListSmimeInfoResponse::Representation command.response_class = Google::Apis::GmailV1::ListSmimeInfoResponse command.params['userId'] = user_id unless user_id.nil? command.params['sendAsEmail'] = send_as_email unless send_as_email.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_user_setting_send_as(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListSendAsResponse
Lists the send-as aliases for the specified account. The result includes the primary send-as address associated with the account as well as any custom " from" aliases.
2036 2037 2038 2039 2040 2041 2042 2043 2044 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2036 def list_user_setting_send_as(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/settings/sendAs', ) command.response_representation = Google::Apis::GmailV1::ListSendAsResponse::Representation command.response_class = Google::Apis::GmailV1::ListSendAsResponse 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? execute_or_queue_command(command, &block) end |
#list_user_threads(user_id, include_spam_trash: nil, label_ids: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListThreadsResponse
Lists the threads in the user's mailbox.
2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2449 def list_user_threads(user_id, include_spam_trash: nil, label_ids: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'gmail/v1/users/{userId}/threads', ) command.response_representation = Google::Apis::GmailV1::ListThreadsResponse::Representation command.response_class = Google::Apis::GmailV1::ListThreadsResponse command.params['userId'] = user_id unless user_id.nil? command.query['includeSpamTrash'] = include_spam_trash unless include_spam_trash.nil? command.query['labelIds'] = label_ids unless label_ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['q'] = q unless q.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#modify_message(user_id, id, modify_message_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Modifies the labels on the specified message.
990 991 992 993 994 995 996 997 998 999 1000 1001 |
# File 'lib/google/apis/gmail_v1/service.rb', line 990 def (user_id, id, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/messages/{id}/modify', ) command.request_representation = Google::Apis::GmailV1::ModifyMessageRequest::Representation command.request_object = command.response_representation = Google::Apis::GmailV1::Message::Representation command.response_class = Google::Apis::GmailV1::Message 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? execute_or_queue_command(command, &block) end |
#modify_thread(user_id, id, modify_thread_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Thread
Modifies the labels applied to the thread. This applies to all messages in the thread.
2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2489 def modify_thread(user_id, id, modify_thread_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/threads/{id}/modify', ) command.request_representation = Google::Apis::GmailV1::ModifyThreadRequest::Representation command.request_object = modify_thread_request_object command.response_representation = Google::Apis::GmailV1::Thread::Representation command.response_class = Google::Apis::GmailV1::Thread 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? execute_or_queue_command(command, &block) end |
#patch_user_label(user_id, id, label_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Label
Patch the specified label.
612 613 614 615 616 617 618 619 620 621 622 623 |
# File 'lib/google/apis/gmail_v1/service.rb', line 612 def patch_user_label(user_id, id, label_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'gmail/v1/users/{userId}/labels/{id}', ) command.request_representation = Google::Apis::GmailV1::Label::Representation 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? execute_or_queue_command(command, &block) end |
#patch_user_setting_send_as(user_id, send_as_email, send_as_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::SendAs
Patch the specified send-as alias.
2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2070 def patch_user_setting_send_as(user_id, send_as_email, send_as_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', ) command.request_representation = Google::Apis::GmailV1::SendAs::Representation command.request_object = send_as_object command.response_representation = Google::Apis::GmailV1::SendAs::Representation command.response_class = Google::Apis::GmailV1::SendAs command.params['userId'] = user_id unless user_id.nil? command.params['sendAsEmail'] = send_as_email unless send_as_email.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#send_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Sends the specified, existing draft to the recipients in the To, Cc, and
Bcc headers.
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/google/apis/gmail_v1/service.rb', line 334 def send_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, 'gmail/v1/users/{userId}/drafts/send', ) else command = make_upload_command(:post, 'gmail/v1/users/{userId}/drafts/send', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::GmailV1::Draft::Representation command.request_object = draft_object command.response_representation = Google::Apis::GmailV1::Message::Representation command.response_class = Google::Apis::GmailV1::Message 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? execute_or_queue_command(command, &block) end |
#send_user_message(user_id, message_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Sends the specified message to the recipients in the To, Cc, and Bcc
headers.
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1030 def (user_id, = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, 'gmail/v1/users/{userId}/messages/send', ) else command = make_upload_command(:post, 'gmail/v1/users/{userId}/messages/send', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::GmailV1::Message::Representation command.request_object = command.response_representation = Google::Apis::GmailV1::Message::Representation command.response_class = Google::Apis::GmailV1::Message 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? execute_or_queue_command(command, &block) end |
#set_user_setting_send_a_smime_info_default(user_id, send_as_email, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Sets the default S/MIME config for the specified send-as alias.
2331 2332 2333 2334 2335 2336 2337 2338 2339 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2331 def set_user_setting_send_a_smime_info_default(user_id, send_as_email, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault', ) command.params['userId'] = user_id unless user_id.nil? command.params['sendAsEmail'] = send_as_email unless send_as_email.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#stop_user(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Stop receiving push notifications for the given user mailbox.
105 106 107 108 109 110 111 |
# File 'lib/google/apis/gmail_v1/service.rb', line 105 def stop_user(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/stop', ) 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? execute_or_queue_command(command, &block) end |
#trash_user_message(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Moves the specified message to the trash.
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1071 def (user_id, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/messages/{id}/trash', ) command.response_representation = Google::Apis::GmailV1::Message::Representation command.response_class = Google::Apis::GmailV1::Message 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? execute_or_queue_command(command, &block) end |
#trash_user_thread(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Thread
Moves the specified thread to the trash.
2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2525 def trash_user_thread(user_id, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/threads/{id}/trash', ) command.response_representation = Google::Apis::GmailV1::Thread::Representation command.response_class = Google::Apis::GmailV1::Thread 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? execute_or_queue_command(command, &block) end |
#untrash_user_message(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Removes the specified message from the trash.
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1105 def (user_id, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/messages/{id}/untrash', ) command.response_representation = Google::Apis::GmailV1::Message::Representation command.response_class = Google::Apis::GmailV1::Message 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? execute_or_queue_command(command, &block) end |
#untrash_user_thread(user_id, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Thread
Removes the specified thread from the trash.
2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2559 def untrash_user_thread(user_id, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/threads/{id}/untrash', ) command.response_representation = Google::Apis::GmailV1::Thread::Representation command.response_class = Google::Apis::GmailV1::Thread 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? execute_or_queue_command(command, &block) end |
#update_user_draft(user_id, id, draft_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Draft
Replaces a draft's content.
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/google/apis/gmail_v1/service.rb', line 380 def update_user_draft(user_id, id, draft_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:put, 'gmail/v1/users/{userId}/drafts/{id}', ) else command = make_upload_command(:put, 'gmail/v1/users/{userId}/drafts/{id}', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::GmailV1::Draft::Representation command.request_object = draft_object command.response_representation = Google::Apis::GmailV1::Draft::Representation command.response_class = Google::Apis::GmailV1::Draft 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? execute_or_queue_command(command, &block) end |
#update_user_label(user_id, id, label_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Label
Updates the specified label.
649 650 651 652 653 654 655 656 657 658 659 660 |
# File 'lib/google/apis/gmail_v1/service.rb', line 649 def update_user_label(user_id, id, label_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'gmail/v1/users/{userId}/labels/{id}', ) command.request_representation = Google::Apis::GmailV1::Label::Representation 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? execute_or_queue_command(command, &block) end |
#update_user_setting_auto_forwarding(user_id, auto_forwarding_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::AutoForwarding
Updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled. This method is only available to service account clients that have been delegated domain-wide authority.
1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1333 def update_user_setting_auto_forwarding(user_id, auto_forwarding_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'gmail/v1/users/{userId}/settings/autoForwarding', ) command.request_representation = Google::Apis::GmailV1::AutoForwarding::Representation command.request_object = auto_forwarding_object command.response_representation = Google::Apis::GmailV1::AutoForwarding::Representation command.response_class = Google::Apis::GmailV1::AutoForwarding 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? execute_or_queue_command(command, &block) end |
#update_user_setting_imap(user_id, imap_settings_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ImapSettings
Updates IMAP settings.
1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1367 def update_user_setting_imap(user_id, imap_settings_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'gmail/v1/users/{userId}/settings/imap', ) command.request_representation = Google::Apis::GmailV1::ImapSettings::Representation command.request_object = imap_settings_object command.response_representation = Google::Apis::GmailV1::ImapSettings::Representation command.response_class = Google::Apis::GmailV1::ImapSettings 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? execute_or_queue_command(command, &block) end |
#update_user_setting_language(user_id, language_settings_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::LanguageSettings
Updates language settings. If successful, the return object contains the
displayLanguage that was saved for the user, which may differ from the value
passed into the request. This is because the requested displayLanguage may
not be directly supported by Gmail but have a close variant that is, and so
the variant may be chosen and saved instead.
1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1405 def update_user_setting_language(user_id, language_settings_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'gmail/v1/users/{userId}/settings/language', ) command.request_representation = Google::Apis::GmailV1::LanguageSettings::Representation command.request_object = language_settings_object command.response_representation = Google::Apis::GmailV1::LanguageSettings::Representation command.response_class = Google::Apis::GmailV1::LanguageSettings 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? execute_or_queue_command(command, &block) end |
#update_user_setting_pop(user_id, pop_settings_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::PopSettings
Updates POP settings.
1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1439 def update_user_setting_pop(user_id, pop_settings_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'gmail/v1/users/{userId}/settings/pop', ) command.request_representation = Google::Apis::GmailV1::PopSettings::Representation command.request_object = pop_settings_object command.response_representation = Google::Apis::GmailV1::PopSettings::Representation command.response_class = Google::Apis::GmailV1::PopSettings 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? execute_or_queue_command(command, &block) end |
#update_user_setting_send_as(user_id, send_as_email, send_as_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::SendAs
Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority.
2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2110 def update_user_setting_send_as(user_id, send_as_email, send_as_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', ) command.request_representation = Google::Apis::GmailV1::SendAs::Representation command.request_object = send_as_object command.response_representation = Google::Apis::GmailV1::SendAs::Representation command.response_class = Google::Apis::GmailV1::SendAs command.params['userId'] = user_id unless user_id.nil? command.params['sendAsEmail'] = send_as_email unless send_as_email.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_user_setting_vacation(user_id, vacation_settings_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::VacationSettings
Updates vacation responder settings.
1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 |
# File 'lib/google/apis/gmail_v1/service.rb', line 1473 def update_user_setting_vacation(user_id, vacation_settings_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'gmail/v1/users/{userId}/settings/vacation', ) command.request_representation = Google::Apis::GmailV1::VacationSettings::Representation command.request_object = vacation_settings_object command.response_representation = Google::Apis::GmailV1::VacationSettings::Representation command.response_class = Google::Apis::GmailV1::VacationSettings 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? execute_or_queue_command(command, &block) end |
#verify_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Sends a verification email to the specified send-as alias address. The
verification status must be pending. This method is only available to
service account clients that have been delegated domain-wide authority.
2148 2149 2150 2151 2152 2153 2154 2155 |
# File 'lib/google/apis/gmail_v1/service.rb', line 2148 def verify_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verify', ) command.params['userId'] = user_id unless user_id.nil? command.params['sendAsEmail'] = send_as_email unless send_as_email.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#watch_user(user_id, watch_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::WatchResponse
Set up or update a push notification watch on the given user mailbox.
135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/google/apis/gmail_v1/service.rb', line 135 def watch_user(user_id, watch_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'gmail/v1/users/{userId}/watch', ) command.request_representation = Google::Apis::GmailV1::WatchRequest::Representation command.request_object = watch_request_object command.response_representation = Google::Apis::GmailV1::WatchResponse::Representation command.response_class = Google::Apis::GmailV1::WatchResponse 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? execute_or_queue_command(command, &block) end |