class OpenSecrets::Candidate
Public Instance Methods
Provides total contributed to specified candidate from specified industry for specified cycle.
See : www.opensecrets.org/api/?method=candIndByInd&output=doc
@option options [String] :cid (“”) a CRP CandidateID @option options [String] :ind (“”) a a 3-character industry code @option options [optional, String] :cycle (“”) 2012, 2014 available. leave blank for latest cycle
# File lib/opensecrets.rb, line 106 def contributions_by_industry(options = {}) raise ArgumentError, 'You must provide a :cid option' if options[:cid].nil? || options[:cid].empty? raise ArgumentError, 'You must provide a :ind option' if options[:ind].nil? || options[:ind].empty? options.merge!({:method => 'CandIndByInd'}) self.class.get("/", :query => options) end
Provides the top organizations contributing to specified politician.
See : www.opensecrets.org/api/?method=candContrib&output=doc
@option options [String] :cid (“”) a CRP CandidateID @option options [optional, String] :cycle (“”) 2008 or 2010.
# File lib/opensecrets.rb, line 79 def contributors(options = {}) raise ArgumentError, 'You must provide a :cid option' if options[:cid].nil? || options[:cid].empty? options.merge!({:method => 'candContrib'}) self.class.get("/", :query => options) end
Provides the top industries contributing to a specified politician.
See : www.opensecrets.org/api/?method=candIndustry&output=doc
@option options [String] :cid (“”) a CRP CandidateID @option options [optional, String] :cycle (“”) blank values returns current cycle.
# File lib/opensecrets.rb, line 92 def industries(options = {}) raise ArgumentError, 'You must provide a :cid option' if options[:cid].nil? || options[:cid].empty? options.merge!({:method => 'candIndustry'}) self.class.get("/", :query => options) end
Provides sector total of specified politician’s receipts.
See : www.opensecrets.org/api/?method=candSector&output=doc
@option options [String] :cid (“”) a CRP CandidateID @option options [optional, String] :cycle (“”) blank values returns current cycle.
# File lib/opensecrets.rb, line 120 def sector(options = {}) raise ArgumentError, 'You must provide a :cid option' if options[:cid].nil? || options[:cid].empty? options.merge!({:method => 'candSector'}) self.class.get("/", :query => options) end
Provides summary fundraising information for specified politician.
See : www.opensecrets.org/api/?method=candSummary&output=doc
@option options [String] :cid (“”) a CRP CandidateID @option options [optional, String] :cycle (“”) blank values returns current cycle.
# File lib/opensecrets.rb, line 66 def summary(options = {}) raise ArgumentError, 'You must provide a :cid option' if options[:cid].nil? || options[:cid].empty? options.merge!({:method => 'candSummary'}) self.class.get("/", :query => options) end