Stories v0.1.1 Stories.Tag View Source
Link to this section Summary
Functions
This lets you assign (and/or remove) a tag to multiple users at once. If the tag does not already exist, it will be created for you.
Create new Elixir.Stories.Tag resource. Parameters are not validated, but passed along in the request body. Please see Stories API documentation for the appropriate body parameters for your resource.
Delete Stories Elixir.Stories.Tag with provided id.
Retrieve Elixir.Stories.Tag by id. Accepts a keyword list of options.
Retrieve list of Elixir.Stories.Tag Stories resource. Shares all options with get/1
Update given Elixir.Stories.Tag resource. Parameters are not validated, but passed along in the request body. Please see Stories API documentation for the appropriate body parameters for your resource.
Link to this section Functions
This lets you assign (and/or remove) a tag to multiple users at once. If the tag does not already exist, it will be created for you.
Example:
iex> Stories.Tag.assign_remove(
...> %Stories.Tag{slug: "test_tag"},
...> %{
...> assign: [
...> %{
...> id: "f3111ed7-9372-453e-8838-19ab2de8adc0"
...> }
...> ],
...> remove: [
...> %{
...> user_id: "b0dbfb1d-fcab-4a27-9193-82b2c55e0675"
...> }
...> ],
...> }
...> )
iex> %Stories.Tag{ id: 14, name: "Test Tag", slug: "test_tag" }
Create new Elixir.Stories.Tag resource. Parameters are not validated, but passed along in the request body. Please see Stories API documentation for the appropriate body parameters for your resource.
returns %Elixir.Stories.Tag{}
Params
properties
- Map of resource properties to create the resource with. This will be different for each resource based on the specification in Stories API
Delete Stories Elixir.Stories.Tag with provided id.
Will return :ok
on success, {:error, 404}
if resource not found, or throw StoriesError
for implementation errors.
Params
id
- id of Elixir.Stories.Tag resource to delete
Retrieve Elixir.Stories.Tag by id. Accepts a keyword list of options.
returns %Elixir.Stories.Tag{}
Options
:id
- The id of the resource you are trying to retrieve. Defaults to empty, giving same behaviour as list/1:get_parameters
- Map of query parameters that you want to include in the query.
Retrieve list of Elixir.Stories.Tag Stories resource. Shares all options with get/1
returns [%Elixir.Stories.Tag{}]
Options
:page
- The page number to use in pagination. Default 1:per_page
- The number of records to return per page. Currently only 50 is supported.:recurse_pages
- Recursively follow each next page and return all records.:get_parameters
- Map of query parameters that you want to include in the query.
Update given Elixir.Stories.Tag resource. Parameters are not validated, but passed along in the request body. Please see Stories API documentation for the appropriate body parameters for your resource.
returns %Elixir.Stories.Tag{}
Params
id
- id ofElixir.Stories.Tag
resource being updated.changes
- Map of changes to be applied to the resource.