gmail

package
v0.0.0-...-5c0e9a1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package gmail provides access to the Gmail API.

See https://developers.google.com/gmail/api/

Usage example:

import "camlistore.org/third_party/google.golang.org/api/gmail/v1"
...
gmailService, err := gmail.New(oauthHttpClient)

Index

Constants

View Source
const (
	// View and manage your mail
	MailGoogleComScope = "https://mail.google.com/"

	// Manage drafts and send emails
	GmailComposeScope = "https://www.googleapis.com/auth/gmail.compose"

	// 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"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

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"`
}

type History

type History struct {
	// Id: The mailbox sequence ID.
	Id uint64 `json:"id,omitempty,string"`

	// Messages: The messages that changed in this history record.
	Messages []*Message `json:"messages,omitempty"`
}

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.
	LabelListVisibility string `json:"labelListVisibility,omitempty"`

	// MessageListVisibility: The visibility of the label in the message
	// list in the Gmail web interface.
	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.
	Type string `json:"type,omitempty"`
}

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"`
}

type ListHistoryResponse

type ListHistoryResponse struct {
	// History: List of history records.
	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"`
}

type ListLabelsResponse

type ListLabelsResponse struct {
	// Labels: List of labels.
	Labels []*Label `json:"labels,omitempty"`
}

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"`
}

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"`
}

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"`

	// 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"`
}

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"`
}

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"`
}

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"`
}

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"`
}

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"`
}

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"`
}

type Service

type Service struct {
	BasePath string // API endpoint base URL

	Users *UsersService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

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"`
}

type UsersDraftsCreateCall

type UsersDraftsCreateCall struct {
	// contains filtered or unexported fields
}

func (*UsersDraftsCreateCall) Do

func (c *UsersDraftsCreateCall) Do() (*Draft, error)

func (*UsersDraftsCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UsersDraftsCreateCall) Media

type UsersDraftsDeleteCall

type UsersDraftsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*UsersDraftsDeleteCall) Do

func (c *UsersDraftsDeleteCall) Do() error

func (*UsersDraftsDeleteCall) Fields

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) Do

func (c *UsersDraftsGetCall) Do() (*Draft, error)

func (*UsersDraftsGetCall) Fields

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.

type UsersDraftsListCall

type UsersDraftsListCall struct {
	// contains filtered or unexported fields
}

func (*UsersDraftsListCall) Do

func (*UsersDraftsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

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.

type UsersDraftsSendCall

type UsersDraftsSendCall struct {
	// contains filtered or unexported fields
}

func (*UsersDraftsSendCall) Do

func (c *UsersDraftsSendCall) Do() (*Message, error)

func (*UsersDraftsSendCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UsersDraftsSendCall) Media

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

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) Do

func (c *UsersDraftsUpdateCall) Do() (*Draft, error)

func (*UsersDraftsUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UsersDraftsUpdateCall) Media

type UsersGetProfileCall

type UsersGetProfileCall struct {
	// contains filtered or unexported fields
}

func (*UsersGetProfileCall) Do

func (c *UsersGetProfileCall) Do() (*Profile, error)

func (*UsersGetProfileCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UsersHistoryListCall

type UsersHistoryListCall struct {
	// contains filtered or unexported fields
}

func (*UsersHistoryListCall) Do

func (*UsersHistoryListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

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) 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 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

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) Do

func (c *UsersLabelsCreateCall) Do() (*Label, error)

func (*UsersLabelsCreateCall) Fields

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) Do

func (c *UsersLabelsDeleteCall) Do() error

func (*UsersLabelsDeleteCall) Fields

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) Do

func (c *UsersLabelsGetCall) Do() (*Label, error)

func (*UsersLabelsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UsersLabelsListCall

type UsersLabelsListCall struct {
	// contains filtered or unexported fields
}

func (*UsersLabelsListCall) Do

func (*UsersLabelsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UsersLabelsPatchCall

type UsersLabelsPatchCall struct {
	// contains filtered or unexported fields
}

func (*UsersLabelsPatchCall) Do

func (c *UsersLabelsPatchCall) Do() (*Label, error)

func (*UsersLabelsPatchCall) Fields

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

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) Do

func (c *UsersLabelsUpdateCall) Do() (*Label, error)

func (*UsersLabelsUpdateCall) Fields

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) Do

func (*UsersMessagesAttachmentsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UsersMessagesAttachmentsService

type UsersMessagesAttachmentsService struct {
	// contains filtered or unexported fields
}

func NewUsersMessagesAttachmentsService

func NewUsersMessagesAttachmentsService(s *Service) *UsersMessagesAttachmentsService

func (*UsersMessagesAttachmentsService) Get

Get: Gets the specified message attachment.

type UsersMessagesDeleteCall

type UsersMessagesDeleteCall struct {
	// contains filtered or unexported fields
}

func (*UsersMessagesDeleteCall) Do

func (*UsersMessagesDeleteCall) Fields

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) Do

func (c *UsersMessagesGetCall) Do() (*Message, error)

func (*UsersMessagesGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UsersMessagesGetCall) Format

Format sets the optional parameter "format": The format to return the message in.

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) Do

func (*UsersMessagesImportCall) Fields

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.

func (*UsersMessagesImportCall) Media

type UsersMessagesInsertCall

type UsersMessagesInsertCall struct {
	// contains filtered or unexported fields
}

func (*UsersMessagesInsertCall) Do

func (*UsersMessagesInsertCall) Fields

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.

func (*UsersMessagesInsertCall) Media

type UsersMessagesListCall

type UsersMessagesListCall struct {
	// contains filtered or unexported fields
}

func (*UsersMessagesListCall) Do

func (*UsersMessagesListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

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) Q

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) Do

func (*UsersMessagesModifyCall) Fields

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) Do

func (c *UsersMessagesSendCall) Do() (*Message, error)

func (*UsersMessagesSendCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UsersMessagesSendCall) Media

type UsersMessagesService

type UsersMessagesService struct {
	Attachments *UsersMessagesAttachmentsService
	// contains filtered or unexported fields
}

func NewUsersMessagesService

func NewUsersMessagesService(s *Service) *UsersMessagesService

func (*UsersMessagesService) Delete

Delete: Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer messages.trash instead.

func (*UsersMessagesService) Get

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

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

Trash: Moves the specified message to the trash.

func (*UsersMessagesService) Untrash

Untrash: Removes the specified message from the trash.

type UsersMessagesTrashCall

type UsersMessagesTrashCall struct {
	// contains filtered or unexported fields
}

func (*UsersMessagesTrashCall) Do

func (c *UsersMessagesTrashCall) Do() (*Message, error)

func (*UsersMessagesTrashCall) Fields

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) Do

func (*UsersMessagesUntrashCall) Fields

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.

type UsersThreadsDeleteCall

type UsersThreadsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*UsersThreadsDeleteCall) Do

func (c *UsersThreadsDeleteCall) Do() error

func (*UsersThreadsDeleteCall) Fields

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) Do

func (c *UsersThreadsGetCall) Do() (*Thread, error)

func (*UsersThreadsGetCall) Fields

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.

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) Do

func (*UsersThreadsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

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) Q

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) Do

func (c *UsersThreadsModifyCall) Do() (*Thread, error)

func (*UsersThreadsModifyCall) Fields

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

Delete: Immediately and permanently deletes the specified thread. This operation cannot be undone. Prefer threads.trash instead.

func (*UsersThreadsService) Get

Get: Gets the specified thread.

func (*UsersThreadsService) List

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

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) Do

func (c *UsersThreadsTrashCall) Do() (*Thread, error)

func (*UsersThreadsTrashCall) Fields

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) Do

func (c *UsersThreadsUntrashCall) Do() (*Thread, error)

func (*UsersThreadsUntrashCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL