worldwide/country
Types
A country.
pub type Country {
Country(
name: String,
alpha2: String,
alpha3: String,
numeric: String,
region: region.Region,
subregion: option.Option(subregion.Subregion),
capital: option.Option(String),
currencies: List(currency.Currency),
languages: List(language.Language),
calling_codes: List(calling_code.CallingCode),
timezones: List(duration.Duration),
)
}
Constructors
-
Country( name: String, alpha2: String, alpha3: String, numeric: String, region: region.Region, subregion: option.Option(subregion.Subregion), capital: option.Option(String), currencies: List(currency.Currency), languages: List(language.Language), calling_codes: List(calling_code.CallingCode), timezones: List(duration.Duration), )Arguments
- name
-
Common English name, e.g. “Spain”.
- alpha2
-
ISO 3166-1 alpha-2 code, uppercase, e.g. “ES”.
- alpha3
-
ISO 3166-1 alpha-3 code, uppercase, e.g. “ESP”.
- numeric
-
ISO 3166-1 numeric code as a zero-padded string, e.g. “724”.
- region
-
Continental region.
- subregion
-
Continental subregion.
- capital
-
Capital city, if the country has one.
- currencies
-
Currencies in use, primary first. May be empty.
- languages
-
Official / common languages. May be empty.
- calling_codes
-
International dialing codes. May be empty.
- timezones
-
Fixed UTC offsets used by the country. May be empty.