View Source ExNylas.RoomResources (ExNylas v0.9.0)
Interface for Nylas room resources.
Summary
Functions
Fetch all room resource(s) matching the provided query (the SDK will handle paging).
Fetch all room resource(s) matching the provided query (the SDK will handle paging).
Get the first room resource.
Get the first room resource.
Fetch room resource(s), optionally provide query params.
Fetch room resource(s), optionally provide query params.
Functions
@spec all(ExNylas.Connection.t(), Keyword.t() | map()) :: {:ok, [struct()]} | {:error, ExNylas.Response.t()}
Fetch all room resource(s) matching the provided query (the SDK will handle paging).
The second argument can be a keyword list of options + query parameters to pass to the Nylas API (map is also supported). Options supports:
:send_to
- a single arity function to send each page of results (default is nil, e.g. results will be accumulated and returned as a list):delay
- the number of milliseconds to wait between each page request (default is 0; strongly recommended to avoid rate limiting):query
- a keyword list or map of query parameters to pass to the Nylas API (default is an empty list)
Examples
iex> opts = [send_to: &IO.inspect/1, delay: 3_000, query: [key: "value"]]
iex> {:ok, result} = ExNylas.RoomResources.all(conn, opts)
@spec all!(ExNylas.Connection.t(), Keyword.t() | map()) :: [struct()]
Fetch all room resource(s) matching the provided query (the SDK will handle paging).
The second argument can be a keyword list of options + query parameters to pass to the Nylas API (map is also supported). Options supports:
:send_to
- a single arity function to send each page of results (default is nil, e.g. results will be accumulated and returned as a list):delay
- the number of milliseconds to wait between each page request (default is 0; strongly recommended to avoid rate limiting):query
- a keyword list or map of query parameters to pass to the Nylas API (default is an empty list)
Examples
iex> opts = [send_to: &IO.inspect/1, delay: 3_000, query: [key: "value"]]
iex> result = ExNylas.RoomResources.all!(conn, opts)
@spec first(ExNylas.Connection.t(), Keyword.t() | map()) :: {:ok, ExNylas.Response.t()} | {:error, ExNylas.Response.t()}
Get the first room resource.
Examples
iex> {:ok, result} = ExNylas.RoomResources.first(conn, params)
@spec first!(ExNylas.Connection.t(), Keyword.t() | map()) :: ExNylas.Response.t()
Get the first room resource.
Examples
iex> result = ExNylas.RoomResources.first!(conn, params)
@spec list(ExNylas.Connection.t(), Keyword.t() | map()) :: {:ok, ExNylas.Response.t()} | {:error, ExNylas.Response.t()}
Fetch room resource(s), optionally provide query params.
Examples
iex> {:ok, result} = ExNylas.RoomResources.list(conn, params)
@spec list!(ExNylas.Connection.t(), Keyword.t() | map()) :: ExNylas.Response.t()
Fetch room resource(s), optionally provide query params.
Examples
iex> result = ExNylas.RoomResources.list!(conn, params)