ExClubhouse v0.6.0 ExClubhouse.Api.Category View Source

Category API

Link to this section Summary

Link to this section Functions

Creates a category

## Example

iex> ExClubhouse.Api.Category.create(ExClubhouse.Model.Input.Category{...})
{:ok, %ExClubhouse.Model.Category{...}}
Link to this function

delete(category_public_id)

View Source
delete(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 Source
delete(ExClubhouse.Session.t(), integer()) ::
  :ok | {:error, ExClubhouse.Error.t()}
Link to this function

get(category_public_id)

View Source
get(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 Source

Lists all categories

Example

iex> ExClubhouse.Api.Category.list()
{:ok, [%ExClubhouse.Model.Category{...}, ...]}
Link to this function

milestone_list(category_public_id)

View Source
milestone_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 Source
milestone_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 Source

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 Source