Location v0.0.1 Location.Country View Source
A country based on ISO 3166.
Sources
Link to this section Summary
Functions
Find a region based on UN M.49 number or name.
Find a region based on a given field.
List all known countries.
Get the countries regions.
Link to this section Types
Link to this type
t()
View Source
t()
View Source
t() :: %Location.Country{
alpha2: String.t(),
alpha3: String.t(),
code: pos_integer(),
flag: String.t(),
languages: term(),
name: String.t(),
name_native: String.t(),
regions: [pos_integer()]
}
t() :: %Location.Country{ alpha2: String.t(), alpha3: String.t(), code: pos_integer(), flag: String.t(), languages: term(), name: String.t(), name_native: String.t(), regions: [pos_integer()] }
A country based on ISO 3166.
Sources
Link to this section Functions
Link to this function
find(code)
View Source
find(code)
View Source
find(String.t() | pos_integer()) :: t() | nil
find(String.t() | pos_integer()) :: t() | nil
Find a region based on UN M.49 number or name.
Link to this function
find_by(name, atom)
View Source
find_by(name, atom)
View Source
find_by(
String.t() | pos_integer(),
:name | :name_native | :code | :alpha2 | :alpha3
) :: t() | nil
find_by( String.t() | pos_integer(), :name | :name_native | :code | :alpha2 | :alpha3 ) :: t() | nil
Find a region based on a given field.
Link to this function
list()
View Source
list()
View Source
list() :: [t()]
list() :: [t()]
List all known countries.
Link to this function
regions(id)
View Source
regions(id)
View Source
regions(t() | String.t() | nil) :: [Location.Region.t()]
regions(t() | String.t() | nil) :: [Location.Region.t()]
Get the countries regions.