StrawHat.Map v1.2.0 StrawHat.Map.States View Source

Defines functionality for states management.

Link to this section Summary

Functions

Creates a state

Destroys a state

Gets a state by id

Gets list of cities

Gets list of counties

Gets a state by id

Gets the list of states

Gets list of states

Link to this section Functions

Link to this function create_state(state_attrs) View Source
create_state(StrawHat.Map.State.state_attrs()) ::
  {:ok, StrawHat.Map.State.t()} | {:error, Ecto.Changeset.t()}

Creates a state.

Link to this function destroy_state(state) View Source
destroy_state(StrawHat.Map.State.t()) ::
  {:ok, StrawHat.Map.State.t()} | {:error, Ecto.Changeset.t()}

Destroys a state.

Link to this function find_state(state_id) View Source
find_state(String.t()) ::
  {:ok, StrawHat.Map.State.t()} | {:error, StrawHat.Error.t()}

Gets a state by id.

Gets list of cities.

Link to this function get_counties(state_ids) View Source
get_counties([integer()]) :: [StrawHat.Map.County.t()] | no_return()

Gets list of counties.

Link to this function get_state(state_id) View Source
get_state(String.t()) :: StrawHat.Map.State.t() | nil | no_return()

Gets a state by id.

Link to this function get_states(pagination \\ []) View Source

Gets the list of states.

Link to this function get_states_by_ids(state_ids) View Source
get_states_by_ids([integer()]) :: [StrawHat.Map.State.t()] | no_return()

Gets list of states.

Updates a state.