gmail v0.1.20 Gmail.User

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

Link to this section Summary

Functions

Gets an attachment from the specified user’s mailbox

Returns a specification to start this module under a supervisor

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

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

Link to this section Functions

Link to this function attachment(user_id, message_id, id)

Gets an attachment from the specified user’s mailbox.

Link to this function child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function draft(user_id, draft_id)
draft(String.t(), String.t()) :: atom()

Gets a draft from the specified user’s mailbox.

Link to this function draft(atom, user_id, draft_id)
draft(atom(), String.t(), String.t()) :: atom()

Sends a draft from the specified user’s mailbox.

Link to this function drafts(user_id)
drafts(String.t()) :: atom()

Lists the drafts in the specified user’s mailbox.

Link to this function history(user_id, params \\ %{})
history(String.t(), map()) :: atom()

Lists the hsitory for the specified user’s mailbox.

Link to this function http_execute(action, state)
http_execute({atom(), String.t(), String.t()}, map()) ::
  {atom(), map()} | {atom(), String.t()}
http_execute({atom(), String.t(), String.t(), map()}, map()) ::
  {atom(), map()} | {atom(), String.t()}

Executes an HTTP action.

Link to this function label(user_id, label_id)
label(String.t(), String.t()) :: atom()

Gets a label from the specified user’s mailbox.

Link to this function label(atom, user_id, label_name)
label(atom(), String.t(), map()) :: atom()
label(atom(), String.t(), String.t()) :: atom()

Patches a label in the specified user’s mailbox.

Link to this function labels(user_id)
labels(String.t()) :: atom()

Lists all labels in the specified user’s mailbox.

Link to this function message(user_id, message_id)

Gets a message from the specified user’s mailbox.

Link to this function message(user_id, message_id, params)
message(atom(), String.t(), map()) :: atom()
message(String.t(), String.t(), map()) :: atom()

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

Link to this function message(atom, user_id, message_id, labels_to_add, labels_to_remove)

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

Link to this function messages(user_id, params \\ %{})
messages(atom(), map()) :: atom()
messages(String.t(), map()) :: atom()

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

Link to this function messages(user_id, message_ids, params)
Link to this function search(user_id, thread_or_message, query, params \\ %{})
search(atom(), atom(), String.t(), map()) :: atom()
search(String.t(), atom(), String.t(), map()) :: atom()

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

Link to this function start_mail(user_id, refresh_token)
start_mail(String.t(), String.t()) :: {atom(), pid()} | {atom(), map()}

Starts the process for the specified user.

Link to this function stop_mail(user_id)
stop_mail(atom() | String.t()) :: :ok

Stops the process for the specified user.

Link to this function thread(user_id, thread_id)
thread(String.t(), String.t()) :: atom()

Gets a thread from the specified user’s mailbox.

Link to this function thread(user_id, thread_id, params)
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.

Link to this function threads(user_id)
threads(String.t()) :: atom()

Lists the threads in the specified user’s mailbox.

Link to this function threads(user_id, params)
threads(String.t(), map()) :: atom()
threads(String.t(), list()) :: atom()

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

Link to this function threads(user_id, thread_ids, params)
threads(String.t(), list(), map()) :: atom()