gmail v0.1.20 Gmail.Message

An email message.

Link to this section 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

Link to this section Types

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

Link to this section Functions

Link to this function %Gmail.Message{} (struct)

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

Link to this function convert(message)
convert(map()) :: Gmail.Message.t()

Converts a Gmail API message resource into a local struct.

Link to this function 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

Link to this function 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

Link to this function handle_message_delete_response(response)

Handles a message delete response from the Gmail API.

Link to this function handle_message_list_response(response)

Handles a message list response from the Gmail API.

Link to this function handle_message_response(response)

Handles a message resource response from the Gmail API.

Link to this function 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

Link to this function 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

Link to this function 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

Link to this function 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

Link to this function 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