Project

resas_kit

0.0
No commit activity in last 3 years
No release in over 3 years
Client library for the RESAS API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 0.8.19
~> 12.0
~> 3.5
~> 0.47.1
~> 0.12.0
~> 2.3

Runtime

>= 4.2.7.1
~> 0.11.0
 Project Readme

ResasKit

Gem Version Build Status Build Status Build status Build Status Codecov Code Climate Inline docs License

Ruby wrapper for the RESAS API.

Installation

Add this line to your application's Gemfile:

gem 'resas_kit'

And then execute:

$ bundle

Or install it yourself as:

$ gem install resas_kit

Usage

require 'resas_kit'

client = ResasKit::Client.new(api_key: '1234567890ABCDEFGHIJ1234567890abcdefghij')

response = client.get('prefectures')
response.body # get body
response.headers # get headers
response.status # get status

client.get('tourism/foreigners/forFrom', year: 2016, pref_code: '32', purpose: 2, add_area: '31,33') # underscored key
client.get('tourism/foreigners/forFrom', year: 2016, prefCode: '32', purpose: 2, addArea: '31,33') # camelized key
client.get_tourism__foreigners__for_from(year: 2016, pref_code: '32', purpose: 2, add_area: '31,33') # ghost method

client.get('prefectures').body.result[0].pref_name # method chaining

ENV

ENV Variable Description
RESAS_API_KEY Your RESAS API KEY
RESAS_API_VERSION Target RESAS API VERSION

You can create instance more easily.

client = ResasKit::Client.new

Supported RESAS API Version

ResasKit supports RESAS API v1.

ResasKit's API documentation is here.

Supported Ruby Versions

Ruby 2.0.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7

Contributing

  1. Fork it ( https://github.com/emsk/resas_kit/fork )
  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 a new Pull Request

License

MIT