Gwitch can get switch games' info (including price) from Nintendo official API.
- ruby >= 2.3
gem install gwitchOr 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.jsonrequire 'gwitch'Get all games.
games = Gwitch::Game.allGet all avaliable countries.
countries = Gwitch::Country.allGet country's info.
country = countries.first
country.alpha2 # => 'US'
country.region # => 'Americas'
country.currency # => 'USD'
country.avaliable? # => trueQuery 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-*.gemList of available tasks
rake --tasksGwitch is an open-sourced software licensed under the MIT license.