Class: OpenSecrets::Member
Instance Method Summary collapse
-
#get_legislators(options = {}) ⇒ Object
Provides a list of Congressional legislators and associated attributes for specified subset (state, district or specific CID).
-
#pfd(options = {}) ⇒ Object
Returns Personal Financial Disclosure (PFD) information for a member of Congress.
Methods inherited from Base
Constructor Details
This class inherits a constructor from OpenSecrets::Base
Instance Method Details
#get_legislators(options = {}) ⇒ Object
Provides a list of Congressional legislators and associated attributes for specified subset (state, district or specific CID).
See : www.opensecrets.org/api/?method=getLegislators&output=doc
35 36 37 38 39 |
# File 'lib/opensecrets.rb', line 35 def get_legislators( = {}) raise ArgumentError, 'You must provide a :id option' if [:id].nil? || [:id].empty? .merge!({:method => 'getLegislators'}) self.class.get("/", :query => ) end |
#pfd(options = {}) ⇒ Object
Returns Personal Financial Disclosure (PFD) information for a member of Congress.
See : www.opensecrets.org/api/?method=memPFDprofile&output=doc
48 49 50 51 52 53 |
# File 'lib/opensecrets.rb', line 48 def pfd( = {}) raise ArgumentError, 'You must provide a :cid option' if [:cid].nil? || [:cid].empty? raise ArgumentError, 'You must provide a :year option' if [:year].nil? || [:year].empty? .merge!({:method => 'memPFDprofile'}) self.class.get("/", :query => ) end |