Gwitch can get switch games' info (including price) from Nintendo official API.
- ruby >= 2.3
gem install gwitch
Or you can install via Bundler if you are using Rails. Add this line to your application's Gemfile:
gem 'gwitch'
And then execute:
$ bundle
Usage: gwitch [options]
-g, --games Get all games (without price info)
-p, --price alpha2,nsuid1,nsuid2 Get games' price (Max 50 nsuids)
-c, --countries Get avaliable countries' alpha2 code
-v, --version Print version and exit
-h, --help Show help
The returned data will always be in json format.
Can be used with pipes and redirects.
eg.
gwitch -g >> games.json
require 'gwitch'
Get all games.
games = Gwitch::Game.all
Get all avaliable countries.
countries = Gwitch::Country.all
Get country's info.
country = countries.first
country.alpha2 # => 'US'
country.region # => 'Americas'
country.currency # => 'USD'
country.avaliable? # => true
Query games' price (Max 50 games).
prices = Gwitch::Game.price('US', 'en', '70010000000141,70010000000142')
prices = Gwitch::Game.price('US', 'en', ['70010000000141', '70010000000142'])
prices = Gwitch::Game.price('US', 'en', [70010000000141, 70010000000142])
git clone https://github.com/Dounx/gwitch
cd gwitch
gem build gwitch.gemspec
gem install --local gwitch-*.gem
List of available tasks
rake --tasks
Gwitch is an open-sourced software licensed under the MIT license.