gmail v0.1.15 Gmail.User

Represents a user’s mailbox, holding it’s config and tokens.

Summary

Functions

Gets an attachment from the specified user’s mailbox

Gets a draft from the specified user’s mailbox

Sends a draft from the specified user’s mailbox

Lists the drafts in the specified user’s mailbox

Lists the hsitory for the specified user’s mailbox

Executes an HTTP action

Gets a label from the specified user’s mailbox

Patches a label in the specified user’s mailbox

Lists all labels in the specified user’s mailbox

Gets a message from the specified user’s mailbox

Removes the specified message from the trash in the user’s mailbox

Modifies the labels on a message in the specified user’s mailbox

Lists the messages in the specified user’s mailbox

Gets all the requested messages from the specified user’s mailbox

Searches for messages or threads in the specified user’s mailbox

Starts the process for the specified user

Stops the process for the specified user

Gets a thread from the specified user’s mailbox

Removes the specified thread from the trash in the user’s mailbox

Lists the threads in the specified user’s mailbox

Gets all the requested threads from the specified user’s mailbox

Functions

attachment(user_id, message_id, id)

Gets an attachment from the specified user’s mailbox.

draft(user_id, draft_id)

Specs

draft(String.t, String.t) :: atom

Gets a draft from the specified user’s mailbox.

draft(atom, user_id, draft_id)

Specs

draft(atom, String.t, String.t) :: atom

Sends a draft from the specified user’s mailbox.

drafts(user_id)

Specs

drafts(String.t) :: atom

Lists the drafts in the specified user’s mailbox.

history(user_id, params \\ %{})

Specs

history(String.t, map) :: atom

Lists the hsitory for the specified user’s mailbox.

http_execute(action, state)

Specs

http_execute({atom, String.t, String.t} | {atom, String.t, String.t, map}, map) ::
  atom |
  {atom, map | String.t}

Executes an HTTP action.

label(user_id, label_id)

Specs

label(String.t, String.t) :: atom

Gets a label from the specified user’s mailbox.

label(atom, user_id, label_name)

Specs

label(atom, String.t, map) :: atom
label(atom, String.t, String.t) :: atom

Patches a label in the specified user’s mailbox.

labels(user_id)

Specs

labels(String.t) :: atom

Lists all labels in the specified user’s mailbox.

message(user_id, message_id)

Gets a message from the specified user’s mailbox.

message(user_id, message_id, params)

Specs

message(atom | String.t, String.t, map) :: atom
message(atom | String.t, String.t, map) :: atom

Removes the specified message from the trash in the user’s mailbox.

message(atom, user_id, message_id, labels_to_add, labels_to_remove)

Modifies the labels on a message in the specified user’s mailbox.

messages(user_id)

Lists the messages in the specified user’s mailbox.

messages(user_id, params)

Specs

messages(atom | String.t, map) :: atom

Gets all the requested messages from the specified user’s mailbox.

messages(user_id, message_ids, params)
search(user_id, thread_or_message, query, params \\ %{})

Specs

search(atom | String.t, atom, String.t, map) :: atom

Searches for messages or threads in the specified user’s mailbox.

start_mail(user_id, refresh_token)

Specs

start_mail(String.t, String.t) ::
  {atom, pid} |
  {atom, map}

Starts the process for the specified user.

stop_mail(user_id)

Specs

stop_mail(atom | String.t) :: :ok

Stops the process for the specified user.

thread(user_id, thread_id)

Specs

thread(String.t, String.t) :: atom

Gets a thread from the specified user’s mailbox.

thread(user_id, thread_id, params)

Specs

thread(String.t, String.t, map) :: atom
thread(atom, String.t, String.t) :: atom

Removes the specified thread from the trash in the user’s mailbox.

threads(user_id)

Specs

threads(String.t) :: atom

Lists the threads in the specified user’s mailbox.

threads(user_id, params)

Specs

threads(String.t, map) :: atom
threads(String.t, list) :: atom

Gets all the requested threads from the specified user’s mailbox.

threads(user_id, thread_ids, params)

Specs

threads(String.t, list, map) :: atom