Project

ale_air

0.0
Low commit activity in last 3 years
A long-lived project that still receives updates
Easy to use air quality of major cities. Everything has been parsed for you and ready to use.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Easy Air Quality Ruby Gem for Major Cities

This is an easy to use Gem for your Ruby projects when you wish to add air quality parameters. It uses World Air Quality Projects open api and parses the responses for ease of use. To use it go to Air Quality Project and apply for a token (you will need it).

Installation

Add this to Gemfile:

gem 'ale_air'

And then execute:

$ bundle install

Or

$ gem install ale_air

Usage

Add

require 'ale_air'

Just initialize first with your token

air_results = AleAir::FetchJSON.new('YOUR_TOKEN')

Now you can get the air quality where you wish. This will return true if succesful and false if some error occured

air_results.air_quality('Helsinki')

Then you can just use the results

air_results.status              -- will return "ok" or "error"
air_results.message             -- what kind of error occured
air_results.location            -- the measurement station location
air_results.quality             -- Air Quality Index scale as defined by the US-EPA 2016
air_results.time_measured       -- time of measurement
air_results.danger_level        -- level
air_results.descriptive_text    -- Ready string with all the info for IRC for example

Development

Install on locally and start developing.

License

MIT License.

Contributing

Report bugs and pull requests on GitHub at https://github.com/FistOfTheNorthStar/ale_air