Lab v0.2.1-dev Lab.Agent View Source

Documentation for Lab.Agent

Link to this section Summary

Functions

Gets all resource(s) available to the authenticated user

Gets a single resource available to the authenticated user

Link to this section Functions

Link to this function all(resource, opts \\ []) View Source

Gets all resource(s) available to the authenticated user.

Returns {:ok, [%{}, %{}, ...]}.

Examples

iex> alias Lab.Agent
Lab.Agent

iex> Agent.all('/projects')
{:ok, [%{id: 1}, %{id: 2}, %{id: 3}]}

iex> Agent.all('/projects', per_page: 2)
{:ok, [%{id: 1}, %{id: 2}]}
Link to this function get(resource, opts \\ []) View Source

Gets a single resource available to the authenticated user.

Returns {:ok, %{}}.

Examples

iex> alias Lab.Agent
Lab.Agent

iex> Agent.get('/projects/1')
{:ok, [%{id: 1}}