Skip to content

Repository files navigation

This fork was created to fix a specific issue with the base data that the library uses. If for any reason we need to do further changes, we should consider changing libraries

Countries

Build StatusModule VersionHex DocsTotal DownloadLicenseLast Updated

Countries is a collection of all sorts of useful information for every country in the ISO 3166 standard. It is based on the data from the Ruby Gem Countries.

Installation

defpdepsdo[{:countries,"~> 1.6"}]end

After you are done, run mix deps.get in your shell to fetch and compile countries.

Usage

Find country by attribute:

country=Countries.filter_by(:alpha2,"DE")# [%Countries.Country{alpha2: 'DE', alpha3: 'DEU', continent: 'Europe',# country_code: '49', currency: 'EUR', ...]countries=Countries.filter_by(:region,"Europe")Enum.count(countries)# 51

Get all countries:

countries=Countries.allEnum.count(countries)# 250

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright and License

Copyright (c) 2015 Sebastian Szturo

This software is licensed under the MIT license.

About

Collection of Country Information for Elixir.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages