StrawHat.Map v0.3.0 StrawHat.Map.City View Source
Defines functionality for cities management.
Link to this section Summary
Functions
Create a city
Destroy a city
Get a city by id
Get the list of cities
Get list of cities
Get a city by id
Update a city
Link to this section Functions
Link to this function
create_city(city_attrs)
View Source
create_city(StrawHat.Map.Schema.City.city_attrs()) :: {:ok, StrawHat.Map.Schema.City.t()} | {:error, Ecto.Changeset.t()}
Create a city.
Link to this function
destroy_city(city)
View Source
destroy_city(StrawHat.Map.Schema.City.t()) :: {:ok, StrawHat.Map.Schema.City.t()} | {:error, Ecto.Changeset.t()}
Destroy a city.
Link to this function
find_city(city_id)
View Source
find_city(String.t()) :: {:ok, StrawHat.Map.Schema.City.t()} | {:error, StrawHat.Error.t()}
Get a city by id
.
Link to this function
get_cities(pagination \\ [])
View Source
get_cities(Scrivener.Config.t()) :: Scrivener.Page.t()
Get the list of cities.
Link to this function
get_cities_by_ids(city_ids)
View Source
get_cities_by_ids([integer()]) :: [StrawHat.Map.Schema.City.t()] | no_return()
Get list of cities.
Link to this function
get_city(city_id)
View Source
get_city(String.t()) :: StrawHat.Map.Schema.City.t() | nil | no_return()
Get a city by id
.
Link to this function
update_city(city, city_attrs)
View Source
update_city(StrawHat.Map.Schema.City.t(), StrawHat.Map.Schema.City.city_attrs()) :: {:ok, StrawHat.Map.Schema.City.t()} | {:error, Ecto.Changeset.t()}
Update a city.