Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Ruby client library for the EPA's UV Index REST API (http://www.epa.gov/enviro/facts/services.html#uvindex)
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib Add dependencies to gemspec, bump version to 0.0.3
spec Add tests, bump version to 0.0.2
.gitignore
.rspec
Gemfile Initial commit
LICENSE.txt license clarification, fleshed out how to contribute
README.md
Rakefile
epa_uv_index.gemspec Add dependencies to gemspec, bump version to 0.0.3

README.md

EpaUvIndex

A really simple Ruby client library for accessing the U.S. EPA's UV Index REST API (More information).

Installation

Add this line to your application's Gemfile:

gem 'epa_uv_index'

And then execute:

$ bundle

Or install it yourself as:

$ gem install epa_uv_index

Usage

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.

Contributing

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:

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. 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.

License

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.

Something went wrong with that request. Please try again.