Air Quality Open Data Platform api wrapper
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin rubocop lint Jan 16, 2018
lib rubocop lint Jan 16, 2018
test rubocop lint Jan 16, 2018
.gitignore initial commit Feb 15, 2017
.rubocop.yml rubocop lint Jan 16, 2018
.rubocop_todo.yml rubocop lint Jan 16, 2018
.travis.yml rubocop lint Jan 16, 2018
Gemfile rubocop lint Jan 16, 2018
LICENSE
README.md update readme Mar 3, 2017
Rakefile rubocop lint Jan 16, 2018
changelog.md add changelog Mar 3, 2017
waqi.gemspec

README.md

Waqi

Build Status Code Climate

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_feed

Feed 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