Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 45 lines (25 sloc) 1.56 kb
cbbff2c @phuphighter wrapper working now
authored
1 # Fred
2
3 This is a Ruby wrapper for the St. Louis Federal Reserve Economic Data [Fred API](http://api.stlouisfed.org/).
4
5 ## Installation
6
7b109c4 @phuphighter created fred gem
authored
7 As a gem:
8
9 sudo gem install fred
10
11 As a plugin (in your Rails directory):
cbbff2c @phuphighter wrapper working now
authored
12
13 script/plugin install git://github.com/phuphighter/fred.git
14
15 ## Get a FRED API key
16
17 Sign up for a Fred API key: [http://api.stlouisfed.org/api_key.html](http://api.stlouisfed.org/api_key.html)
18
19 ## Usage
20
21 ### Instantiate a client
22
23 >> fred = Fred::Client.new(:api_key => 'your_api_key')
24
25 ### or configure once
26
27 >> Fred.configure do |config|
28 >> config.api_key = 'your_api_key'
29 >> end
30 >> fred = Fred::Client.new
31
32 #### Examples
33
34 >> fred.category(nil, :category_id => '125')
2935f34 @phuphighter tests and now hashed
authored
35 => <#Hashie::Mash categories=<#Hashie::Mash category=<#Hashie::Mash id="125" name="Trade Balance" parent_id="13">>>
cbbff2c @phuphighter wrapper working now
authored
36
2935f34 @phuphighter tests and now hashed
authored
37 >> fred.series(nil, :series_id => 'GNPC')
38 => <#Hashie::Mash seriess=<#Hashie::Mash realtime_end="2008-07-29" realtime_start="2008-07-29" series=<#Hashie::Mash frequency="Annual" frequency_short="A" id="GNPCA" last_updated="2008-03-27 11:16:06-05" observation_end="2007-01-01" observation_start="1929-01-01" realtime_end="2008-07-29" realtime_start="2008-07-29" seasonal_adjustment="Not Applicable" seasonal_adjustment_short="NA" title="Real Gross National Product" units="Billions of Chained 2000 Dollars" units_short="Bil. of Chained 2000 $">>>
cbbff2c @phuphighter wrapper working now
authored
39
40 ## Copyright
41
42 Contact me if you have any suggestions and feel free to fork it!
43
44 Copyright (c) 2009 Johnny Khai Nguyen, released under the MIT license
Something went wrong with that request. Please try again.