Cyphi.Badges (Cyphi v0.1.0)

Provides API endpoints related to badges

Summary

Types

badge_award_crud_list_400_json_resp()

@type badge_award_crud_list_400_json_resp() :: %{message: String.t() | nil}

badge_award_crud_list_403_json_resp()

@type badge_award_crud_list_403_json_resp() :: %{message: String.t() | nil}

badge_award_crud_list_404_json_resp()

@type badge_award_crud_list_404_json_resp() :: %{message: String.t() | nil}

badge_award_crud_list_405_json_resp()

@type badge_award_crud_list_405_json_resp() :: %{message: String.t() | nil}

badge_crud_get_400_json_resp()

@type badge_crud_get_400_json_resp() :: %{message: String.t() | nil}

badge_crud_get_403_json_resp()

@type badge_crud_get_403_json_resp() :: %{message: String.t() | nil}

badge_crud_get_404_json_resp()

@type badge_crud_get_404_json_resp() :: %{message: String.t() | nil}

badge_crud_get_405_json_resp()

@type badge_crud_get_405_json_resp() :: %{message: String.t() | nil}

badge_crud_list_400_json_resp()

@type badge_crud_list_400_json_resp() :: %{message: String.t() | nil}

badge_crud_list_403_json_resp()

@type badge_crud_list_403_json_resp() :: %{message: String.t() | nil}

badge_crud_list_404_json_resp()

@type badge_crud_list_404_json_resp() :: %{message: String.t() | nil}

badge_crud_list_405_json_resp()

@type badge_crud_list_405_json_resp() :: %{message: String.t() | nil}

Functions

badge_award_crud_list(id, opts \\ [])

List badge awards

Return a list of the occasions that this badge was awarded.

Options

  • $after: Used for fast paging by setting the value to the last object id. This cannot be used with the $order parameter.
  • $count: If true, just return the number of list items in the form {'count' : number}.
  • $filter: Filter using JSON structure, with attributes taken from this list: user_id, id, awarded_at.
  • $include: Comma separated list of relationships to include in the results, taken from this list: user, awardee.
  • $limit: Limit the number of returned objects. The default is 10, the maximum is 100.
  • $offset: Used for paging through a small dataset, and it can be used with the $order parameter. This cannot be used with the $after parameter.

badge_crud_get(id, opts \\ [])

Get badge

Return the badge with the specified ID.

badge_crud_list(opts \\ [])

List badges

Return a list of badges. You can provide one or more optional filters. Currently this operation only returns badges that are in the school/business library or in an organization library; future versions may include a way to specify the library/libraries to search.

Options

  • $after: Used for fast paging by setting the value to the last object id. This cannot be used with the $order parameter.
  • $count: If true, just return the number of list items in the form {'count' : number}.
  • $filter: Filter using JSON structure, with attributes taken from this list: id, name, tags, metadata.creator_id, metadata.created_at, metadata.language.
  • $limit: Limit the number of returned objects. The default is 10, the maximum is 100.
  • $offset: Used for paging through a small dataset, and it can be used with the $order parameter. This cannot be used with the $after parameter.
  • $order: Comma separated attribute names to sort by, taken from this list: id, name. Add :desc to the end of an attribute name for descending order. This cannot be used with the $after parameter.