Class: Google::Apis::GmailV1::GmailService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::GmailV1::GmailService
- Defined in:
- generated/google/apis/gmail_v1/service.rb
Overview
Gmail API
Access Gmail mailboxes including sending user email.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
An opaque string that represents a user for quota purposes.
-
#user_ip ⇒ String
Deprecated.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#batch_delete_messages(user_id, batch_delete_messages_request_object = nil, fields: nil, quota_user: nil, user_ip: 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, user_ip: 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, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Draft
Creates a new draft with the DRAFT label.
-
#create_user_label(user_id, label_object = nil, fields: nil, quota_user: nil, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... }
Immediately and permanently deletes the specified draft.
-
#delete_user_label(user_id, id, fields: nil, quota_user: nil, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... }
Deletes a filter.
-
#delete_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, user_ip: 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, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... }
Deletes the specified send-as alias.
-
#delete_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Draft
Gets the specified draft.
-
#get_user_label(user_id, id, fields: nil, quota_user: nil, user_ip: 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, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::MessagePartBody
Gets the specified message attachment.
-
#get_user_profile(user_id, fields: nil, quota_user: nil, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ImapSettings
Gets IMAP settings.
-
#get_user_setting_pop(user_id, fields: nil, quota_user: nil, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Label
Updates the specified label.
-
#patch_user_setting_send_as(user_id, send_as_email, send_as_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::SendAs
Updates a send-as alias.
-
#send_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, user_ip: 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.
-
#send_user_message(user_id, message_object = nil, fields: nil, quota_user: nil, user_ip: 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.
-
#set_user_setting_send_a_smime_info_default(user_id, send_as_email, id, fields: nil, quota_user: nil, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ImapSettings
Updates IMAP settings.
-
#update_user_setting_pop(user_id, pop_settings_object = nil, fields: nil, quota_user: nil, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::WatchResponse
Set up or update a push notification watch on the given user mailbox.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ GmailService
Returns a new instance of GmailService
49 50 51 52 |
# File 'generated/google/apis/gmail_v1/service.rb', line 49 def initialize super('https://www.googleapis.com/', 'gmail/v1/users/') @batch_path = 'batch/gmail/v1' 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.
38 39 40 |
# File 'generated/google/apis/gmail_v1/service.rb', line 38 def key @key end |
#quota_user ⇒ String
Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
43 44 45 |
# File 'generated/google/apis/gmail_v1/service.rb', line 43 def quota_user @quota_user end |
#user_ip ⇒ String
Returns Deprecated. Please use quotaUser instead.
47 48 49 |
# File 'generated/google/apis/gmail_v1/service.rb', line 47 def user_ip @user_ip end |
Instance Method Details
#batch_delete_messages(user_id, batch_delete_messages_request_object = nil, fields: nil, quota_user: nil, user_ip: 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.
734 735 736 737 738 739 740 741 742 743 |
# File 'generated/google/apis/gmail_v1/service.rb', line 734 def (user_id, = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#batch_modify_messages(user_id, batch_modify_messages_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Modifies the labels on the specified messages.
769 770 771 772 773 774 775 776 777 778 |
# File 'generated/google/apis/gmail_v1/service.rb', line 769 def (user_id, = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#create_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Draft
Creates a new draft with the DRAFT label.
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'generated/google/apis/gmail_v1/service.rb', line 185 def create_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, '{userId}/drafts', ) else command = make_upload_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#create_user_label(user_id, label_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Label
Creates a new label.
509 510 511 512 513 514 515 516 517 518 519 520 |
# File 'generated/google/apis/gmail_v1/service.rb', line 509 def create_user_label(user_id, label_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#create_user_setting_delegate(user_id, delegate_object = nil, fields: nil, quota_user: nil, user_ip: 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 limtations 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.
1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1553 def create_user_setting_delegate(user_id, delegate_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#create_user_setting_filter(user_id, filter_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Filter
Creates a filter.
1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1707 def create_user_setting_filter(user_id, filter_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#create_user_setting_forwarding_address(user_id, forwarding_address_object = nil, fields: nil, quota_user: nil, user_ip: 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.
1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1855 def create_user_setting_forwarding_address(user_id, forwarding_address_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#create_user_setting_send_as(user_id, send_as_object = nil, fields: nil, quota_user: nil, user_ip: 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.
2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2009 def create_user_setting_send_as(user_id, send_as_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_user_draft(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Immediately and permanently deletes the specified draft. Does not simply trash it.
230 231 232 233 234 235 236 237 238 |
# File 'generated/google/apis/gmail_v1/service.rb', line 230 def delete_user_draft(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_user_label(user_id, id, fields: nil, quota_user: nil, user_ip: 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.
548 549 550 551 552 553 554 555 556 |
# File 'generated/google/apis/gmail_v1/service.rb', line 548 def delete_user_label(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_user_message(user_id, id, fields: nil, quota_user: nil, user_ip: 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.
806 807 808 809 810 811 812 813 814 |
# File 'generated/google/apis/gmail_v1/service.rb', line 806 def (user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_user_setting_delegate(user_id, delegate_email, fields: nil, quota_user: nil, user_ip: 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.
1596 1597 1598 1599 1600 1601 1602 1603 1604 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1596 def delete_user_setting_delegate(user_id, delegate_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_user_setting_filter(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a filter.
1745 1746 1747 1748 1749 1750 1751 1752 1753 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1745 def delete_user_setting_filter(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, user_ip: 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.
1896 1897 1898 1899 1900 1901 1902 1903 1904 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1896 def delete_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes the specified S/MIME config for the specified send-as alias.
2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2287 def delete_user_setting_send_a_smime_info(user_id, send_as_email, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: 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.
2050 2051 2052 2053 2054 2055 2056 2057 2058 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2050 def delete_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: 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.
2484 2485 2486 2487 2488 2489 2490 2491 2492 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2484 def delete_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_draft(user_id, id, format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Draft
Gets the specified draft.
267 268 269 270 271 272 273 274 275 276 277 278 |
# File 'generated/google/apis/gmail_v1/service.rb', line 267 def get_user_draft(user_id, id, format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_label(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Label
Gets the specified label.
583 584 585 586 587 588 589 590 591 592 593 |
# File 'generated/google/apis/gmail_v1/service.rb', line 583 def get_user_label(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_message(user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Gets the specified message.
845 846 847 848 849 850 851 852 853 854 855 856 857 |
# File 'generated/google/apis/gmail_v1/service.rb', line 845 def (user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_message_attachment(user_id, message_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::MessagePartBody
Gets the specified message attachment.
1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1218 def (user_id, , id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_profile(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Profile
Gets the current user's Gmail profile.
77 78 79 80 81 82 83 84 85 86 |
# File 'generated/google/apis/gmail_v1/service.rb', line 77 def get_user_profile(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_setting_auto_forwarding(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::AutoForwarding
Gets the auto-forwarding setting for the specified account.
1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1254 def get_user_setting_auto_forwarding(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_setting_delegate(user_id, delegate_email, fields: nil, quota_user: nil, user_ip: 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.
1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1635 def get_user_setting_delegate(user_id, delegate_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_setting_filter(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Filter
Gets a filter.
1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1780 def get_user_setting_filter(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ForwardingAddress
Gets the specified forwarding address.
1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1931 def get_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_setting_imap(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ImapSettings
Gets IMAP settings.
1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1288 def get_user_setting_imap(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_setting_pop(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::PopSettings
Gets POP settings.
1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1322 def get_user_setting_pop(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::SmimeInfo
Gets the specified S/MIME config for the specified send-as alias.
2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2326 def get_user_setting_send_a_smime_info(user_id, send_as_email, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: 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.
2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2086 def get_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_setting_vacation(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::VacationSettings
Gets vacation responder settings.
1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1356 def get_user_setting_vacation(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_thread(user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Thread
Gets the specified thread.
2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2523 def get_user_thread(user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: 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.
900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 |
# File 'generated/google/apis/gmail_v1/service.rb', line 900 def (user_id, = nil, deleted: nil, internal_date_source: nil, never_mark_spam: nil, process_for_calendar: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, '{userId}/messages/import', ) else command = make_upload_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: 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.
957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 |
# File 'generated/google/apis/gmail_v1/service.rb', line 957 def (user_id, = nil, deleted: nil, internal_date_source: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, '{userId}/messages', ) else command = make_upload_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: 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.
2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2367 def insert_user_setting_send_a_smime_info(user_id, send_as_email, smime_info_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListDraftsResponse
Lists the drafts in the user's mailbox.
313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'generated/google/apis/gmail_v1/service.rb', line 313 def list_user_drafts(user_id, include_spam_trash: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: 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).
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 |
# File 'generated/google/apis/gmail_v1/service.rb', line 469 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, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_user_labels(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListLabelsResponse
Lists all labels in the user's mailbox.
618 619 620 621 622 623 624 625 626 627 |
# File 'generated/google/apis/gmail_v1/service.rb', line 618 def list_user_labels(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListMessagesResponse
Lists the messages in the user's mailbox.
1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1014 def (user_id, include_spam_trash: nil, label_ids: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_user_setting_delegates(user_id, fields: nil, quota_user: nil, user_ip: 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.
1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1672 def list_user_setting_delegates(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_user_setting_filters(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListFiltersResponse
Lists the message filters of a Gmail user.
1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1815 def list_user_setting_filters(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_user_setting_forwarding_addresses(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListForwardingAddressesResponse
Lists the forwarding addresses for the specified account.
1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1966 def list_user_setting_forwarding_addresses(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListSmimeInfoResponse
Lists S/MIME configs for the specified send-as alias.
2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2407 def list_user_setting_send_a_smime_infos(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_user_setting_send_as(user_id, fields: nil, quota_user: nil, user_ip: 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.
2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2123 def list_user_setting_send_as(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ListThreadsResponse
Lists the threads in the user's mailbox.
2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2573 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, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#modify_message(user_id, id, modify_message_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Modifies the labels on the specified message.
1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1056 def (user_id, id, = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#modify_thread(user_id, id, modify_thread_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Thread
Modifies the labels applied to the thread. This applies to all messages in the thread.
2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2616 def modify_thread(user_id, id, modify_thread_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#patch_user_label(user_id, id, label_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Label
Updates the specified label. This method supports patch semantics.
655 656 657 658 659 660 661 662 663 664 665 666 667 |
# File 'generated/google/apis/gmail_v1/service.rb', line 655 def patch_user_label(user_id, id, label_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, '{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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: 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. This method supports patch semantics.
2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2164 def patch_user_setting_send_as(user_id, send_as_email, send_as_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#send_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, user_ip: 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.
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
# File 'generated/google/apis/gmail_v1/service.rb', line 357 def send_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, '{userId}/drafts/send', ) else command = make_upload_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#send_user_message(user_id, message_object = nil, fields: nil, quota_user: nil, user_ip: 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.
1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1098 def (user_id, = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, '{userId}/messages/send', ) else command = make_upload_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Sets the default S/MIME config for the specified send-as alias.
2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2447 def set_user_setting_send_a_smime_info_default(user_id, send_as_email, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#stop_user(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Stop receiving push notifications for the given user mailbox.
111 112 113 114 115 116 117 118 |
# File 'generated/google/apis/gmail_v1/service.rb', line 111 def stop_user(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#trash_user_message(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Moves the specified message to the trash.
1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1142 def (user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#trash_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Thread
Moves the specified thread to the trash.
2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2655 def trash_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#untrash_user_message(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Message
Removes the specified message from the trash.
1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1179 def (user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#untrash_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Thread
Removes the specified thread from the trash.
2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2692 def untrash_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_user_draft(user_id, id, draft_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Draft
Replaces a draft's content.
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'generated/google/apis/gmail_v1/service.rb', line 406 def update_user_draft(user_id, id, draft_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:put, '{userId}/drafts/{id}', ) else command = make_upload_command(:put, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_user_label(user_id, id, label_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Label
Updates the specified label.
695 696 697 698 699 700 701 702 703 704 705 706 707 |
# File 'generated/google/apis/gmail_v1/service.rb', line 695 def update_user_label(user_id, id, label_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_user_setting_auto_forwarding(user_id, auto_forwarding_object = nil, fields: nil, quota_user: nil, user_ip: 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.
1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1394 def update_user_setting_auto_forwarding(user_id, auto_forwarding_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_user_setting_imap(user_id, imap_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::ImapSettings
Updates IMAP settings.
1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1431 def update_user_setting_imap(user_id, imap_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_user_setting_pop(user_id, pop_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::PopSettings
Updates POP settings.
1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1468 def update_user_setting_pop(user_id, pop_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, '{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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: 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.
2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2207 def update_user_setting_send_as(user_id, send_as_email, send_as_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_user_setting_vacation(user_id, vacation_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::VacationSettings
Updates vacation responder settings.
1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1505 def update_user_setting_vacation(user_id, vacation_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#verify_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: 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.
2249 2250 2251 2252 2253 2254 2255 2256 2257 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2249 def verify_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#watch_user(user_id, watch_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::WatchResponse
Set up or update a push notification watch on the given user mailbox.
144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'generated/google/apis/gmail_v1/service.rb', line 144 def watch_user(user_id, watch_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |