README.md in cpiu-0.2.0 vs README.md in cpiu-0.2.1
- old
+ new
@@ -11,11 +11,11 @@
## Installation
Add this line to your application's Gemfile:
```ruby
-gem 'cpiu', '~> 0.1'
+gem 'cpiu', '~> 0.2'
```
And then execute:
```bash
@@ -34,10 +34,12 @@
```ruby
require 'cpiu'
```
+In order to get the most out of the BLS API, you will need a registration key, which can be obtained [here](https://data.bls.gov/registrationEngine/). Create a file named `.env` in the root of your project folder with the contents `BLS_API_KEY=<your key here>`. The API can still be queried without a key, but there are [restrictions](https://www.bls.gov/developers/api_faqs.htm#register1) on what data will be returned.
+
The following methods will retrieve JSON objects containing CPI-U data:
* `CPIU::Data.single_year(year)` - data for a single year
* `CPIU::Data.year_range(startyear, endyear)` - data for a year range no greater than 20 years
@@ -54,10 +56,15 @@
},
...
]
```
+If you just want CPI-U values:
+
+* `CPIU::Data.cpiu_year(year)` - the annual average CPI value for a year
+* `CPIU::Data.cpiu_month(year, month)` - the CPI value for a particular month
+
A raw API call method is available too:
* `CPIU::API.request_data(startyear, endyear, ann_avg, calcs)`
If set to `true`, `ann_avg` will return the average CPI value for each year, and `calcs` will return net and percent changes in CPI. This method returns all response data in the form of a hash:
@@ -109,6 +116,12 @@
Bug reports and pull requests are welcome on GitHub at <https://github.com/clpo13/ruby_cpiu>.
## License
-This code is licensed under [GPLv3](LICENSE.txt).
+Copyright © 2017 Cody Logan
+
+This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+A copy of the GNU General Public License can be found in [LICENSE.txt](LICENSE.txt) and at <http://www.gnu.org/licenses/>.