e_stat 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -5
- data/lib/e_stat.rb +0 -16
- data/lib/e_stat/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e00ba06b996a5b424dde4bc5b72a59cd18c0783
|
4
|
+
data.tar.gz: 98ccf7c81df71459c64b4be533c7ff0bf5a45426
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4571a1cbf48d732f51920a01555f9c96f064991379aca35540ee6de1763010c479d43fc7ff23a9307190e63bd0c95946cb4a6fe546aaf993099f8796ea83bcca
|
7
|
+
data.tar.gz: f3894472106b89cc49bc5b62cf727c19af521ec096f5a5d8bf7b24f5d913c0e87ff11c3fc35612950ba686ddda53bffc8e149866dfb2a06ab9ee225beed30e42
|
data/README.md
CHANGED
@@ -26,10 +26,10 @@ http://www.e-stat.go.jp/api/
|
|
26
26
|
|
27
27
|
```ruby
|
28
28
|
key = 'api_key'
|
29
|
-
|
29
|
+
estat = EStat::API.new(key)
|
30
30
|
res = es.get_stats_list('0201', '00200521', survey_years: '2000', start_position: '1')
|
31
|
-
|
32
|
-
|
31
|
+
estat.get_meta_info(res.first['@id'])
|
32
|
+
estat.get_stats_data(res.first['@id'])
|
33
33
|
```
|
34
34
|
|
35
35
|
## Development
|
@@ -40,10 +40,9 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
40
40
|
|
41
41
|
## Contributing
|
42
42
|
|
43
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
43
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/klriutsa/e_stat. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
44
44
|
|
45
45
|
|
46
46
|
## License
|
47
47
|
|
48
48
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
49
|
-
|
data/lib/e_stat.rb
CHANGED
@@ -1,18 +1,2 @@
|
|
1
1
|
require 'e_stat/version'
|
2
2
|
require 'e_stat/api'
|
3
|
-
|
4
|
-
module EStat
|
5
|
-
# Your code goes here...
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
def self.find(stats_code)
|
10
|
-
base_url = 'http://api.e-stat.go.jp/rest/2.0/app/json/'
|
11
|
-
key = '5b2d9330be6bc9f0dd64515af255b3b0b2b90be0'
|
12
|
-
|
13
|
-
p url = "#{base_url}getStatsList?appId=#{key}&statsCode=#{stats_code}"
|
14
|
-
|
15
|
-
response = Faraday.get(url)
|
16
|
-
attributes = JSON.parse(response.body)
|
17
|
-
end
|
18
|
-
end
|
data/lib/e_stat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: e_stat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- klriutsa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|