Location v0.0.1 Location.Country View Source

A country based on ISO 3166.

Sources

Link to this section Summary

Types

t()

A country based on ISO 3166.

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() :: %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

Find a region based on UN M.49 number or name.

Link to this function

find_by(name, atom) View Source
find_by(
  String.t() | pos_integer(),
  :name | :name_native | :code | :alpha2 | :alpha3
) :: t() | nil

Find a region based on a given field.

List all known countries.

Link to this function

regions(id) View Source
regions(t() | String.t() | nil) :: [Location.Region.t()]

Get the countries regions.