All Projects → davidesantangelo → restcountry

davidesantangelo / restcountry

Licence: MIT license
This is a Ruby wrapper library around the API provided by REST Countries http://restcountries.eu

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to restcountry

dkdeploy-typo3-cms
dkdeploy-typo3-cms provides functionality for fully automated deployments targeting TYPO3 CMS applications
Stars: ✭ 16 (-50%)
Mutual labels:  rubygem
material-sass
A rubygem of Material Design for Bootstrap 4
Stars: ✭ 55 (+71.88%)
Mutual labels:  rubygem
git statistics
A gem that allows you to get detailed statistics of a git repository.
Stars: ✭ 62 (+93.75%)
Mutual labels:  rubygem
itunes receipt validator
Validate iTunes Transaction and Unified style receipts with local decoding and remote validation.
Stars: ✭ 38 (+18.75%)
Mutual labels:  rubygem
cli-rubygem
Command line interface for interacting with Civo's cloud API
Stars: ✭ 15 (-53.12%)
Mutual labels:  rubygem
dry-logger
[WIP] Logging library
Stars: ✭ 16 (-50%)
Mutual labels:  rubygem
tty-link
Hyperlinks in your terminal
Stars: ✭ 30 (-6.25%)
Mutual labels:  rubygem
benchmark-trend
Measure performance trends of Ruby code
Stars: ✭ 60 (+87.5%)
Mutual labels:  rubygem
sidekiq queue metrics
Records stats of each sidekiq queue and exposes APIs to retrieve them
Stars: ✭ 29 (-9.37%)
Mutual labels:  rubygem
ruby-sdk
♦️ Ruby SDK to use the IBM Watson services.
Stars: ✭ 45 (+40.63%)
Mutual labels:  rubygem
jekyll-gzip
Generate gzipped assets and files for your Jekyll site at build time
Stars: ✭ 34 (+6.25%)
Mutual labels:  rubygem
ruby terraform
A simple Ruby wrapper for invoking terraform commands.
Stars: ✭ 92 (+187.5%)
Mutual labels:  rubygem
strings-case
Convert strings between different cases.
Stars: ✭ 65 (+103.13%)
Mutual labels:  rubygem
strings-ansi
Handle ANSI escape codes in strings
Stars: ✭ 17 (-46.87%)
Mutual labels:  rubygem
jekyll-target-blank
Automatically opens external links in a new browser for Jekyll Pages, Posts and Docs.
Stars: ✭ 86 (+168.75%)
Mutual labels:  rubygem
ocr space
Free Online OCR for Ruby - Convert images to text
Stars: ✭ 62 (+93.75%)
Mutual labels:  rubygem
honey format
Makes working with CSVs as smooth as honey.
Stars: ✭ 13 (-59.37%)
Mutual labels:  rubygem
dry-transformer
Data transformation toolkit
Stars: ✭ 59 (+84.38%)
Mutual labels:  rubygem
glimmer-dsl-tk
Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library)
Stars: ✭ 26 (-18.75%)
Mutual labels:  rubygem
turkish banks
All Turkish Banks and Their Branches
Stars: ✭ 28 (-12.5%)
Mutual labels:  rubygem

Restcountry

This is a RubyGem wrapper library around the API provided by Restcountries.

Installation

Add this line to your application's Gemfile:

gem 'restcountry'

And then execute:

$ bundle

Or install it yourself as:

$ gem install restcountry

Usage

require 'restcountry'

# Find all countries
countries = Restcountry::Country.all

# Find a country by name
country = Restcountry::Country.find_by_name('italy')

# Access the country's attributes
country.capital
#=> Rome

country.region
#=> Europe

country.callingCodes
#=> "39"

# Find a country by capital
country = Restcountry::Country.find_by_capital('Rome')

country.name
#=> Italy

countries = Restcountry::Country.find_by_lang('it')

countries.first
#=> Holy See

Attributes

name, capital, altSpellings, relevance, region, subregion, translations, population, latlng, demonym, area, gini, timezones, borders, nativeName, callingCodes, topLevelDomain, alpha2Code, alpha3Code, currencies, languages

Credits

Many thanks to Fayder Florez for his implementation of the API.

Contributors

All Contributors

Related projects

gocountries.

License

The restcountry GEM is released under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].