Skip to content

Navigation Menu

Sign in
Sign up

Repository files navigation

Tottori OpenData PM2.5 API

Gem Version

This API gets data which is the concentration of PM2.5 (fine particulate matter) in the atmosphere in Tottori Prefecture, Japan from http://tottori-taiki.users.tori-info.co.jp/taiki/pc/graph/ as Open Data licensed CC-BY.

Installation

$ gem install tottori-opendata-pm25-api

Usage

CLI:

$ tottori-opendata-pm25-api | jq . | head
[
 {
 "name": "県庁西町分庁舎",
 "values": [
 {
 "time": "2017年01月23日T00:00:00.000+09:00",
 "value": 9
 },
 {
 "time": "2017年01月23日T01:00:00.000+09:00",

API:

require 'tottori-opendata-pm25-api'
require 'time'
require 'json'
require 'active_support/json'
ActiveSupport::JSON::Encoding.use_standard_json_time_format = true
puts Tottori::OpenData::PM25::API.get(Time.now).to_json

License

The gem is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /