gmail v0.1.15 Gmail.Label

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

Summary

Functions

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

Types

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}

Functions

convert(result)

Specs

convert(map) :: Gmail.Label.t

Converts a Gmail API label resource into a local struct.

create(user_id, label_name)

Specs

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

delete(user_id, label_id)

Specs

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

get(user_id, label_id)

Specs

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

handle_label_delete_response(response)

Specs

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

Handles a label delete response from the Gmail API.

handle_label_list_response(response)

Specs

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

Handles a label list response from the Gmail API.

handle_label_response(response)

Specs

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

Handles a label resource response from the Gmail API.

list(user_id)

Specs

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

patch(user_id, label)

Specs

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

update(user_id, label)

Specs

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