StrawHat.Map v0.3.1 StrawHat.Map.Place View Source
Defines functionality for places management.
Link to this section Summary
Functions
Create a place
Destroy a place
Get a place by id
Get a place by id
Get the list of places
Get list of places
Update a place
Link to this section Functions
Link to this function
create_place(place_attrs)
View Source
create_place(StrawHat.Map.Schema.Place.place_attrs()) :: {:ok, StrawHat.Map.Schema.Place.t()} | {:error, Ecto.Changeset.t()}
Create a place.
Link to this function
destroy_place(place)
View Source
destroy_place(StrawHat.Map.Schema.Place.t()) :: {:ok, StrawHat.Map.Schema.Place.t()} | {:error, Ecto.Changeset.t()}
Destroy a place.
Link to this function
find_place(place_id)
View Source
find_place(String.t()) :: {:ok, StrawHat.Map.Schema.Place.t()} | {:error, StrawHat.Error.t()}
Get a place by id
.
Link to this function
get_place(place_id)
View Source
get_place(String.t()) :: StrawHat.Map.Schema.Place.t() | nil | no_return()
Get a place by id
.
Link to this function
get_places(pagination \\ [])
View Source
get_places(Scrivener.Config.t()) :: Scrivener.Page.t()
Get the list of places.
Link to this function
get_places_by_ids(place_ids)
View Source
get_places_by_ids([integer()]) :: [StrawHat.Map.Schema.Place.t()] | no_return()
Get list of places.
Link to this function
get_places_by_owner(owner_id, pagination \\ [])
View Source
get_places_by_owner(integer(), Scrivener.Config.t()) :: Scrivener.Page.t()
Link to this function
update_place(place, place_attrs)
View Source
update_place( StrawHat.Map.Schema.Place.t(), StrawHat.Map.Schema.Place.place_attrs() ) :: {:ok, StrawHat.Map.Schema.Place.t()} | {:error, Ecto.Changeset.t()}
Update a place.