Project

e-stat

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
A Ruby wrapper for the e-Stat API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 10.0
~> 3.0
>= 0

Runtime

< 0.10, >= 0.7
 Project Readme

EStat

Gem Version Build Status

A Ruby wrapper for the e-Stat API

Supported versions

  • Ruby 2.2.x

Installation

Add this line to your application's Gemfile:

gem 'e-stat'

And then execute:

$ bundle

Or install it yourself as:

$ gem install e-stat

Usage

require 'e-stat'

EStat.configure do |config|
  config.app_id = 'YOUR_APP_ID'
end

EStat.stats_list(openYears: '2016', statsCode: '00200502', searchKind: '3', statsNameList: 'Y')
require 'e-stat'

client = EStat::Client.new(app_id: 'YOUR_APP_ID')
list = client.stats_list(openYears: '2016', statsCode: '00200502', searchKind: '3')
stats = client.stats_data(statsDataId: list['GET_STATS_LIST']['DATALIST_INF']['TABLE_INF'][0]['@id'])

Testing

$ export APP_ID=YOUR_APP_ID
$ bundle exec rspec spec