View Source ExNylas.ConnectorCredentials (ExNylas v0.9.0)

Interface for Nylas connector credentials.

Nylas docs

Summary

Functions

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

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

Create a connector credential.

Create a connector credential.

Delete a connector credential.

Delete a connector credential.

Find a connector credential.

Find a connector credential.

List connector credentials.

List connector credentials.

Update a connector credential.

Update a connector credential.

Functions

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

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

Examples

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

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

Examples

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

create(conn, provider, body)

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

Create a connector credential.

Example

{:ok, cred} = ExNylas.ConnectorCredentials.create(conn, provider, body)
Link to this function

create!(conn, provider, body)

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

Create a connector credential.

Example

cred = ExNylas.ConnectorCredentials.create!(conn, provider, body)
Link to this function

delete(conn, provider, id)

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

Delete a connector credential.

Example

{:ok, res} = ExNylas.ConnectorCredentials.delete(conn, provider, id)
Link to this function

delete!(conn, provider, id)

View Source

Delete a connector credential.

Example

res = ExNylas.ConnectorCredentials.delete!(conn, provider, id)
Link to this function

find(conn, provider, id)

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

Find a connector credential.

Example

{:ok, cred} = ExNylas.ConnectorCredentials.find(conn, provider, id)
Link to this function

find!(conn, provider, id)

View Source

Find a connector credential.

Example

cred = ExNylas.ConnectorCredentials.find(conn, provider, id)
Link to this function

list(conn, provider, params \\ [])

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

List connector credentials.

Example

{:ok, creds} = ExNylas.ConnectorCredentials.list(conn, provider)
Link to this function

list!(conn, provider, params \\ [])

View Source

List connector credentials.

Example

creds = ExNylas.ConnectorCredentials.list!(conn, provider)
Link to this function

update(conn, provider, id, changeset)

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

Update a connector credential.

Examples

iex> {:ok, cred} = ExNylas.ConnectorCredentials.update(conn, provider, id, changeset)
Link to this function

update!(conn, provider, id, changeset)

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

Update a connector credential.

Examples

iex> cred = ExNylas.ConnectorCredentials.update!(conn, provider, id, changeset)