ExClubhouse v0.6.0 ExClubhouse.Api.Category View Source
Category API
Link to this section Summary
Functions
Creates a category
Delete a category
Gets a single category by id
Lists all categories
List all category milestones
Updates a category
Link to this section Functions
Link to this function
create(category_input)
View Sourcecreate(ExClubhouse.Model.Input.Category.t()) :: {:ok, ExClubhouse.Model.Category.t()} | {:error, ExClubhouse.Error.t()}
Creates a category
## Example
iex> ExClubhouse.Api.Category.create(ExClubhouse.Model.Input.Category{...})
{:ok, %ExClubhouse.Model.Category{...}}
Link to this function
create(session, category_input)
View Sourcecreate(ExClubhouse.Session.t(), ExClubhouse.Model.Input.Category.t()) :: {:ok, ExClubhouse.Model.Category.t()} | {:error, ExClubhouse.Error.t()}
Link to this function
delete(category_public_id)
View Sourcedelete(integer()) :: :ok | {:error, ExClubhouse.Error.t()}
Delete a category
## Example
iex> ExClubhouse.Api.Category.delete(1)
:ok
Link to this function
delete(session, category_public_id)
View Sourcedelete(ExClubhouse.Session.t(), integer()) :: :ok | {:error, ExClubhouse.Error.t()}
Link to this function
get(category_public_id)
View Sourceget(integer()) :: {:ok, ExClubhouse.Model.Category.t() | nil} | {:error, ExClubhouse.Error.t()}
Gets a single category by id
## Example
iex> ExClubhouse.Api.Category.get(18)
{:ok, %ExClubhouse.Model.Category{...}}
Link to this function
get(session, category_public_id)
View Sourceget(ExClubhouse.Session.t(), integer()) :: {:ok, ExClubhouse.Model.Category.t() | nil} | {:error, ExClubhouse.Error.t()}
Link to this function
list()
View Sourcelist() :: {:ok, [ExClubhouse.Model.Category.t()]} | {:error, ExClubhouse.Error.t()}
Lists all categories
Example
iex> ExClubhouse.Api.Category.list()
{:ok, [%ExClubhouse.Model.Category{...}, ...]}
Link to this function
list(sess)
View Sourcelist(ExClubhouse.Session.t()) :: {:ok, [ExClubhouse.Model.Category.t()]} | {:error, ExClubhouse.Error.t()}
Link to this function
milestone_list(category_public_id)
View Sourcemilestone_list(integer()) :: {:ok, [ExClubhouse.Model.Milestone.t()]} | {:error, ExClubhouse.Error.t()}
List all category milestones
Example
iex> ExClubhouse.Api.Category.milestone_list(12)
{:ok, [%ExClubhouse.Model.Milestone{...}, ...]}
Link to this function
milestone_list(session, category_public_id)
View Sourcemilestone_list(ExClubhouse.Session.t(), integer()) :: {:ok, ExClubhouse.Model.Category.t() | nil} | {:error, ExClubhouse.Error.t()}
Link to this function
update(category_public_id, category_input)
View Sourceupdate(integer(), ExClubhouse.Model.Input.Category.t()) :: {:ok, ExClubhouse.Model.Category.t()} | {:error, ExClubhouse.Error.t()}
Updates a category
## Example
iex> ExClubhouse.Api.Category.update(1, ExClubhouse.Model.Input.Category{...})
{:ok, %ExClubhouse.Model.Category{...}}
Link to this function
update(session, category_public_id, category_input)
View Sourceupdate(ExClubhouse.Session.t(), integer(), ExClubhouse.Model.Input.Category.t()) :: {:ok, ExClubhouse.Model.Category.t()} | {:error, ExClubhouse.Error.t()}