A really simple Ruby client library for accessing the U.S. EPA's UV Index REST API (More information).
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install epa_uv_index
Retrieve UV indexes for:
Hourly, by zip code
$ EpaUvIndex::Client.hourly_for(:zip => 21209)
Hourly, by city/state
$ EpaUvIndex::Client.hourly_for(:city => 'Baltimore', :state => 'md')
Daily, by zip code
$ EpaUvIndex::Client.daily_for(:zip => 21209)
Daily, by city/state
$ EpaUvIndex::Client.daily_for(:city => 'Baltimore', :state => 'md')
Missing parameters or bad HTTP responses result in Exceptions being raised.
Reporting an Issue
To report an issue or suggest a feature, please use the issues page.
Federal employees and members of the public are encouraged to contribute to the project by forking and submitting a pull request. (If you are new to GitHub, you might start with a basic tutorial.) Specifically:
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request
Note: All contributors retain the original copyright to their code, but by contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users under the terms of the license under which this project is distributed.
This project constitutes a work of the United States Government and is not subject to domestic copyright protection under 17 USC § 105.
This project is licensed under the MIT License. See
LICENSE.txt for more information.