Documentation ¶
Overview ¶
Package gmailstats offers a collection of facilities to interact with Google Gmail API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetMessagesCall ¶
type GetMessagesCall struct {
// contains filtered or unexported fields
}
func (*GetMessagesCall) Append ¶
func (g *GetMessagesCall) Append() *GetMessagesCall
func (*GetMessagesCall) Do ¶
func (g *GetMessagesCall) Do(numCPU int) *GmailStats
func (*GetMessagesCall) Write ¶
func (g *GetMessagesCall) Write() *GetMessagesCall
type GmailStats ¶
type GmailStats struct { MessageIds []*MessageId Messages []*Message MessagesFile *os.File // contains filtered or unexported fields }
func New ¶
func New() *GmailStats
New creates a GmailStats instance with a service object ready to make API calls.
func (*GmailStats) GetMessages ¶
func (gs *GmailStats) GetMessages() *GetMessagesCall
func (*GmailStats) ListMessages ¶
func (gs *GmailStats) ListMessages() *ListMessagesCall
ListMessages lists a number of messages and store their message ids and thread ids in the calling GmailStats instance. The default number of messages retrieved is 100. Chat messages are excluded.
func (*GmailStats) OpenMessagesFile ¶
func (gs *GmailStats) OpenMessagesFile(filename string)
type ListMessagesCall ¶
type ListMessagesCall struct {
// contains filtered or unexported fields
}
func (*ListMessagesCall) Do ¶
func (l *ListMessagesCall) Do() (*GmailStats, error)
Do executes the ListMessagesCall and stores the retrieved messages in the MessageIds field of the calling GmailStats instance.
func (*ListMessagesCall) MaxResults ¶
func (l *ListMessagesCall) MaxResults(maxResults int64) *ListMessagesCall
MaxResults modifies the ListMessagesCall to retrieve a particular number of messages specified.
func (*ListMessagesCall) Q ¶
func (l *ListMessagesCall) Q(q string) *ListMessagesCall
Q modifies the ListMessagesCall to only search for messages that match the provided query string.
type Message ¶
type Message struct { Id *MessageId `json:"id"` Time *MessageTime `json:"time",omitempty` Header *MessageHeader `json:"header",omitempty` Text *MessageText `json:"text",omitempty` }
type MessageHeader ¶
type MessageText ¶
type MessageTime ¶
type MessageTime struct {
Time int64 `json:"time",omitempty`
}