gmail v0.1.20 Gmail.Label

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

Link to this section Summary

Functions

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

Converts a Gmail API label resource into a local struct

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

Handles a label delete response from the Gmail API

Handles a label list response from the Gmail API

Handles a label resource response from the Gmail API

Lists all labels in the user’s mailbox

Updates the specified label. This method supports patch semantics

Updates the specified label

Link to this section Types

Link to this type t()
t() :: %Gmail.Label{
  id: term(),
  label_list_visibility: term(),
  message_list_visibility: term(),
  messages_total: term(),
  messages_unread: term(),
  name: term(),
  threads_total: term(),
  threads_unread: term(),
  type: term()
}

Link to this section Functions

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

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

Link to this function convert(result)
convert(map()) :: Gmail.Label.t()

Converts a Gmail API label resource into a local struct.

Link to this function create(user_id, label_name)
create(String.t(), String.t()) :: {atom(), String.t(), String.t(), map()}

Creates a new label.

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

Link to this function delete(user_id, label_id)
delete(String.t(), String.t()) :: {atom(), String.t(), String.t()}

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

Link to this function get(user_id, label_id)
get(String.t(), String.t()) :: {atom(), String.t(), String.t()}

Gets the specified label.

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

Link to this function handle_label_delete_response(response)
handle_label_delete_response(atom() | {atom(), map() | String.t()}) ::
  {atom(), String.t()} | {atom(), map()} | atom()

Handles a label delete response from the Gmail API.

Link to this function handle_label_list_response(response)
handle_label_list_response(atom() | {atom(), map() | String.t()}) ::
  {atom(), String.t() | map()}

Handles a label list response from the Gmail API.

Link to this function handle_label_response(response)
handle_label_response({atom(), map()}) ::
  {atom(), String.t()} | {atom(), map()}
handle_label_response({atom(), String.t()}) ::
  {atom(), String.t()} | {atom(), map()}

Handles a label resource response from the Gmail API.

Link to this function list(user_id)
list(String.t()) :: {atom(), String.t(), String.t()}

Lists all labels in the user’s mailbox.

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

Link to this function patch(user_id, label)
patch(String.t(), Gmail.Label.t()) :: {atom(), String.t(), String.t(), map()}

Updates the specified label. This method supports patch semantics.

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

Link to this function update(user_id, label)
update(String.t(), Gmail.Label.t()) :: {atom(), String.t(), String.t(), map()}

Updates the specified label.

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