Project

waqi

0.0
No commit activity in last 3 years
No release in over 3 years
Air Quality Open Data Platform ruby wrapper
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 5.0
~> 0.10.3
~> 10.0
~> 3.0
~> 2.3

Runtime

~> 0.10
~> 2.0
 Project Readme

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