gmail v0.0.10 Gmail.Label

Labels are used to categorize messages and threads within the user’s mailbox.

Summary

Functions

Creates a new label

Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to

Gets the specified label

Gets the specified label

Lists all labels in the user’s mailbox

Updates the specified label

Types

t :: %Gmail.Label{id: term, labelListVisibility: term, messageListVisibility: term, messagesTotal: term, messagesUnread: term, name: term, threadsTotal: term, threadsUnread: term, type: term}

Functions

create(name, user_id \\ "me")

Specs

create(String.t, String.t) :: {:ok, Gmail.Label.t}

Creates a new label.

Gmail API documentation: https://developers.google.com/gmail/api/v1/reference/users/labels/create

delete(label_id, user_id \\ "me")

Specs

delete(String.t, String.t) :: {atom, any}

Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.

Google API Documentation: https://developers.google.com/gmail/api/v1/reference/users/labels/delete

get(id)

Specs

get(String.t) :: {atom, String.t}
get(String.t) :: {atom, Gmail.Label.t}
get(String.t) :: atom
get(String.t) :: {atom, String.t}
get(String.t) :: {atom, Gmail.Label.t}
get(String.t) :: atom

Gets the specified label.

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

get(user_id, id)

Gets the specified label.

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

list(user_id \\ "me")

Specs

list(String.t) :: {:error, any}
list(String.t) :: {:ok, [Gmail.Label.t]}

Lists all labels in the user’s mailbox.

Gmail API Documentation: https://developers.google.com/gmail/api/v1/reference/users/labels/list

update(label, user_id \\ "me")

Specs

update(Gmail.Label.t, String.t) :: {:error, any}
update(Gmail.Label.t, String.t) :: {:ok, Gmail.Label.t}

Updates the specified label.

Google API Documentation: https://developers.google.com/gmail/api/v1/reference/users/labels/update