Waqi
Air Quality Open Data Platform ruby wrapper
Installation
gem 'waqi'And then execute:
$ bundle
Or install it yourself as:
$ gem install waqi
Usage
Initialize the client
require 'waqi'
client = Waqi::Client.new(token: 'secret token')City feed, it returns StationData
client.city_feed('shanghai')Station feed, it returns StationData
client.station_feed(400)Geolocalized feed, it returns StationData
client.geo_feed(37.774929, -122.419416)Local feed, it returns the nearest StationData
client.local_feedFeed map within bounds, it returns an array of StationPin
client.map_stations(39.379436, 116.091230, 40.235643, 116.784382)Search by keyword, it returns an array of StationData
client.search('bangalore')Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/3zcurdia/waqi