This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.document | Wed Nov 04 13:59:51 -0800 2009 | |
| |
.gitignore | Wed Nov 04 16:32:13 -0800 2009 | |
| |
.yardopts | Wed Nov 04 17:05:49 -0800 2009 | |
| |
LICENSE | Wed Nov 04 13:59:51 -0800 2009 | |
| |
README.rdoc | Thu Nov 05 12:29:30 -0800 2009 | |
| |
Rakefile | Wed Nov 04 16:32:13 -0800 2009 | |
| |
VERSION | Thu Nov 05 11:51:29 -0800 2009 | |
| |
examples/ | Thu Nov 05 11:38:51 -0800 2009 | |
| |
lib/ | Thu Nov 05 11:51:14 -0800 2009 | |
| |
opensecrets.gemspec | Thu Nov 05 11:51:30 -0800 2009 | |
| |
test/ | Wed Nov 04 13:59:51 -0800 2009 |
README.rdoc
opensecrets
A Ruby wrapper around the OpenSecrets.org API.
You will need to have an OpenSecrets.org API key before you can use this library.
See the OpenSecrets API documentation at : www.opensecrets.org/action/api_doc.php
This project was inspired by a project suggestion on the SunlightLabs.com website. If you would like to contribute please see : sunlightlabs.com/projects/opensecrets-ruby/
Installation
[sudo] gem install opensecrets -s http://gemcutter.org
Usage
require 'rubygems'
require 'opensecrets'
require 'crack'
require 'pp'
# Note, you can also provide your API key in an environment variable for security and convenience.
# export OPENSECRETS_API_KEY=YOUR_API_KEY
# If you provide your key this way you do not have to provide a key in the OpenSecrets::*.new constructors.
# A key provided to the constructor overrides any environment variable that is set.
member = OpenSecrets::Member.new('YOUR OPEN SECRETS API KEY')
pp member.pfd({:cid => 'N00007360', :year => '2008'})["response"]
cand = OpenSecrets::Candidate.new('YOUR OPEN SECRETS API KEY')
pp cand.summary({:cid => 'N00007360'})["response"]
com = OpenSecrets::Committee.new('YOUR OPEN SECRETS API KEY')
pp com.by_industry({:cmte => 'HARM', :congno => '110', :indus => 'F10'})["response"]
Project Websites
- Project Home : github.com/grempe/opensecrets/tree/master
- API Documentation : rdoc.info/projects/grempe/opensecrets
- Report Bugs / Request Features : github.com/grempe/opensecrets/issues
TODO
- Shoulda Tests. As there are currently none.
Note on Patches/Pull Requests
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don’t break it in a future version unintentionally.
- Commit, do not mess with rakefile, version, or history.
- Send me a pull request. Bonus points for topic branches.
Copyright
Copyright © 2009 Glenn Rempe. See LICENSE for details.







