View Source ExNylas.Channels (ExNylas v0.9.0)

Interface for Nylas channels.

Nylas docs

Summary

Functions

Create and validate a channel, use create/update to send to Nylas.

Create and validate a channel, use create/update to send to Nylas.

Create a(n) channel.

Create a(n) channel.

Delete a(n) channel.

Delete a(n) channel.

Find a(n) channel.

Find a(n) channel.

Get the first channel.

Get the first channel.

Fetch channel(s), optionally provide query params.

Fetch channel(s), optionally provide query params.

Functions

@spec build(map() | struct()) :: {:ok, struct()} | {:error, Ecto.Changeset.t()}

Create and validate a channel, use create/update to send to Nylas.

Examples

iex> {:ok, result} = ExNylas.Channels.build(payload)
@spec build!(map() | struct()) :: struct()

Create and validate a channel, use create/update to send to Nylas.

Examples

iex> result = ExNylas.Channels.build!(payload)
Link to this function

create(conn, body, params \\ [])

View Source
@spec create(ExNylas.Connection.t(), map(), Keyword.t() | map()) ::
  {:ok, ExNylas.Response.t()} | {:error, ExNylas.Response.t()}

Create a(n) channel.

Examples

iex> {:ok, result} = ExNylas.Channels.create(conn, body, params)
Link to this function

create!(conn, body, params \\ [])

View Source
@spec create!(ExNylas.Connection.t(), map(), Keyword.t() | map()) ::
  ExNylas.Response.t()

Create a(n) channel.

Examples

iex> result = ExNylas.Channels.create(conn, body, params)
Link to this function

delete(conn, id, params \\ [])

View Source
@spec delete(ExNylas.Connection.t(), String.t(), Keyword.t() | map()) ::
  {:ok, ExNylas.Response.t()} | {:error, ExNylas.Response.t()}

Delete a(n) channel.

Examples

iex> {:ok, result} = ExNylas.Channels.delete(conn, id, params)
Link to this function

delete!(conn, id, params \\ [])

View Source

Delete a(n) channel.

Examples

iex> result = ExNylas.Channels.delete!(conn, id, params)
Link to this function

find(conn, id, params \\ [])

View Source
@spec find(ExNylas.Connection.t(), String.t(), Keyword.t() | map()) ::
  {:ok, ExNylas.Response.t()} | {:error, ExNylas.Response.t()}

Find a(n) channel.

Examples

iex> {:ok, result} = ExNylas.Channels.find(conn, id, params)
Link to this function

find!(conn, id, params \\ [])

View Source

Find a(n) channel.

Examples

iex> result = ExNylas.Channels.find!(conn, id, params)
Link to this function

first(conn, params \\ [])

View Source
@spec first(ExNylas.Connection.t(), Keyword.t() | map()) ::
  {:ok, ExNylas.Response.t()} | {:error, ExNylas.Response.t()}

Get the first channel.

Examples

iex> {:ok, result} = ExNylas.Channels.first(conn, params)
Link to this function

first!(conn, params \\ [])

View Source

Get the first channel.

Examples

iex> result = ExNylas.Channels.first!(conn, params)
Link to this function

list(conn, params \\ [])

View Source
@spec list(ExNylas.Connection.t(), Keyword.t() | map()) ::
  {:ok, ExNylas.Response.t()} | {:error, ExNylas.Response.t()}

Fetch channel(s), optionally provide query params.

Examples

iex> {:ok, result} = ExNylas.Channels.list(conn, params)
Link to this function

list!(conn, params \\ [])

View Source

Fetch channel(s), optionally provide query params.

Examples

iex> result = ExNylas.Channels.list!(conn, params)
Link to this function

update(conn, id, changeset, params \\ [])

View Source
@spec update(ExNylas.Connection.t(), String.t(), map(), Keyword.t() | map()) ::
  {:ok, ExNylas.Response.t()} | {:error, ExNylas.Response.t()}

Update a(n) channel.

Examples

iex> {:ok, result} = ExNylas.Channels.update(conn, id, body, params)
Link to this function

update!(conn, id, changeset, params \\ [])

View Source
@spec update!(ExNylas.Connection.t(), String.t(), map(), Keyword.t() | map()) ::
  ExNylas.Response.t()

Update a(n) channel.

Examples

iex> result = ExNylas.Channels.update!(conn, id, body, params)