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
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
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_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_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_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_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
51 52 53 54 |
# File 'generated/google/apis/gmail_v1/service.rb', line 51 def initialize super('https://www.googleapis.com/', 'gmail/v1/users/') @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.
38 39 40 |
# File 'generated/google/apis/gmail_v1/service.rb', line 38 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. Overrides userIp if both are provided.
44 45 46 |
# File 'generated/google/apis/gmail_v1/service.rb', line 44 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
49 50 51 |
# File 'generated/google/apis/gmail_v1/service.rb', line 49 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.
770 771 772 773 774 775 776 777 778 779 |
# File 'generated/google/apis/gmail_v1/service.rb', line 770 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.
807 808 809 810 811 812 813 814 815 816 |
# File 'generated/google/apis/gmail_v1/service.rb', line 807 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.
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'generated/google/apis/gmail_v1/service.rb', line 195 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.
533 534 535 536 537 538 539 540 541 542 543 544 |
# File 'generated/google/apis/gmail_v1/service.rb', line 533 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_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.
1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1618 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.
1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1774 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.
1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1936 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.
242 243 244 245 246 247 248 249 250 |
# File 'generated/google/apis/gmail_v1/service.rb', line 242 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.
574 575 576 577 578 579 580 581 582 |
# File 'generated/google/apis/gmail_v1/service.rb', line 574 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.
846 847 848 849 850 851 852 853 854 |
# File 'generated/google/apis/gmail_v1/service.rb', line 846 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_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.
1658 1659 1660 1661 1662 1663 1664 1665 1666 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1658 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.
1817 1818 1819 1820 1821 1822 1823 1824 1825 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1817 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.
2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2228 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.
1979 1980 1981 1982 1983 1984 1985 1986 1987 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1979 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.
2435 2436 2437 2438 2439 2440 2441 2442 2443 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2435 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.
281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'generated/google/apis/gmail_v1/service.rb', line 281 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.
611 612 613 614 615 616 617 618 619 620 621 |
# File 'generated/google/apis/gmail_v1/service.rb', line 611 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.
887 888 889 890 891 892 893 894 895 896 897 898 899 |
# File 'generated/google/apis/gmail_v1/service.rb', line 887 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.
1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1276 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.
81 82 83 84 85 86 87 88 89 90 |
# File 'generated/google/apis/gmail_v1/service.rb', line 81 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.
1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1314 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_filter(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GmailV1::Filter
Gets a filter.
1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1695 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.
1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1854 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.
1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1350 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.
1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1386 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.
2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2269 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.
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2017 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.
1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1422 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.
2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2476 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.
944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 |
# File 'generated/google/apis/gmail_v1/service.rb', line 944 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.
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1003 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.
2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2312 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.
329 330 331 332 333 334 335 336 337 338 339 340 341 342 |
# File 'generated/google/apis/gmail_v1/service.rb', line 329 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).
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 |
# File 'generated/google/apis/gmail_v1/service.rb', line 491 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.
648 649 650 651 652 653 654 655 656 657 |
# File 'generated/google/apis/gmail_v1/service.rb', line 648 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.
1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1062 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_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.
1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1732 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.
1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1891 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.
2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2354 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.
2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2056 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.
2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2528 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.
1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1106 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.
2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2573 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.
687 688 689 690 691 692 693 694 695 696 697 698 699 |
# File 'generated/google/apis/gmail_v1/service.rb', line 687 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.
2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2099 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.
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
# File 'generated/google/apis/gmail_v1/service.rb', line 375 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.
1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1150 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.
2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2396 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.
117 118 119 120 121 122 123 124 |
# File 'generated/google/apis/gmail_v1/service.rb', line 117 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.
1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1196 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.
2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2614 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.
1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1235 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.
2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2653 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.
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
# File 'generated/google/apis/gmail_v1/service.rb', line 426 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.
729 730 731 732 733 734 735 736 737 738 739 740 741 |
# File 'generated/google/apis/gmail_v1/service.rb', line 729 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.
1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1462 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.
1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1501 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.
1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1540 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.
2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2144 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.
1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 |
# File 'generated/google/apis/gmail_v1/service.rb', line 1579 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.
2188 2189 2190 2191 2192 2193 2194 2195 2196 |
# File 'generated/google/apis/gmail_v1/service.rb', line 2188 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.
152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'generated/google/apis/gmail_v1/service.rb', line 152 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 |