Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phuphighter/fred
Ruby wrapper for the St. Louis Federal Reserve Economic Data (FRED) API
https://github.com/phuphighter/fred
Last synced: about 1 month ago
JSON representation
Ruby wrapper for the St. Louis Federal Reserve Economic Data (FRED) API
- Host: GitHub
- URL: https://github.com/phuphighter/fred
- Owner: phuphighter
- License: mit
- Created: 2010-03-07T04:01:02.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2015-07-22T02:09:36.000Z (over 9 years ago)
- Last Synced: 2024-10-18T15:49:41.818Z (about 2 months ago)
- Language: Ruby
- Homepage: http://api.stlouisfed.org/
- Size: 201 KB
- Stars: 25
- Watchers: 5
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
- awesome-fintech - fred - Ruby wrapper for the St. Louis Federal Reserve Economic Data (FRED) API. (Libraries / Ruby)
README
# Fred
This is a Ruby wrapper for the St. Louis Federal Reserve Economic Data [Fred API](http://api.stlouisfed.org/).
## Installation
As a gem:
gem install fred -v 0.3.0
## Get a FRED API keySign up for a Fred API key: [http://api.stlouisfed.org/api_key.html](http://api.stlouisfed.org/api_key.html)
## Usage### Instantiate a client
>> fred = Fred::Client.new(:api_key => 'your_api_key')
### or configure once>> Fred.configure do |config|
>> config.api_key = 'your_api_key'
>> end
>> fred = Fred::Client.new
#### Examples>> fred.category(nil, :category_id => '125')
=> <#Hashie::Mash categories=<#Hashie::Mash category=<#Hashie::Mash id="125" name="Trade Balance" parent_id="13">>>
>> fred.series(nil, :series_id => 'GNPA')
=> #>>>> fred.series('observations', :series_id => 'GNPA')
=> #,
.....
#] observation_end="9999-12-31" observation_start="1776-07-04" offset="0" order_by="observation_date" output_type="1" realtime_end="2013-08-26" realtime_start="2013-08-26" sort_order="asc" units="lin">>
## CopyrightContact me if you have any suggestions and feel free to fork it!
Copyright (c) 2009 Johnny Khai Nguyen, released under the MIT license