Documentation ¶
Overview ¶
Package gmail provides access to the Gmail API.
See https://developers.google.com/gmail/api/
Usage example:
import "google.golang.org/api/gmail/v1" ... gmailService, err := gmail.New(oauthHttpClient)
Index ¶
- Constants
- type BatchDeleteMessagesRequest
- type Draft
- type History
- type HistoryLabelAdded
- type HistoryLabelRemoved
- type HistoryMessageAdded
- type HistoryMessageDeleted
- type Label
- type ListDraftsResponse
- type ListHistoryResponse
- type ListLabelsResponse
- type ListMessagesResponse
- type ListThreadsResponse
- type Message
- type MessagePart
- type MessagePartBody
- type MessagePartHeader
- type ModifyMessageRequest
- type ModifyThreadRequest
- type Profile
- type Service
- type Thread
- type UsersDraftsCreateCall
- func (c *UsersDraftsCreateCall) Context(ctx context.Context) *UsersDraftsCreateCall
- func (c *UsersDraftsCreateCall) Do(opts ...googleapi.CallOption) (*Draft, error)
- func (c *UsersDraftsCreateCall) Fields(s ...googleapi.Field) *UsersDraftsCreateCall
- func (c *UsersDraftsCreateCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersDraftsCreateCall
- func (c *UsersDraftsCreateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersDraftsCreateCall
- func (c *UsersDraftsCreateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersDraftsCreateCalldeprecated
- type UsersDraftsDeleteCall
- type UsersDraftsGetCall
- func (c *UsersDraftsGetCall) Context(ctx context.Context) *UsersDraftsGetCall
- func (c *UsersDraftsGetCall) Do(opts ...googleapi.CallOption) (*Draft, error)
- func (c *UsersDraftsGetCall) Fields(s ...googleapi.Field) *UsersDraftsGetCall
- func (c *UsersDraftsGetCall) Format(format string) *UsersDraftsGetCall
- func (c *UsersDraftsGetCall) IfNoneMatch(entityTag string) *UsersDraftsGetCall
- type UsersDraftsListCall
- func (c *UsersDraftsListCall) Context(ctx context.Context) *UsersDraftsListCall
- func (c *UsersDraftsListCall) Do(opts ...googleapi.CallOption) (*ListDraftsResponse, error)
- func (c *UsersDraftsListCall) Fields(s ...googleapi.Field) *UsersDraftsListCall
- func (c *UsersDraftsListCall) IfNoneMatch(entityTag string) *UsersDraftsListCall
- func (c *UsersDraftsListCall) IncludeSpamTrash(includeSpamTrash bool) *UsersDraftsListCall
- func (c *UsersDraftsListCall) MaxResults(maxResults int64) *UsersDraftsListCall
- func (c *UsersDraftsListCall) PageToken(pageToken string) *UsersDraftsListCall
- func (c *UsersDraftsListCall) Pages(ctx context.Context, f func(*ListDraftsResponse) error) error
- func (c *UsersDraftsListCall) Q(q string) *UsersDraftsListCall
- type UsersDraftsSendCall
- func (c *UsersDraftsSendCall) Context(ctx context.Context) *UsersDraftsSendCall
- func (c *UsersDraftsSendCall) Do(opts ...googleapi.CallOption) (*Message, error)
- func (c *UsersDraftsSendCall) Fields(s ...googleapi.Field) *UsersDraftsSendCall
- func (c *UsersDraftsSendCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersDraftsSendCall
- func (c *UsersDraftsSendCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersDraftsSendCall
- func (c *UsersDraftsSendCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersDraftsSendCalldeprecated
- type UsersDraftsService
- func (r *UsersDraftsService) Create(userId string, draft *Draft) *UsersDraftsCreateCall
- func (r *UsersDraftsService) Delete(userId string, id string) *UsersDraftsDeleteCall
- func (r *UsersDraftsService) Get(userId string, id string) *UsersDraftsGetCall
- func (r *UsersDraftsService) List(userId string) *UsersDraftsListCall
- func (r *UsersDraftsService) Send(userId string, draft *Draft) *UsersDraftsSendCall
- func (r *UsersDraftsService) Update(userId string, id string, draft *Draft) *UsersDraftsUpdateCall
- type UsersDraftsUpdateCall
- func (c *UsersDraftsUpdateCall) Context(ctx context.Context) *UsersDraftsUpdateCall
- func (c *UsersDraftsUpdateCall) Do(opts ...googleapi.CallOption) (*Draft, error)
- func (c *UsersDraftsUpdateCall) Fields(s ...googleapi.Field) *UsersDraftsUpdateCall
- func (c *UsersDraftsUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersDraftsUpdateCall
- func (c *UsersDraftsUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersDraftsUpdateCall
- func (c *UsersDraftsUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersDraftsUpdateCalldeprecated
- type UsersGetProfileCall
- func (c *UsersGetProfileCall) Context(ctx context.Context) *UsersGetProfileCall
- func (c *UsersGetProfileCall) Do(opts ...googleapi.CallOption) (*Profile, error)
- func (c *UsersGetProfileCall) Fields(s ...googleapi.Field) *UsersGetProfileCall
- func (c *UsersGetProfileCall) IfNoneMatch(entityTag string) *UsersGetProfileCall
- type UsersHistoryListCall
- func (c *UsersHistoryListCall) Context(ctx context.Context) *UsersHistoryListCall
- func (c *UsersHistoryListCall) Do(opts ...googleapi.CallOption) (*ListHistoryResponse, error)
- func (c *UsersHistoryListCall) Fields(s ...googleapi.Field) *UsersHistoryListCall
- func (c *UsersHistoryListCall) IfNoneMatch(entityTag string) *UsersHistoryListCall
- func (c *UsersHistoryListCall) LabelId(labelId string) *UsersHistoryListCall
- func (c *UsersHistoryListCall) MaxResults(maxResults int64) *UsersHistoryListCall
- func (c *UsersHistoryListCall) PageToken(pageToken string) *UsersHistoryListCall
- func (c *UsersHistoryListCall) Pages(ctx context.Context, f func(*ListHistoryResponse) error) error
- func (c *UsersHistoryListCall) StartHistoryId(startHistoryId uint64) *UsersHistoryListCall
- type UsersHistoryService
- type UsersLabelsCreateCall
- type UsersLabelsDeleteCall
- type UsersLabelsGetCall
- func (c *UsersLabelsGetCall) Context(ctx context.Context) *UsersLabelsGetCall
- func (c *UsersLabelsGetCall) Do(opts ...googleapi.CallOption) (*Label, error)
- func (c *UsersLabelsGetCall) Fields(s ...googleapi.Field) *UsersLabelsGetCall
- func (c *UsersLabelsGetCall) IfNoneMatch(entityTag string) *UsersLabelsGetCall
- type UsersLabelsListCall
- func (c *UsersLabelsListCall) Context(ctx context.Context) *UsersLabelsListCall
- func (c *UsersLabelsListCall) Do(opts ...googleapi.CallOption) (*ListLabelsResponse, error)
- func (c *UsersLabelsListCall) Fields(s ...googleapi.Field) *UsersLabelsListCall
- func (c *UsersLabelsListCall) IfNoneMatch(entityTag string) *UsersLabelsListCall
- type UsersLabelsPatchCall
- type UsersLabelsService
- func (r *UsersLabelsService) Create(userId string, label *Label) *UsersLabelsCreateCall
- func (r *UsersLabelsService) Delete(userId string, id string) *UsersLabelsDeleteCall
- func (r *UsersLabelsService) Get(userId string, id string) *UsersLabelsGetCall
- func (r *UsersLabelsService) List(userId string) *UsersLabelsListCall
- func (r *UsersLabelsService) Patch(userId string, id string, label *Label) *UsersLabelsPatchCall
- func (r *UsersLabelsService) Update(userId string, id string, label *Label) *UsersLabelsUpdateCall
- type UsersLabelsUpdateCall
- type UsersMessagesAttachmentsGetCall
- func (c *UsersMessagesAttachmentsGetCall) Context(ctx context.Context) *UsersMessagesAttachmentsGetCall
- func (c *UsersMessagesAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*MessagePartBody, error)
- func (c *UsersMessagesAttachmentsGetCall) Fields(s ...googleapi.Field) *UsersMessagesAttachmentsGetCall
- func (c *UsersMessagesAttachmentsGetCall) IfNoneMatch(entityTag string) *UsersMessagesAttachmentsGetCall
- type UsersMessagesAttachmentsService
- type UsersMessagesBatchDeleteCall
- type UsersMessagesDeleteCall
- type UsersMessagesGetCall
- func (c *UsersMessagesGetCall) Context(ctx context.Context) *UsersMessagesGetCall
- func (c *UsersMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, error)
- func (c *UsersMessagesGetCall) Fields(s ...googleapi.Field) *UsersMessagesGetCall
- func (c *UsersMessagesGetCall) Format(format string) *UsersMessagesGetCall
- func (c *UsersMessagesGetCall) IfNoneMatch(entityTag string) *UsersMessagesGetCall
- func (c *UsersMessagesGetCall) MetadataHeaders(metadataHeaders ...string) *UsersMessagesGetCall
- type UsersMessagesImportCall
- func (c *UsersMessagesImportCall) Context(ctx context.Context) *UsersMessagesImportCall
- func (c *UsersMessagesImportCall) Deleted(deleted bool) *UsersMessagesImportCall
- func (c *UsersMessagesImportCall) Do(opts ...googleapi.CallOption) (*Message, error)
- func (c *UsersMessagesImportCall) Fields(s ...googleapi.Field) *UsersMessagesImportCall
- func (c *UsersMessagesImportCall) InternalDateSource(internalDateSource string) *UsersMessagesImportCall
- func (c *UsersMessagesImportCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersMessagesImportCall
- func (c *UsersMessagesImportCall) NeverMarkSpam(neverMarkSpam bool) *UsersMessagesImportCall
- func (c *UsersMessagesImportCall) ProcessForCalendar(processForCalendar bool) *UsersMessagesImportCall
- func (c *UsersMessagesImportCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersMessagesImportCall
- func (c *UsersMessagesImportCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersMessagesImportCalldeprecated
- type UsersMessagesInsertCall
- func (c *UsersMessagesInsertCall) Context(ctx context.Context) *UsersMessagesInsertCall
- func (c *UsersMessagesInsertCall) Deleted(deleted bool) *UsersMessagesInsertCall
- func (c *UsersMessagesInsertCall) Do(opts ...googleapi.CallOption) (*Message, error)
- func (c *UsersMessagesInsertCall) Fields(s ...googleapi.Field) *UsersMessagesInsertCall
- func (c *UsersMessagesInsertCall) InternalDateSource(internalDateSource string) *UsersMessagesInsertCall
- func (c *UsersMessagesInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersMessagesInsertCall
- func (c *UsersMessagesInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersMessagesInsertCall
- func (c *UsersMessagesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersMessagesInsertCalldeprecated
- type UsersMessagesListCall
- func (c *UsersMessagesListCall) Context(ctx context.Context) *UsersMessagesListCall
- func (c *UsersMessagesListCall) Do(opts ...googleapi.CallOption) (*ListMessagesResponse, error)
- func (c *UsersMessagesListCall) Fields(s ...googleapi.Field) *UsersMessagesListCall
- func (c *UsersMessagesListCall) IfNoneMatch(entityTag string) *UsersMessagesListCall
- func (c *UsersMessagesListCall) IncludeSpamTrash(includeSpamTrash bool) *UsersMessagesListCall
- func (c *UsersMessagesListCall) LabelIds(labelIds ...string) *UsersMessagesListCall
- func (c *UsersMessagesListCall) MaxResults(maxResults int64) *UsersMessagesListCall
- func (c *UsersMessagesListCall) PageToken(pageToken string) *UsersMessagesListCall
- func (c *UsersMessagesListCall) Pages(ctx context.Context, f func(*ListMessagesResponse) error) error
- func (c *UsersMessagesListCall) Q(q string) *UsersMessagesListCall
- type UsersMessagesModifyCall
- type UsersMessagesSendCall
- func (c *UsersMessagesSendCall) Context(ctx context.Context) *UsersMessagesSendCall
- func (c *UsersMessagesSendCall) Do(opts ...googleapi.CallOption) (*Message, error)
- func (c *UsersMessagesSendCall) Fields(s ...googleapi.Field) *UsersMessagesSendCall
- func (c *UsersMessagesSendCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersMessagesSendCall
- func (c *UsersMessagesSendCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersMessagesSendCall
- func (c *UsersMessagesSendCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersMessagesSendCalldeprecated
- type UsersMessagesService
- func (r *UsersMessagesService) BatchDelete(userId string, batchdeletemessagesrequest *BatchDeleteMessagesRequest) *UsersMessagesBatchDeleteCall
- func (r *UsersMessagesService) Delete(userId string, id string) *UsersMessagesDeleteCall
- func (r *UsersMessagesService) Get(userId string, id string) *UsersMessagesGetCall
- func (r *UsersMessagesService) Import(userId string, message *Message) *UsersMessagesImportCall
- func (r *UsersMessagesService) Insert(userId string, message *Message) *UsersMessagesInsertCall
- func (r *UsersMessagesService) List(userId string) *UsersMessagesListCall
- func (r *UsersMessagesService) Modify(userId string, id string, modifymessagerequest *ModifyMessageRequest) *UsersMessagesModifyCall
- func (r *UsersMessagesService) Send(userId string, message *Message) *UsersMessagesSendCall
- func (r *UsersMessagesService) Trash(userId string, id string) *UsersMessagesTrashCall
- func (r *UsersMessagesService) Untrash(userId string, id string) *UsersMessagesUntrashCall
- type UsersMessagesTrashCall
- type UsersMessagesUntrashCall
- type UsersService
- type UsersStopCall
- type UsersThreadsDeleteCall
- type UsersThreadsGetCall
- func (c *UsersThreadsGetCall) Context(ctx context.Context) *UsersThreadsGetCall
- func (c *UsersThreadsGetCall) Do(opts ...googleapi.CallOption) (*Thread, error)
- func (c *UsersThreadsGetCall) Fields(s ...googleapi.Field) *UsersThreadsGetCall
- func (c *UsersThreadsGetCall) Format(format string) *UsersThreadsGetCall
- func (c *UsersThreadsGetCall) IfNoneMatch(entityTag string) *UsersThreadsGetCall
- func (c *UsersThreadsGetCall) MetadataHeaders(metadataHeaders ...string) *UsersThreadsGetCall
- type UsersThreadsListCall
- func (c *UsersThreadsListCall) Context(ctx context.Context) *UsersThreadsListCall
- func (c *UsersThreadsListCall) Do(opts ...googleapi.CallOption) (*ListThreadsResponse, error)
- func (c *UsersThreadsListCall) Fields(s ...googleapi.Field) *UsersThreadsListCall
- func (c *UsersThreadsListCall) IfNoneMatch(entityTag string) *UsersThreadsListCall
- func (c *UsersThreadsListCall) IncludeSpamTrash(includeSpamTrash bool) *UsersThreadsListCall
- func (c *UsersThreadsListCall) LabelIds(labelIds ...string) *UsersThreadsListCall
- func (c *UsersThreadsListCall) MaxResults(maxResults int64) *UsersThreadsListCall
- func (c *UsersThreadsListCall) PageToken(pageToken string) *UsersThreadsListCall
- func (c *UsersThreadsListCall) Pages(ctx context.Context, f func(*ListThreadsResponse) error) error
- func (c *UsersThreadsListCall) Q(q string) *UsersThreadsListCall
- type UsersThreadsModifyCall
- type UsersThreadsService
- func (r *UsersThreadsService) Delete(userId string, id string) *UsersThreadsDeleteCall
- func (r *UsersThreadsService) Get(userId string, id string) *UsersThreadsGetCall
- func (r *UsersThreadsService) List(userId string) *UsersThreadsListCall
- func (r *UsersThreadsService) Modify(userId string, id string, modifythreadrequest *ModifyThreadRequest) *UsersThreadsModifyCall
- func (r *UsersThreadsService) Trash(userId string, id string) *UsersThreadsTrashCall
- func (r *UsersThreadsService) Untrash(userId string, id string) *UsersThreadsUntrashCall
- type UsersThreadsTrashCall
- type UsersThreadsUntrashCall
- type UsersWatchCall
- type WatchRequest
- type WatchResponse
Constants ¶
const ( // View and manage your mail MailGoogleComScope = "https://mail.google.com/" // Manage drafts and send emails GmailComposeScope = "https://www.googleapis.com/auth/gmail.compose" // Insert mail into your mailbox GmailInsertScope = "https://www.googleapis.com/auth/gmail.insert" // Manage mailbox labels GmailLabelsScope = "https://www.googleapis.com/auth/gmail.labels" // View and modify but not delete your email GmailModifyScope = "https://www.googleapis.com/auth/gmail.modify" // View your emails messages and settings GmailReadonlyScope = "https://www.googleapis.com/auth/gmail.readonly" // Send email on your behalf GmailSendScope = "https://www.googleapis.com/auth/gmail.send" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchDeleteMessagesRequest ¶
type BatchDeleteMessagesRequest struct { // Ids: The IDs of the messages to delete. Ids []string `json:"ids,omitempty"` // ForceSendFields is a list of field names (e.g. "Ids") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
func (*BatchDeleteMessagesRequest) MarshalJSON ¶
func (s *BatchDeleteMessagesRequest) MarshalJSON() ([]byte, error)
type Draft ¶
type Draft struct { // Id: The immutable ID of the draft. Id string `json:"id,omitempty"` // Message: The message content of the draft. Message *Message `json:"message,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
Draft: A draft email in the user's mailbox.
func (*Draft) MarshalJSON ¶
type History ¶
type History struct { // Id: The mailbox sequence ID. Id uint64 `json:"id,omitempty,string"` // LabelsAdded: Labels added to messages in this history record. LabelsAdded []*HistoryLabelAdded `json:"labelsAdded,omitempty"` // LabelsRemoved: Labels removed from messages in this history record. LabelsRemoved []*HistoryLabelRemoved `json:"labelsRemoved,omitempty"` // Messages: List of messages changed in this history record. The fields // for specific change types, such as messagesAdded may duplicate // messages in this field. We recommend using the specific change-type // fields instead of this. Messages []*Message `json:"messages,omitempty"` // MessagesAdded: Messages added to the mailbox in this history record. MessagesAdded []*HistoryMessageAdded `json:"messagesAdded,omitempty"` // MessagesDeleted: Messages deleted (not Trashed) from the mailbox in // this history record. MessagesDeleted []*HistoryMessageDeleted `json:"messagesDeleted,omitempty"` // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
History: A record of a change to the user's mailbox. Each history change may affect multiple messages in multiple ways.
func (*History) MarshalJSON ¶
type HistoryLabelAdded ¶
type HistoryLabelAdded struct { // LabelIds: Label IDs added to the message. LabelIds []string `json:"labelIds,omitempty"` Message *Message `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "LabelIds") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
func (*HistoryLabelAdded) MarshalJSON ¶
func (s *HistoryLabelAdded) MarshalJSON() ([]byte, error)
type HistoryLabelRemoved ¶
type HistoryLabelRemoved struct { // LabelIds: Label IDs removed from the message. LabelIds []string `json:"labelIds,omitempty"` Message *Message `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "LabelIds") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
func (*HistoryLabelRemoved) MarshalJSON ¶
func (s *HistoryLabelRemoved) MarshalJSON() ([]byte, error)
type HistoryMessageAdded ¶
type HistoryMessageAdded struct { Message *Message `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "Message") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
func (*HistoryMessageAdded) MarshalJSON ¶
func (s *HistoryMessageAdded) MarshalJSON() ([]byte, error)
type HistoryMessageDeleted ¶
type HistoryMessageDeleted struct { Message *Message `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "Message") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
func (*HistoryMessageDeleted) MarshalJSON ¶
func (s *HistoryMessageDeleted) MarshalJSON() ([]byte, error)
type Label ¶
type Label struct { // Id: The immutable ID of the label. Id string `json:"id,omitempty"` // LabelListVisibility: The visibility of the label in the label list in // the Gmail web interface. // // Possible values: // "labelHide" // "labelShow" // "labelShowIfUnread" LabelListVisibility string `json:"labelListVisibility,omitempty"` // MessageListVisibility: The visibility of the label in the message // list in the Gmail web interface. // // Possible values: // "hide" // "show" MessageListVisibility string `json:"messageListVisibility,omitempty"` // MessagesTotal: The total number of messages with the label. MessagesTotal int64 `json:"messagesTotal,omitempty"` // MessagesUnread: The number of unread messages with the label. MessagesUnread int64 `json:"messagesUnread,omitempty"` // Name: The display name of the label. Name string `json:"name,omitempty"` // ThreadsTotal: The total number of threads with the label. ThreadsTotal int64 `json:"threadsTotal,omitempty"` // ThreadsUnread: The number of unread threads with the label. ThreadsUnread int64 `json:"threadsUnread,omitempty"` // Type: The owner type for the label. User labels are created by the // user and can be modified and deleted by the user and can be applied // to any message or thread. System labels are internally created and // cannot be added, modified, or deleted. System labels may be able to // be applied to or removed from messages and threads under some // circumstances but this is not guaranteed. For example, users can // apply and remove the INBOX and UNREAD labels from messages and // threads, but cannot apply or remove the DRAFTS or SENT labels from // messages or threads. // // Possible values: // "system" // "user" Type string `json:"type,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
Label: Labels are used to categorize messages and threads within the user's mailbox.
func (*Label) MarshalJSON ¶
type ListDraftsResponse ¶
type ListDraftsResponse struct { // Drafts: List of drafts. Drafts []*Draft `json:"drafts,omitempty"` // NextPageToken: Token to retrieve the next page of results in the // list. NextPageToken string `json:"nextPageToken,omitempty"` // ResultSizeEstimate: Estimated total number of results. ResultSizeEstimate int64 `json:"resultSizeEstimate,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Drafts") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
func (*ListDraftsResponse) MarshalJSON ¶
func (s *ListDraftsResponse) MarshalJSON() ([]byte, error)
type ListHistoryResponse ¶
type ListHistoryResponse struct { // History: List of history records. Any messages contained in the // response will typically only have id and threadId fields populated. History []*History `json:"history,omitempty"` // HistoryId: The ID of the mailbox's current history record. HistoryId uint64 `json:"historyId,omitempty,string"` // NextPageToken: Page token to retrieve the next page of results in the // list. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "History") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
func (*ListHistoryResponse) MarshalJSON ¶
func (s *ListHistoryResponse) MarshalJSON() ([]byte, error)
type ListLabelsResponse ¶
type ListLabelsResponse struct { // Labels: List of labels. Labels []*Label `json:"labels,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Labels") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
func (*ListLabelsResponse) MarshalJSON ¶
func (s *ListLabelsResponse) MarshalJSON() ([]byte, error)
type ListMessagesResponse ¶
type ListMessagesResponse struct { // Messages: List of messages. Messages []*Message `json:"messages,omitempty"` // NextPageToken: Token to retrieve the next page of results in the // list. NextPageToken string `json:"nextPageToken,omitempty"` // ResultSizeEstimate: Estimated total number of results. ResultSizeEstimate int64 `json:"resultSizeEstimate,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Messages") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
func (*ListMessagesResponse) MarshalJSON ¶
func (s *ListMessagesResponse) MarshalJSON() ([]byte, error)
type ListThreadsResponse ¶
type ListThreadsResponse struct { // NextPageToken: Page token to retrieve the next page of results in the // list. NextPageToken string `json:"nextPageToken,omitempty"` // ResultSizeEstimate: Estimated total number of results. ResultSizeEstimate int64 `json:"resultSizeEstimate,omitempty"` // Threads: List of threads. Threads []*Thread `json:"threads,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
func (*ListThreadsResponse) MarshalJSON ¶
func (s *ListThreadsResponse) MarshalJSON() ([]byte, error)
type Message ¶
type Message struct { // HistoryId: The ID of the last history record that modified this // message. HistoryId uint64 `json:"historyId,omitempty,string"` // Id: The immutable ID of the message. Id string `json:"id,omitempty"` // InternalDate: The internal message creation timestamp (epoch ms), // which determines ordering in the inbox. For normal SMTP-received // email, this represents the time the message was originally accepted // by Google, which is more reliable than the Date header. However, for // API-migrated mail, it can be configured by client to be based on the // Date header. InternalDate int64 `json:"internalDate,omitempty,string"` // LabelIds: List of IDs of labels applied to this message. LabelIds []string `json:"labelIds,omitempty"` // Payload: The parsed email structure in the message parts. Payload *MessagePart `json:"payload,omitempty"` // Raw: The entire email message in an RFC 2822 formatted and base64url // encoded string. Returned in messages.get and drafts.get responses // when the format=RAW parameter is supplied. Raw string `json:"raw,omitempty"` // SizeEstimate: Estimated size in bytes of the message. SizeEstimate int64 `json:"sizeEstimate,omitempty"` // Snippet: A short part of the message text. Snippet string `json:"snippet,omitempty"` // ThreadId: The ID of the thread the message belongs to. To add a // message or draft to a thread, the following criteria must be met: // - The requested threadId must be specified on the Message or // Draft.Message you supply with your request. // - The References and In-Reply-To headers must be set in compliance // with the RFC 2822 standard. // - The Subject headers must match. ThreadId string `json:"threadId,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "HistoryId") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
Message: An email message.
func (*Message) MarshalJSON ¶
type MessagePart ¶
type MessagePart struct { // Body: The message part body for this part, which may be empty for // container MIME message parts. Body *MessagePartBody `json:"body,omitempty"` // Filename: The filename of the attachment. Only present if this // message part represents an attachment. Filename string `json:"filename,omitempty"` // Headers: List of headers on this message part. For the top-level // message part, representing the entire message payload, it will // contain the standard RFC 2822 email headers such as To, From, and // Subject. Headers []*MessagePartHeader `json:"headers,omitempty"` // MimeType: The MIME type of the message part. MimeType string `json:"mimeType,omitempty"` // PartId: The immutable ID of the message part. PartId string `json:"partId,omitempty"` // Parts: The child MIME message parts of this part. This only applies // to container MIME message parts, for example multipart/*. For non- // container MIME message part types, such as text/plain, this field is // empty. For more information, see RFC 1521. Parts []*MessagePart `json:"parts,omitempty"` // ForceSendFields is a list of field names (e.g. "Body") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
MessagePart: A single MIME message part.
func (*MessagePart) MarshalJSON ¶
func (s *MessagePart) MarshalJSON() ([]byte, error)
type MessagePartBody ¶
type MessagePartBody struct { // AttachmentId: When present, contains the ID of an external attachment // that can be retrieved in a separate messages.attachments.get request. // When not present, the entire content of the message part body is // contained in the data field. AttachmentId string `json:"attachmentId,omitempty"` // Data: The body data of a MIME message part. May be empty for MIME // container types that have no message body or when the body data is // sent as a separate attachment. An attachment ID is present if the // body data is contained in a separate attachment. Data string `json:"data,omitempty"` // Size: Total number of bytes in the body of the message part. Size int64 `json:"size,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "AttachmentId") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
MessagePartBody: The body of a single MIME message part.
func (*MessagePartBody) MarshalJSON ¶
func (s *MessagePartBody) MarshalJSON() ([]byte, error)
type MessagePartHeader ¶
type MessagePartHeader struct { // Name: The name of the header before the : separator. For example, To. Name string `json:"name,omitempty"` // Value: The value of the header after the : separator. For example, // someuser@example.com. Value string `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
func (*MessagePartHeader) MarshalJSON ¶
func (s *MessagePartHeader) MarshalJSON() ([]byte, error)
type ModifyMessageRequest ¶
type ModifyMessageRequest struct { // AddLabelIds: A list of IDs of labels to add to this message. AddLabelIds []string `json:"addLabelIds,omitempty"` // RemoveLabelIds: A list IDs of labels to remove from this message. RemoveLabelIds []string `json:"removeLabelIds,omitempty"` // ForceSendFields is a list of field names (e.g. "AddLabelIds") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
func (*ModifyMessageRequest) MarshalJSON ¶
func (s *ModifyMessageRequest) MarshalJSON() ([]byte, error)
type ModifyThreadRequest ¶
type ModifyThreadRequest struct { // AddLabelIds: A list of IDs of labels to add to this thread. AddLabelIds []string `json:"addLabelIds,omitempty"` // RemoveLabelIds: A list of IDs of labels to remove from this thread. RemoveLabelIds []string `json:"removeLabelIds,omitempty"` // ForceSendFields is a list of field names (e.g. "AddLabelIds") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
func (*ModifyThreadRequest) MarshalJSON ¶
func (s *ModifyThreadRequest) MarshalJSON() ([]byte, error)
type Profile ¶
type Profile struct { // EmailAddress: The user's email address. EmailAddress string `json:"emailAddress,omitempty"` // HistoryId: The ID of the mailbox's current history record. HistoryId uint64 `json:"historyId,omitempty,string"` // MessagesTotal: The total number of messages in the mailbox. MessagesTotal int64 `json:"messagesTotal,omitempty"` // ThreadsTotal: The total number of threads in the mailbox. ThreadsTotal int64 `json:"threadsTotal,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "EmailAddress") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
Profile: Profile for a Gmail user.
func (*Profile) MarshalJSON ¶
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Users *UsersService // contains filtered or unexported fields }
type Thread ¶
type Thread struct { // HistoryId: The ID of the last history record that modified this // thread. HistoryId uint64 `json:"historyId,omitempty,string"` // Id: The unique ID of the thread. Id string `json:"id,omitempty"` // Messages: The list of messages in the thread. Messages []*Message `json:"messages,omitempty"` // Snippet: A short part of the message text. Snippet string `json:"snippet,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "HistoryId") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
Thread: A collection of messages representing a conversation.
func (*Thread) MarshalJSON ¶
type UsersDraftsCreateCall ¶
type UsersDraftsCreateCall struct {
// contains filtered or unexported fields
}
func (*UsersDraftsCreateCall) Context ¶
func (c *UsersDraftsCreateCall) Context(ctx context.Context) *UsersDraftsCreateCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled. This context will supersede any context previously provided to the ResumableMedia method.
func (*UsersDraftsCreateCall) Do ¶
func (c *UsersDraftsCreateCall) Do(opts ...googleapi.CallOption) (*Draft, error)
Do executes the "gmail.users.drafts.create" call. Exactly one of *Draft or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Draft.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersDraftsCreateCall) Fields ¶
func (c *UsersDraftsCreateCall) Fields(s ...googleapi.Field) *UsersDraftsCreateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersDraftsCreateCall) Media ¶
func (c *UsersDraftsCreateCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersDraftsCreateCall
Media specifies the media to upload in one or more chunks. The chunk size may be controlled by supplying a MediaOption generated by googleapi.ChunkSize. The chunk size defaults to googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload request will be determined by sniffing the contents of r, unless a MediaOption generated by googleapi.ContentType is supplied. At most one of Media and ResumableMedia may be set.
func (*UsersDraftsCreateCall) ProgressUpdater ¶
func (c *UsersDraftsCreateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersDraftsCreateCall
ProgressUpdater provides a callback function that will be called after every chunk. It should be a low-latency function in order to not slow down the upload operation. This should only be called when using ResumableMedia (as opposed to Media).
func (*UsersDraftsCreateCall) ResumableMedia
deprecated
func (c *UsersDraftsCreateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersDraftsCreateCall
ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
Deprecated: use Media instead.
At most one of Media and ResumableMedia may be set. mediaType identifies the MIME media type of the upload, such as "image/png". If mediaType is "", it will be auto-detected. The provided ctx will supersede any context previously provided to the Context method.
type UsersDraftsDeleteCall ¶
type UsersDraftsDeleteCall struct {
// contains filtered or unexported fields
}
func (*UsersDraftsDeleteCall) Context ¶
func (c *UsersDraftsDeleteCall) Context(ctx context.Context) *UsersDraftsDeleteCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersDraftsDeleteCall) Do ¶
func (c *UsersDraftsDeleteCall) Do(opts ...googleapi.CallOption) error
Do executes the "gmail.users.drafts.delete" call.
func (*UsersDraftsDeleteCall) Fields ¶
func (c *UsersDraftsDeleteCall) Fields(s ...googleapi.Field) *UsersDraftsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersDraftsGetCall ¶
type UsersDraftsGetCall struct {
// contains filtered or unexported fields
}
func (*UsersDraftsGetCall) Context ¶
func (c *UsersDraftsGetCall) Context(ctx context.Context) *UsersDraftsGetCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersDraftsGetCall) Do ¶
func (c *UsersDraftsGetCall) Do(opts ...googleapi.CallOption) (*Draft, error)
Do executes the "gmail.users.drafts.get" call. Exactly one of *Draft or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Draft.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersDraftsGetCall) Fields ¶
func (c *UsersDraftsGetCall) Fields(s ...googleapi.Field) *UsersDraftsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersDraftsGetCall) Format ¶
func (c *UsersDraftsGetCall) Format(format string) *UsersDraftsGetCall
Format sets the optional parameter "format": The format to return the draft in.
Possible values:
"full" (default) "metadata" "minimal" "raw"
func (*UsersDraftsGetCall) IfNoneMatch ¶
func (c *UsersDraftsGetCall) IfNoneMatch(entityTag string) *UsersDraftsGetCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type UsersDraftsListCall ¶
type UsersDraftsListCall struct {
// contains filtered or unexported fields
}
func (*UsersDraftsListCall) Context ¶
func (c *UsersDraftsListCall) Context(ctx context.Context) *UsersDraftsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersDraftsListCall) Do ¶
func (c *UsersDraftsListCall) Do(opts ...googleapi.CallOption) (*ListDraftsResponse, error)
Do executes the "gmail.users.drafts.list" call. Exactly one of *ListDraftsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListDraftsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersDraftsListCall) Fields ¶
func (c *UsersDraftsListCall) Fields(s ...googleapi.Field) *UsersDraftsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersDraftsListCall) IfNoneMatch ¶
func (c *UsersDraftsListCall) IfNoneMatch(entityTag string) *UsersDraftsListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*UsersDraftsListCall) IncludeSpamTrash ¶
func (c *UsersDraftsListCall) IncludeSpamTrash(includeSpamTrash bool) *UsersDraftsListCall
IncludeSpamTrash sets the optional parameter "includeSpamTrash": Include drafts from SPAM and TRASH in the results.
func (*UsersDraftsListCall) MaxResults ¶
func (c *UsersDraftsListCall) MaxResults(maxResults int64) *UsersDraftsListCall
MaxResults sets the optional parameter "maxResults": Maximum number of drafts to return.
func (*UsersDraftsListCall) PageToken ¶
func (c *UsersDraftsListCall) PageToken(pageToken string) *UsersDraftsListCall
PageToken sets the optional parameter "pageToken": Page token to retrieve a specific page of results in the list.
func (*UsersDraftsListCall) Pages ¶
func (c *UsersDraftsListCall) Pages(ctx context.Context, f func(*ListDraftsResponse) error) error
Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.
func (*UsersDraftsListCall) Q ¶
func (c *UsersDraftsListCall) Q(q string) *UsersDraftsListCall
Q sets the optional parameter "q": Only return draft messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread".
type UsersDraftsSendCall ¶
type UsersDraftsSendCall struct {
// contains filtered or unexported fields
}
func (*UsersDraftsSendCall) Context ¶
func (c *UsersDraftsSendCall) Context(ctx context.Context) *UsersDraftsSendCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled. This context will supersede any context previously provided to the ResumableMedia method.
func (*UsersDraftsSendCall) Do ¶
func (c *UsersDraftsSendCall) Do(opts ...googleapi.CallOption) (*Message, error)
Do executes the "gmail.users.drafts.send" call. Exactly one of *Message or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Message.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersDraftsSendCall) Fields ¶
func (c *UsersDraftsSendCall) Fields(s ...googleapi.Field) *UsersDraftsSendCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersDraftsSendCall) Media ¶
func (c *UsersDraftsSendCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersDraftsSendCall
Media specifies the media to upload in one or more chunks. The chunk size may be controlled by supplying a MediaOption generated by googleapi.ChunkSize. The chunk size defaults to googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload request will be determined by sniffing the contents of r, unless a MediaOption generated by googleapi.ContentType is supplied. At most one of Media and ResumableMedia may be set.
func (*UsersDraftsSendCall) ProgressUpdater ¶
func (c *UsersDraftsSendCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersDraftsSendCall
ProgressUpdater provides a callback function that will be called after every chunk. It should be a low-latency function in order to not slow down the upload operation. This should only be called when using ResumableMedia (as opposed to Media).
func (*UsersDraftsSendCall) ResumableMedia
deprecated
func (c *UsersDraftsSendCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersDraftsSendCall
ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
Deprecated: use Media instead.
At most one of Media and ResumableMedia may be set. mediaType identifies the MIME media type of the upload, such as "image/png". If mediaType is "", it will be auto-detected. The provided ctx will supersede any context previously provided to the Context method.
type UsersDraftsService ¶
type UsersDraftsService struct {
// contains filtered or unexported fields
}
func NewUsersDraftsService ¶
func NewUsersDraftsService(s *Service) *UsersDraftsService
func (*UsersDraftsService) Create ¶
func (r *UsersDraftsService) Create(userId string, draft *Draft) *UsersDraftsCreateCall
Create: Creates a new draft with the DRAFT label.
func (*UsersDraftsService) Delete ¶
func (r *UsersDraftsService) Delete(userId string, id string) *UsersDraftsDeleteCall
Delete: Immediately and permanently deletes the specified draft. Does not simply trash it.
func (*UsersDraftsService) Get ¶
func (r *UsersDraftsService) Get(userId string, id string) *UsersDraftsGetCall
Get: Gets the specified draft.
func (*UsersDraftsService) List ¶
func (r *UsersDraftsService) List(userId string) *UsersDraftsListCall
List: Lists the drafts in the user's mailbox.
func (*UsersDraftsService) Send ¶
func (r *UsersDraftsService) Send(userId string, draft *Draft) *UsersDraftsSendCall
Send: Sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers.
func (*UsersDraftsService) Update ¶
func (r *UsersDraftsService) Update(userId string, id string, draft *Draft) *UsersDraftsUpdateCall
Update: Replaces a draft's content.
type UsersDraftsUpdateCall ¶
type UsersDraftsUpdateCall struct {
// contains filtered or unexported fields
}
func (*UsersDraftsUpdateCall) Context ¶
func (c *UsersDraftsUpdateCall) Context(ctx context.Context) *UsersDraftsUpdateCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled. This context will supersede any context previously provided to the ResumableMedia method.
func (*UsersDraftsUpdateCall) Do ¶
func (c *UsersDraftsUpdateCall) Do(opts ...googleapi.CallOption) (*Draft, error)
Do executes the "gmail.users.drafts.update" call. Exactly one of *Draft or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Draft.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersDraftsUpdateCall) Fields ¶
func (c *UsersDraftsUpdateCall) Fields(s ...googleapi.Field) *UsersDraftsUpdateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersDraftsUpdateCall) Media ¶
func (c *UsersDraftsUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersDraftsUpdateCall
Media specifies the media to upload in one or more chunks. The chunk size may be controlled by supplying a MediaOption generated by googleapi.ChunkSize. The chunk size defaults to googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload request will be determined by sniffing the contents of r, unless a MediaOption generated by googleapi.ContentType is supplied. At most one of Media and ResumableMedia may be set.
func (*UsersDraftsUpdateCall) ProgressUpdater ¶
func (c *UsersDraftsUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersDraftsUpdateCall
ProgressUpdater provides a callback function that will be called after every chunk. It should be a low-latency function in order to not slow down the upload operation. This should only be called when using ResumableMedia (as opposed to Media).
func (*UsersDraftsUpdateCall) ResumableMedia
deprecated
func (c *UsersDraftsUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersDraftsUpdateCall
ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
Deprecated: use Media instead.
At most one of Media and ResumableMedia may be set. mediaType identifies the MIME media type of the upload, such as "image/png". If mediaType is "", it will be auto-detected. The provided ctx will supersede any context previously provided to the Context method.
type UsersGetProfileCall ¶
type UsersGetProfileCall struct {
// contains filtered or unexported fields
}
func (*UsersGetProfileCall) Context ¶
func (c *UsersGetProfileCall) Context(ctx context.Context) *UsersGetProfileCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersGetProfileCall) Do ¶
func (c *UsersGetProfileCall) Do(opts ...googleapi.CallOption) (*Profile, error)
Do executes the "gmail.users.getProfile" call. Exactly one of *Profile or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Profile.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersGetProfileCall) Fields ¶
func (c *UsersGetProfileCall) Fields(s ...googleapi.Field) *UsersGetProfileCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersGetProfileCall) IfNoneMatch ¶
func (c *UsersGetProfileCall) IfNoneMatch(entityTag string) *UsersGetProfileCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type UsersHistoryListCall ¶
type UsersHistoryListCall struct {
// contains filtered or unexported fields
}
func (*UsersHistoryListCall) Context ¶
func (c *UsersHistoryListCall) Context(ctx context.Context) *UsersHistoryListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersHistoryListCall) Do ¶
func (c *UsersHistoryListCall) Do(opts ...googleapi.CallOption) (*ListHistoryResponse, error)
Do executes the "gmail.users.history.list" call. Exactly one of *ListHistoryResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListHistoryResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersHistoryListCall) Fields ¶
func (c *UsersHistoryListCall) Fields(s ...googleapi.Field) *UsersHistoryListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersHistoryListCall) IfNoneMatch ¶
func (c *UsersHistoryListCall) IfNoneMatch(entityTag string) *UsersHistoryListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*UsersHistoryListCall) LabelId ¶
func (c *UsersHistoryListCall) LabelId(labelId string) *UsersHistoryListCall
LabelId sets the optional parameter "labelId": Only return messages with a label matching the ID.
func (*UsersHistoryListCall) MaxResults ¶
func (c *UsersHistoryListCall) MaxResults(maxResults int64) *UsersHistoryListCall
MaxResults sets the optional parameter "maxResults": The maximum number of history records to return.
func (*UsersHistoryListCall) PageToken ¶
func (c *UsersHistoryListCall) PageToken(pageToken string) *UsersHistoryListCall
PageToken sets the optional parameter "pageToken": Page token to retrieve a specific page of results in the list.
func (*UsersHistoryListCall) Pages ¶
func (c *UsersHistoryListCall) Pages(ctx context.Context, f func(*ListHistoryResponse) error) error
Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.
func (*UsersHistoryListCall) StartHistoryId ¶
func (c *UsersHistoryListCall) StartHistoryId(startHistoryId uint64) *UsersHistoryListCall
StartHistoryId sets the optional parameter "startHistoryId": Required. Returns history records after the specified startHistoryId. The supplied startHistoryId should be obtained from the historyId of a message, thread, or previous list response. History IDs increase chronologically but are not contiguous with random gaps in between valid IDs. Supplying an invalid or out of date startHistoryId typically returns an HTTP 404 error code. A historyId is typically valid for at least a week, but in some rare circumstances may be valid for only a few hours. If you receive an HTTP 404 error response, your application should perform a full sync. If you receive no nextPageToken in the response, there are no updates to retrieve and you can store the returned historyId for a future request.
type UsersHistoryService ¶
type UsersHistoryService struct {
// contains filtered or unexported fields
}
func NewUsersHistoryService ¶
func NewUsersHistoryService(s *Service) *UsersHistoryService
func (*UsersHistoryService) List ¶
func (r *UsersHistoryService) List(userId string) *UsersHistoryListCall
List: Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId).
type UsersLabelsCreateCall ¶
type UsersLabelsCreateCall struct {
// contains filtered or unexported fields
}
func (*UsersLabelsCreateCall) Context ¶
func (c *UsersLabelsCreateCall) Context(ctx context.Context) *UsersLabelsCreateCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersLabelsCreateCall) Do ¶
func (c *UsersLabelsCreateCall) Do(opts ...googleapi.CallOption) (*Label, error)
Do executes the "gmail.users.labels.create" call. Exactly one of *Label or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Label.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersLabelsCreateCall) Fields ¶
func (c *UsersLabelsCreateCall) Fields(s ...googleapi.Field) *UsersLabelsCreateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersLabelsDeleteCall ¶
type UsersLabelsDeleteCall struct {
// contains filtered or unexported fields
}
func (*UsersLabelsDeleteCall) Context ¶
func (c *UsersLabelsDeleteCall) Context(ctx context.Context) *UsersLabelsDeleteCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersLabelsDeleteCall) Do ¶
func (c *UsersLabelsDeleteCall) Do(opts ...googleapi.CallOption) error
Do executes the "gmail.users.labels.delete" call.
func (*UsersLabelsDeleteCall) Fields ¶
func (c *UsersLabelsDeleteCall) Fields(s ...googleapi.Field) *UsersLabelsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersLabelsGetCall ¶
type UsersLabelsGetCall struct {
// contains filtered or unexported fields
}
func (*UsersLabelsGetCall) Context ¶
func (c *UsersLabelsGetCall) Context(ctx context.Context) *UsersLabelsGetCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersLabelsGetCall) Do ¶
func (c *UsersLabelsGetCall) Do(opts ...googleapi.CallOption) (*Label, error)
Do executes the "gmail.users.labels.get" call. Exactly one of *Label or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Label.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersLabelsGetCall) Fields ¶
func (c *UsersLabelsGetCall) Fields(s ...googleapi.Field) *UsersLabelsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersLabelsGetCall) IfNoneMatch ¶
func (c *UsersLabelsGetCall) IfNoneMatch(entityTag string) *UsersLabelsGetCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type UsersLabelsListCall ¶
type UsersLabelsListCall struct {
// contains filtered or unexported fields
}
func (*UsersLabelsListCall) Context ¶
func (c *UsersLabelsListCall) Context(ctx context.Context) *UsersLabelsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersLabelsListCall) Do ¶
func (c *UsersLabelsListCall) Do(opts ...googleapi.CallOption) (*ListLabelsResponse, error)
Do executes the "gmail.users.labels.list" call. Exactly one of *ListLabelsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListLabelsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersLabelsListCall) Fields ¶
func (c *UsersLabelsListCall) Fields(s ...googleapi.Field) *UsersLabelsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersLabelsListCall) IfNoneMatch ¶
func (c *UsersLabelsListCall) IfNoneMatch(entityTag string) *UsersLabelsListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type UsersLabelsPatchCall ¶
type UsersLabelsPatchCall struct {
// contains filtered or unexported fields
}
func (*UsersLabelsPatchCall) Context ¶
func (c *UsersLabelsPatchCall) Context(ctx context.Context) *UsersLabelsPatchCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersLabelsPatchCall) Do ¶
func (c *UsersLabelsPatchCall) Do(opts ...googleapi.CallOption) (*Label, error)
Do executes the "gmail.users.labels.patch" call. Exactly one of *Label or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Label.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersLabelsPatchCall) Fields ¶
func (c *UsersLabelsPatchCall) Fields(s ...googleapi.Field) *UsersLabelsPatchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersLabelsService ¶
type UsersLabelsService struct {
// contains filtered or unexported fields
}
func NewUsersLabelsService ¶
func NewUsersLabelsService(s *Service) *UsersLabelsService
func (*UsersLabelsService) Create ¶
func (r *UsersLabelsService) Create(userId string, label *Label) *UsersLabelsCreateCall
Create: Creates a new label.
func (*UsersLabelsService) Delete ¶
func (r *UsersLabelsService) Delete(userId string, id string) *UsersLabelsDeleteCall
Delete: Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.
func (*UsersLabelsService) Get ¶
func (r *UsersLabelsService) Get(userId string, id string) *UsersLabelsGetCall
Get: Gets the specified label.
func (*UsersLabelsService) List ¶
func (r *UsersLabelsService) List(userId string) *UsersLabelsListCall
List: Lists all labels in the user's mailbox.
func (*UsersLabelsService) Patch ¶
func (r *UsersLabelsService) Patch(userId string, id string, label *Label) *UsersLabelsPatchCall
Patch: Updates the specified label. This method supports patch semantics.
func (*UsersLabelsService) Update ¶
func (r *UsersLabelsService) Update(userId string, id string, label *Label) *UsersLabelsUpdateCall
Update: Updates the specified label.
type UsersLabelsUpdateCall ¶
type UsersLabelsUpdateCall struct {
// contains filtered or unexported fields
}
func (*UsersLabelsUpdateCall) Context ¶
func (c *UsersLabelsUpdateCall) Context(ctx context.Context) *UsersLabelsUpdateCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersLabelsUpdateCall) Do ¶
func (c *UsersLabelsUpdateCall) Do(opts ...googleapi.CallOption) (*Label, error)
Do executes the "gmail.users.labels.update" call. Exactly one of *Label or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Label.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersLabelsUpdateCall) Fields ¶
func (c *UsersLabelsUpdateCall) Fields(s ...googleapi.Field) *UsersLabelsUpdateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersMessagesAttachmentsGetCall ¶
type UsersMessagesAttachmentsGetCall struct {
// contains filtered or unexported fields
}
func (*UsersMessagesAttachmentsGetCall) Context ¶
func (c *UsersMessagesAttachmentsGetCall) Context(ctx context.Context) *UsersMessagesAttachmentsGetCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersMessagesAttachmentsGetCall) Do ¶
func (c *UsersMessagesAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*MessagePartBody, error)
Do executes the "gmail.users.messages.attachments.get" call. Exactly one of *MessagePartBody or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *MessagePartBody.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersMessagesAttachmentsGetCall) Fields ¶
func (c *UsersMessagesAttachmentsGetCall) Fields(s ...googleapi.Field) *UsersMessagesAttachmentsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersMessagesAttachmentsGetCall) IfNoneMatch ¶
func (c *UsersMessagesAttachmentsGetCall) IfNoneMatch(entityTag string) *UsersMessagesAttachmentsGetCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type UsersMessagesAttachmentsService ¶
type UsersMessagesAttachmentsService struct {
// contains filtered or unexported fields
}
func NewUsersMessagesAttachmentsService ¶
func NewUsersMessagesAttachmentsService(s *Service) *UsersMessagesAttachmentsService
func (*UsersMessagesAttachmentsService) Get ¶
func (r *UsersMessagesAttachmentsService) Get(userId string, messageId string, id string) *UsersMessagesAttachmentsGetCall
Get: Gets the specified message attachment.
type UsersMessagesBatchDeleteCall ¶
type UsersMessagesBatchDeleteCall struct {
// contains filtered or unexported fields
}
func (*UsersMessagesBatchDeleteCall) Context ¶
func (c *UsersMessagesBatchDeleteCall) Context(ctx context.Context) *UsersMessagesBatchDeleteCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersMessagesBatchDeleteCall) Do ¶
func (c *UsersMessagesBatchDeleteCall) Do(opts ...googleapi.CallOption) error
Do executes the "gmail.users.messages.batchDelete" call.
func (*UsersMessagesBatchDeleteCall) Fields ¶
func (c *UsersMessagesBatchDeleteCall) Fields(s ...googleapi.Field) *UsersMessagesBatchDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersMessagesDeleteCall ¶
type UsersMessagesDeleteCall struct {
// contains filtered or unexported fields
}
func (*UsersMessagesDeleteCall) Context ¶
func (c *UsersMessagesDeleteCall) Context(ctx context.Context) *UsersMessagesDeleteCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersMessagesDeleteCall) Do ¶
func (c *UsersMessagesDeleteCall) Do(opts ...googleapi.CallOption) error
Do executes the "gmail.users.messages.delete" call.
func (*UsersMessagesDeleteCall) Fields ¶
func (c *UsersMessagesDeleteCall) Fields(s ...googleapi.Field) *UsersMessagesDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersMessagesGetCall ¶
type UsersMessagesGetCall struct {
// contains filtered or unexported fields
}
func (*UsersMessagesGetCall) Context ¶
func (c *UsersMessagesGetCall) Context(ctx context.Context) *UsersMessagesGetCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersMessagesGetCall) Do ¶
func (c *UsersMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, error)
Do executes the "gmail.users.messages.get" call. Exactly one of *Message or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Message.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersMessagesGetCall) Fields ¶
func (c *UsersMessagesGetCall) Fields(s ...googleapi.Field) *UsersMessagesGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersMessagesGetCall) Format ¶
func (c *UsersMessagesGetCall) Format(format string) *UsersMessagesGetCall
Format sets the optional parameter "format": The format to return the message in.
Possible values:
"full" (default) "metadata" "minimal" "raw"
func (*UsersMessagesGetCall) IfNoneMatch ¶
func (c *UsersMessagesGetCall) IfNoneMatch(entityTag string) *UsersMessagesGetCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*UsersMessagesGetCall) MetadataHeaders ¶
func (c *UsersMessagesGetCall) MetadataHeaders(metadataHeaders ...string) *UsersMessagesGetCall
MetadataHeaders sets the optional parameter "metadataHeaders": When given and format is METADATA, only include headers specified.
type UsersMessagesImportCall ¶
type UsersMessagesImportCall struct {
// contains filtered or unexported fields
}
func (*UsersMessagesImportCall) Context ¶
func (c *UsersMessagesImportCall) Context(ctx context.Context) *UsersMessagesImportCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled. This context will supersede any context previously provided to the ResumableMedia method.
func (*UsersMessagesImportCall) Deleted ¶
func (c *UsersMessagesImportCall) Deleted(deleted bool) *UsersMessagesImportCall
Deleted sets the optional parameter "deleted": Mark the email as permanently deleted (not TRASH) and only visible in Google Apps Vault to a Vault administrator. Only used for Google Apps for Work accounts.
func (*UsersMessagesImportCall) Do ¶
func (c *UsersMessagesImportCall) Do(opts ...googleapi.CallOption) (*Message, error)
Do executes the "gmail.users.messages.import" call. Exactly one of *Message or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Message.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersMessagesImportCall) Fields ¶
func (c *UsersMessagesImportCall) Fields(s ...googleapi.Field) *UsersMessagesImportCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersMessagesImportCall) InternalDateSource ¶
func (c *UsersMessagesImportCall) InternalDateSource(internalDateSource string) *UsersMessagesImportCall
InternalDateSource sets the optional parameter "internalDateSource": Source for Gmail's internal date of the message.
Possible values:
"dateHeader" (default) "receivedTime"
func (*UsersMessagesImportCall) Media ¶
func (c *UsersMessagesImportCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersMessagesImportCall
Media specifies the media to upload in one or more chunks. The chunk size may be controlled by supplying a MediaOption generated by googleapi.ChunkSize. The chunk size defaults to googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload request will be determined by sniffing the contents of r, unless a MediaOption generated by googleapi.ContentType is supplied. At most one of Media and ResumableMedia may be set.
func (*UsersMessagesImportCall) NeverMarkSpam ¶
func (c *UsersMessagesImportCall) NeverMarkSpam(neverMarkSpam bool) *UsersMessagesImportCall
NeverMarkSpam sets the optional parameter "neverMarkSpam": Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox.
func (*UsersMessagesImportCall) ProcessForCalendar ¶
func (c *UsersMessagesImportCall) ProcessForCalendar(processForCalendar bool) *UsersMessagesImportCall
ProcessForCalendar sets the optional parameter "processForCalendar": Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user.
func (*UsersMessagesImportCall) ProgressUpdater ¶
func (c *UsersMessagesImportCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersMessagesImportCall
ProgressUpdater provides a callback function that will be called after every chunk. It should be a low-latency function in order to not slow down the upload operation. This should only be called when using ResumableMedia (as opposed to Media).
func (*UsersMessagesImportCall) ResumableMedia
deprecated
func (c *UsersMessagesImportCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersMessagesImportCall
ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
Deprecated: use Media instead.
At most one of Media and ResumableMedia may be set. mediaType identifies the MIME media type of the upload, such as "image/png". If mediaType is "", it will be auto-detected. The provided ctx will supersede any context previously provided to the Context method.
type UsersMessagesInsertCall ¶
type UsersMessagesInsertCall struct {
// contains filtered or unexported fields
}
func (*UsersMessagesInsertCall) Context ¶
func (c *UsersMessagesInsertCall) Context(ctx context.Context) *UsersMessagesInsertCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled. This context will supersede any context previously provided to the ResumableMedia method.
func (*UsersMessagesInsertCall) Deleted ¶
func (c *UsersMessagesInsertCall) Deleted(deleted bool) *UsersMessagesInsertCall
Deleted sets the optional parameter "deleted": Mark the email as permanently deleted (not TRASH) and only visible in Google Apps Vault to a Vault administrator. Only used for Google Apps for Work accounts.
func (*UsersMessagesInsertCall) Do ¶
func (c *UsersMessagesInsertCall) Do(opts ...googleapi.CallOption) (*Message, error)
Do executes the "gmail.users.messages.insert" call. Exactly one of *Message or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Message.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersMessagesInsertCall) Fields ¶
func (c *UsersMessagesInsertCall) Fields(s ...googleapi.Field) *UsersMessagesInsertCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersMessagesInsertCall) InternalDateSource ¶
func (c *UsersMessagesInsertCall) InternalDateSource(internalDateSource string) *UsersMessagesInsertCall
InternalDateSource sets the optional parameter "internalDateSource": Source for Gmail's internal date of the message.
Possible values:
"dateHeader" "receivedTime" (default)
func (*UsersMessagesInsertCall) Media ¶
func (c *UsersMessagesInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersMessagesInsertCall
Media specifies the media to upload in one or more chunks. The chunk size may be controlled by supplying a MediaOption generated by googleapi.ChunkSize. The chunk size defaults to googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload request will be determined by sniffing the contents of r, unless a MediaOption generated by googleapi.ContentType is supplied. At most one of Media and ResumableMedia may be set.
func (*UsersMessagesInsertCall) ProgressUpdater ¶
func (c *UsersMessagesInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersMessagesInsertCall
ProgressUpdater provides a callback function that will be called after every chunk. It should be a low-latency function in order to not slow down the upload operation. This should only be called when using ResumableMedia (as opposed to Media).
func (*UsersMessagesInsertCall) ResumableMedia
deprecated
func (c *UsersMessagesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersMessagesInsertCall
ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
Deprecated: use Media instead.
At most one of Media and ResumableMedia may be set. mediaType identifies the MIME media type of the upload, such as "image/png". If mediaType is "", it will be auto-detected. The provided ctx will supersede any context previously provided to the Context method.
type UsersMessagesListCall ¶
type UsersMessagesListCall struct {
// contains filtered or unexported fields
}
func (*UsersMessagesListCall) Context ¶
func (c *UsersMessagesListCall) Context(ctx context.Context) *UsersMessagesListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersMessagesListCall) Do ¶
func (c *UsersMessagesListCall) Do(opts ...googleapi.CallOption) (*ListMessagesResponse, error)
Do executes the "gmail.users.messages.list" call. Exactly one of *ListMessagesResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListMessagesResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersMessagesListCall) Fields ¶
func (c *UsersMessagesListCall) Fields(s ...googleapi.Field) *UsersMessagesListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersMessagesListCall) IfNoneMatch ¶
func (c *UsersMessagesListCall) IfNoneMatch(entityTag string) *UsersMessagesListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*UsersMessagesListCall) IncludeSpamTrash ¶
func (c *UsersMessagesListCall) IncludeSpamTrash(includeSpamTrash bool) *UsersMessagesListCall
IncludeSpamTrash sets the optional parameter "includeSpamTrash": Include messages from SPAM and TRASH in the results.
func (*UsersMessagesListCall) LabelIds ¶
func (c *UsersMessagesListCall) LabelIds(labelIds ...string) *UsersMessagesListCall
LabelIds sets the optional parameter "labelIds": Only return messages with labels that match all of the specified label IDs.
func (*UsersMessagesListCall) MaxResults ¶
func (c *UsersMessagesListCall) MaxResults(maxResults int64) *UsersMessagesListCall
MaxResults sets the optional parameter "maxResults": Maximum number of messages to return.
func (*UsersMessagesListCall) PageToken ¶
func (c *UsersMessagesListCall) PageToken(pageToken string) *UsersMessagesListCall
PageToken sets the optional parameter "pageToken": Page token to retrieve a specific page of results in the list.
func (*UsersMessagesListCall) Pages ¶
func (c *UsersMessagesListCall) Pages(ctx context.Context, f func(*ListMessagesResponse) error) error
Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.
func (*UsersMessagesListCall) Q ¶
func (c *UsersMessagesListCall) Q(q string) *UsersMessagesListCall
Q sets the optional parameter "q": Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread".
type UsersMessagesModifyCall ¶
type UsersMessagesModifyCall struct {
// contains filtered or unexported fields
}
func (*UsersMessagesModifyCall) Context ¶
func (c *UsersMessagesModifyCall) Context(ctx context.Context) *UsersMessagesModifyCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersMessagesModifyCall) Do ¶
func (c *UsersMessagesModifyCall) Do(opts ...googleapi.CallOption) (*Message, error)
Do executes the "gmail.users.messages.modify" call. Exactly one of *Message or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Message.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersMessagesModifyCall) Fields ¶
func (c *UsersMessagesModifyCall) Fields(s ...googleapi.Field) *UsersMessagesModifyCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersMessagesSendCall ¶
type UsersMessagesSendCall struct {
// contains filtered or unexported fields
}
func (*UsersMessagesSendCall) Context ¶
func (c *UsersMessagesSendCall) Context(ctx context.Context) *UsersMessagesSendCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled. This context will supersede any context previously provided to the ResumableMedia method.
func (*UsersMessagesSendCall) Do ¶
func (c *UsersMessagesSendCall) Do(opts ...googleapi.CallOption) (*Message, error)
Do executes the "gmail.users.messages.send" call. Exactly one of *Message or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Message.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersMessagesSendCall) Fields ¶
func (c *UsersMessagesSendCall) Fields(s ...googleapi.Field) *UsersMessagesSendCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersMessagesSendCall) Media ¶
func (c *UsersMessagesSendCall) Media(r io.Reader, options ...googleapi.MediaOption) *UsersMessagesSendCall
Media specifies the media to upload in one or more chunks. The chunk size may be controlled by supplying a MediaOption generated by googleapi.ChunkSize. The chunk size defaults to googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload request will be determined by sniffing the contents of r, unless a MediaOption generated by googleapi.ContentType is supplied. At most one of Media and ResumableMedia may be set.
func (*UsersMessagesSendCall) ProgressUpdater ¶
func (c *UsersMessagesSendCall) ProgressUpdater(pu googleapi.ProgressUpdater) *UsersMessagesSendCall
ProgressUpdater provides a callback function that will be called after every chunk. It should be a low-latency function in order to not slow down the upload operation. This should only be called when using ResumableMedia (as opposed to Media).
func (*UsersMessagesSendCall) ResumableMedia
deprecated
func (c *UsersMessagesSendCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersMessagesSendCall
ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
Deprecated: use Media instead.
At most one of Media and ResumableMedia may be set. mediaType identifies the MIME media type of the upload, such as "image/png". If mediaType is "", it will be auto-detected. The provided ctx will supersede any context previously provided to the Context method.
type UsersMessagesService ¶
type UsersMessagesService struct { Attachments *UsersMessagesAttachmentsService // contains filtered or unexported fields }
func NewUsersMessagesService ¶
func NewUsersMessagesService(s *Service) *UsersMessagesService
func (*UsersMessagesService) BatchDelete ¶
func (r *UsersMessagesService) BatchDelete(userId string, batchdeletemessagesrequest *BatchDeleteMessagesRequest) *UsersMessagesBatchDeleteCall
BatchDelete: Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.
func (*UsersMessagesService) Delete ¶
func (r *UsersMessagesService) Delete(userId string, id string) *UsersMessagesDeleteCall
Delete: Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer messages.trash instead.
func (*UsersMessagesService) Get ¶
func (r *UsersMessagesService) Get(userId string, id string) *UsersMessagesGetCall
Get: Gets the specified message.
func (*UsersMessagesService) Import ¶
func (r *UsersMessagesService) Import(userId string, message *Message) *UsersMessagesImportCall
Import: 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.
func (*UsersMessagesService) Insert ¶
func (r *UsersMessagesService) Insert(userId string, message *Message) *UsersMessagesInsertCall
Insert: Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message.
func (*UsersMessagesService) List ¶
func (r *UsersMessagesService) List(userId string) *UsersMessagesListCall
List: Lists the messages in the user's mailbox.
func (*UsersMessagesService) Modify ¶
func (r *UsersMessagesService) Modify(userId string, id string, modifymessagerequest *ModifyMessageRequest) *UsersMessagesModifyCall
Modify: Modifies the labels on the specified message.
func (*UsersMessagesService) Send ¶
func (r *UsersMessagesService) Send(userId string, message *Message) *UsersMessagesSendCall
Send: Sends the specified message to the recipients in the To, Cc, and Bcc headers.
func (*UsersMessagesService) Trash ¶
func (r *UsersMessagesService) Trash(userId string, id string) *UsersMessagesTrashCall
Trash: Moves the specified message to the trash.
func (*UsersMessagesService) Untrash ¶
func (r *UsersMessagesService) Untrash(userId string, id string) *UsersMessagesUntrashCall
Untrash: Removes the specified message from the trash.
type UsersMessagesTrashCall ¶
type UsersMessagesTrashCall struct {
// contains filtered or unexported fields
}
func (*UsersMessagesTrashCall) Context ¶
func (c *UsersMessagesTrashCall) Context(ctx context.Context) *UsersMessagesTrashCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersMessagesTrashCall) Do ¶
func (c *UsersMessagesTrashCall) Do(opts ...googleapi.CallOption) (*Message, error)
Do executes the "gmail.users.messages.trash" call. Exactly one of *Message or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Message.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersMessagesTrashCall) Fields ¶
func (c *UsersMessagesTrashCall) Fields(s ...googleapi.Field) *UsersMessagesTrashCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersMessagesUntrashCall ¶
type UsersMessagesUntrashCall struct {
// contains filtered or unexported fields
}
func (*UsersMessagesUntrashCall) Context ¶
func (c *UsersMessagesUntrashCall) Context(ctx context.Context) *UsersMessagesUntrashCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersMessagesUntrashCall) Do ¶
func (c *UsersMessagesUntrashCall) Do(opts ...googleapi.CallOption) (*Message, error)
Do executes the "gmail.users.messages.untrash" call. Exactly one of *Message or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Message.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersMessagesUntrashCall) Fields ¶
func (c *UsersMessagesUntrashCall) Fields(s ...googleapi.Field) *UsersMessagesUntrashCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersService ¶
type UsersService struct { Drafts *UsersDraftsService History *UsersHistoryService Labels *UsersLabelsService Messages *UsersMessagesService Threads *UsersThreadsService // contains filtered or unexported fields }
func NewUsersService ¶
func NewUsersService(s *Service) *UsersService
func (*UsersService) GetProfile ¶
func (r *UsersService) GetProfile(userId string) *UsersGetProfileCall
GetProfile: Gets the current user's Gmail profile.
func (*UsersService) Stop ¶
func (r *UsersService) Stop(userId string) *UsersStopCall
Stop: Stop receiving push notifications for the given user mailbox.
func (*UsersService) Watch ¶
func (r *UsersService) Watch(userId string, watchrequest *WatchRequest) *UsersWatchCall
Watch: Set up or update a push notification watch on the given user mailbox.
type UsersStopCall ¶
type UsersStopCall struct {
// contains filtered or unexported fields
}
func (*UsersStopCall) Context ¶
func (c *UsersStopCall) Context(ctx context.Context) *UsersStopCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersStopCall) Do ¶
func (c *UsersStopCall) Do(opts ...googleapi.CallOption) error
Do executes the "gmail.users.stop" call.
func (*UsersStopCall) Fields ¶
func (c *UsersStopCall) Fields(s ...googleapi.Field) *UsersStopCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersThreadsDeleteCall ¶
type UsersThreadsDeleteCall struct {
// contains filtered or unexported fields
}
func (*UsersThreadsDeleteCall) Context ¶
func (c *UsersThreadsDeleteCall) Context(ctx context.Context) *UsersThreadsDeleteCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersThreadsDeleteCall) Do ¶
func (c *UsersThreadsDeleteCall) Do(opts ...googleapi.CallOption) error
Do executes the "gmail.users.threads.delete" call.
func (*UsersThreadsDeleteCall) Fields ¶
func (c *UsersThreadsDeleteCall) Fields(s ...googleapi.Field) *UsersThreadsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersThreadsGetCall ¶
type UsersThreadsGetCall struct {
// contains filtered or unexported fields
}
func (*UsersThreadsGetCall) Context ¶
func (c *UsersThreadsGetCall) Context(ctx context.Context) *UsersThreadsGetCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersThreadsGetCall) Do ¶
func (c *UsersThreadsGetCall) Do(opts ...googleapi.CallOption) (*Thread, error)
Do executes the "gmail.users.threads.get" call. Exactly one of *Thread or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Thread.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersThreadsGetCall) Fields ¶
func (c *UsersThreadsGetCall) Fields(s ...googleapi.Field) *UsersThreadsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersThreadsGetCall) Format ¶
func (c *UsersThreadsGetCall) Format(format string) *UsersThreadsGetCall
Format sets the optional parameter "format": The format to return the messages in.
Possible values:
"full" (default) "metadata" "minimal"
func (*UsersThreadsGetCall) IfNoneMatch ¶
func (c *UsersThreadsGetCall) IfNoneMatch(entityTag string) *UsersThreadsGetCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*UsersThreadsGetCall) MetadataHeaders ¶
func (c *UsersThreadsGetCall) MetadataHeaders(metadataHeaders ...string) *UsersThreadsGetCall
MetadataHeaders sets the optional parameter "metadataHeaders": When given and format is METADATA, only include headers specified.
type UsersThreadsListCall ¶
type UsersThreadsListCall struct {
// contains filtered or unexported fields
}
func (*UsersThreadsListCall) Context ¶
func (c *UsersThreadsListCall) Context(ctx context.Context) *UsersThreadsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersThreadsListCall) Do ¶
func (c *UsersThreadsListCall) Do(opts ...googleapi.CallOption) (*ListThreadsResponse, error)
Do executes the "gmail.users.threads.list" call. Exactly one of *ListThreadsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListThreadsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersThreadsListCall) Fields ¶
func (c *UsersThreadsListCall) Fields(s ...googleapi.Field) *UsersThreadsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UsersThreadsListCall) IfNoneMatch ¶
func (c *UsersThreadsListCall) IfNoneMatch(entityTag string) *UsersThreadsListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*UsersThreadsListCall) IncludeSpamTrash ¶
func (c *UsersThreadsListCall) IncludeSpamTrash(includeSpamTrash bool) *UsersThreadsListCall
IncludeSpamTrash sets the optional parameter "includeSpamTrash": Include threads from SPAM and TRASH in the results.
func (*UsersThreadsListCall) LabelIds ¶
func (c *UsersThreadsListCall) LabelIds(labelIds ...string) *UsersThreadsListCall
LabelIds sets the optional parameter "labelIds": Only return threads with labels that match all of the specified label IDs.
func (*UsersThreadsListCall) MaxResults ¶
func (c *UsersThreadsListCall) MaxResults(maxResults int64) *UsersThreadsListCall
MaxResults sets the optional parameter "maxResults": Maximum number of threads to return.
func (*UsersThreadsListCall) PageToken ¶
func (c *UsersThreadsListCall) PageToken(pageToken string) *UsersThreadsListCall
PageToken sets the optional parameter "pageToken": Page token to retrieve a specific page of results in the list.
func (*UsersThreadsListCall) Pages ¶
func (c *UsersThreadsListCall) Pages(ctx context.Context, f func(*ListThreadsResponse) error) error
Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.
func (*UsersThreadsListCall) Q ¶
func (c *UsersThreadsListCall) Q(q string) *UsersThreadsListCall
Q sets the optional parameter "q": Only return threads matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread".
type UsersThreadsModifyCall ¶
type UsersThreadsModifyCall struct {
// contains filtered or unexported fields
}
func (*UsersThreadsModifyCall) Context ¶
func (c *UsersThreadsModifyCall) Context(ctx context.Context) *UsersThreadsModifyCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersThreadsModifyCall) Do ¶
func (c *UsersThreadsModifyCall) Do(opts ...googleapi.CallOption) (*Thread, error)
Do executes the "gmail.users.threads.modify" call. Exactly one of *Thread or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Thread.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersThreadsModifyCall) Fields ¶
func (c *UsersThreadsModifyCall) Fields(s ...googleapi.Field) *UsersThreadsModifyCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersThreadsService ¶
type UsersThreadsService struct {
// contains filtered or unexported fields
}
func NewUsersThreadsService ¶
func NewUsersThreadsService(s *Service) *UsersThreadsService
func (*UsersThreadsService) Delete ¶
func (r *UsersThreadsService) Delete(userId string, id string) *UsersThreadsDeleteCall
Delete: Immediately and permanently deletes the specified thread. This operation cannot be undone. Prefer threads.trash instead.
func (*UsersThreadsService) Get ¶
func (r *UsersThreadsService) Get(userId string, id string) *UsersThreadsGetCall
Get: Gets the specified thread.
func (*UsersThreadsService) List ¶
func (r *UsersThreadsService) List(userId string) *UsersThreadsListCall
List: Lists the threads in the user's mailbox.
func (*UsersThreadsService) Modify ¶
func (r *UsersThreadsService) Modify(userId string, id string, modifythreadrequest *ModifyThreadRequest) *UsersThreadsModifyCall
Modify: Modifies the labels applied to the thread. This applies to all messages in the thread.
func (*UsersThreadsService) Trash ¶
func (r *UsersThreadsService) Trash(userId string, id string) *UsersThreadsTrashCall
Trash: Moves the specified thread to the trash.
func (*UsersThreadsService) Untrash ¶
func (r *UsersThreadsService) Untrash(userId string, id string) *UsersThreadsUntrashCall
Untrash: Removes the specified thread from the trash.
type UsersThreadsTrashCall ¶
type UsersThreadsTrashCall struct {
// contains filtered or unexported fields
}
func (*UsersThreadsTrashCall) Context ¶
func (c *UsersThreadsTrashCall) Context(ctx context.Context) *UsersThreadsTrashCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersThreadsTrashCall) Do ¶
func (c *UsersThreadsTrashCall) Do(opts ...googleapi.CallOption) (*Thread, error)
Do executes the "gmail.users.threads.trash" call. Exactly one of *Thread or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Thread.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersThreadsTrashCall) Fields ¶
func (c *UsersThreadsTrashCall) Fields(s ...googleapi.Field) *UsersThreadsTrashCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersThreadsUntrashCall ¶
type UsersThreadsUntrashCall struct {
// contains filtered or unexported fields
}
func (*UsersThreadsUntrashCall) Context ¶
func (c *UsersThreadsUntrashCall) Context(ctx context.Context) *UsersThreadsUntrashCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersThreadsUntrashCall) Do ¶
func (c *UsersThreadsUntrashCall) Do(opts ...googleapi.CallOption) (*Thread, error)
Do executes the "gmail.users.threads.untrash" call. Exactly one of *Thread or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Thread.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersThreadsUntrashCall) Fields ¶
func (c *UsersThreadsUntrashCall) Fields(s ...googleapi.Field) *UsersThreadsUntrashCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UsersWatchCall ¶
type UsersWatchCall struct {
// contains filtered or unexported fields
}
func (*UsersWatchCall) Context ¶
func (c *UsersWatchCall) Context(ctx context.Context) *UsersWatchCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*UsersWatchCall) Do ¶
func (c *UsersWatchCall) Do(opts ...googleapi.CallOption) (*WatchResponse, error)
Do executes the "gmail.users.watch" call. Exactly one of *WatchResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *WatchResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*UsersWatchCall) Fields ¶
func (c *UsersWatchCall) Fields(s ...googleapi.Field) *UsersWatchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type WatchRequest ¶
type WatchRequest struct { // LabelFilterAction: Filtering behavior of labelIds list specified. // // Possible values: // "exclude" // "include" LabelFilterAction string `json:"labelFilterAction,omitempty"` // LabelIds: List of label_ids to restrict notifications about. By // default, if unspecified, all changes are pushed out. If specified // then dictates which labels are required for a push notification to be // generated. LabelIds []string `json:"labelIds,omitempty"` // TopicName: A fully qualified Google Cloud Pub/Sub API topic name to // publish the events to. This topic name **must** already exist in // Cloud Pub/Sub and you **must** have already granted gmail "publish" // permission on it. For example, // "projects/my-project-identifier/topics/my-topic-name" (using the // Cloud Pub/Sub "v1" topic naming format). // // Note that the "my-project-identifier" portion must exactly match your // Google developer project id (the one executing this watch request). TopicName string `json:"topicName,omitempty"` // ForceSendFields is a list of field names (e.g. "LabelFilterAction") // to unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
WatchRequest: Set up or update a new push notification watch on this user's mailbox.
func (*WatchRequest) MarshalJSON ¶
func (s *WatchRequest) MarshalJSON() ([]byte, error)
type WatchResponse ¶
type WatchResponse struct { // Expiration: When Gmail will stop sending notifications for mailbox // updates (epoch millis). Call watch again before this time to renew // the watch. Expiration int64 `json:"expiration,omitempty,string"` // HistoryId: The ID of the mailbox's current history record. HistoryId uint64 `json:"historyId,omitempty,string"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Expiration") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` }
WatchResponse: Push notification watch response.
func (*WatchResponse) MarshalJSON ¶
func (s *WatchResponse) MarshalJSON() ([]byte, error)