gmail v0.1.17 Gmail.Message

An email message.

Summary

Functions

Gmail API documentation: https://developers.google.com/gmail/api/v1/reference/users/messages#resource

Converts a Gmail API message resource into a local struct

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

Gets the specified message

Handles a message delete response from the Gmail API

Handles a message list response from the Gmail API

Handles a message resource response from the Gmail API

Lists the messages in the user’s mailbox

Modifies the labels on the specified message

Searches for messages in the user’s mailbox

Moves the specified message to the trash

Removes the specified message from the trash

Types

t()
t() :: %Gmail.Message{history_id: term, id: term, label_ids: term, payload: term, raw: term, size_estimate: term, snippet: term, thread_id: term}

Functions

__struct__()

Gmail API documentation: https://developers.google.com/gmail/api/v1/reference/users/messages#resource

convert(message)
convert(map) :: Gmail.Message.t

Converts a Gmail API message resource into a local struct.

delete(user_id, message_id)
delete(String.t, String.t) :: {atom, String.t, String.t}

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

Gmail API documentation: https://developers.google.com/gmail/api/v1/reference/users/messages/delete

get(user_id, message_id, params)
get(String.t, String.t, map) :: {atom, String.t, String.t}

Gets the specified message.

Gmail API documentation: https://developers.google.com/gmail/api/v1/reference/users/messages/get

handle_message_delete_response(response)

Handles a message delete response from the Gmail API.

handle_message_list_response(response)

Handles a message list response from the Gmail API.

handle_message_response(response)

Handles a message resource response from the Gmail API.

list(user_id, params)
list(String.t, map) :: {atom, String.t, String.t}

Lists the messages in the user’s mailbox.

Gmail API documentation: https://developers.google.com/gmail/api/v1/reference/users/messages/list

modify(user_id, message_id, labels_to_add, labels_to_remove)

Modifies the labels on the specified message.

Gmail API documentation: https://developers.google.com/gmail/api/v1/reference/users/messages/modify#http-request

search(user_id, query, params)
search(String.t, String.t, map) :: {atom, String.t, String.t}

Searches for messages in the user’s mailbox.

Gmail API documentation: https://developers.google.com/gmail/api/v1/reference/users/messages/list

trash(user_id, message_id)
trash(String.t, String.t) :: {atom, String.t, String.t}

Moves the specified message to the trash.

Gmail API documentation: https://developers.google.com/gmail/api/v1/reference/users/messages/trash

untrash(user_id, message_id)
untrash(String.t, String.t) :: {atom, String.t, String.t}

Removes the specified message from the trash.

Gmail API documentation: https://developers.google.com/gmail/api/v1/reference/users/messages/untrash