Sha256: 98247633f915019e86bac367947a51b196ecf025b19bcd1301a6beb4b1c7fc84

Contents?: true

Size: 710 Bytes

Versions: 6

Compression:

Stored size: 710 Bytes

Contents

module VoteSmart
  
  class Election < Common
    
    # Returns detailed election information
    def self.get_election election_id
      request("Election.getElection", "electionId" => election_id)
    end
    
    # returns a list of elections based on the criteria
    def self.get_election_by_year_state year, state_id
      request("Election.getElectionByYearState", "year" => year, "stateId" => state_id)
    end
    
    # Returns a list of candidates in the election and election stage provided
    def self.get_stage_candidates election_id, stage_id, party = ""
      request("Election.getStageCandidates", "electionId" => election_id, "stageId" => stage_id, "party" => party)
    end
    
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
netroots-ruby-votesmart-0.2.0 lib/vote_smart/election.rb
netroots-ruby-votesmart-0.2.1 lib/vote_smart/election.rb
netroots-ruby-votesmart-0.2.2 lib/vote_smart/election.rb
netroots-ruby-votesmart-0.2.3 lib/vote_smart/election.rb
netroots-ruby-votesmart-0.2.4 lib/vote_smart/election.rb
votesmart-0.3.0 lib/vote_smart/election.rb