Rename Selectricity API calls to more explicitly call itself quickvotes.
[selectricity] / app / models / selectricity_service.rb
index 544b618d7c78fddce9fb5d91f8a3a65cf263264c..a3de89f4923a6f225c1dbe60e5e4d62909a2aed9 100644 (file)
@@ -45,7 +45,7 @@ class SelectricityService < ActionWebService::Base
   def get_quickvote_results(shortname)
     #TODO: Validate shortname
     qv=QuickVote.ident_to_quickvote(shortname)
-    result=VoteResultStruct.new
+    result=QuickVoteResultStruct.new
     unless qv
       raise ArgumentError.new("No quickvote with name #{shortname} found!")
     end
@@ -59,7 +59,7 @@ class SelectricityService < ActionWebService::Base
   end
   def get_quickvote_candidate_map(shortname)
     qv=QuickVote.ident_to_quickvote(shortname)
-    result=CandidateMap.new
+    result=QuickVoteCandidateMap.new
     unless qv
       raise ArgumentError.new("No quickvote with name #{shortname} found!")
     end
@@ -78,7 +78,7 @@ class SelectricityService < ActionWebService::Base
     end
 
     qv.votes.collect do |vote|
-       VoteInfo.new(:voter_id => vote.voter.id,
+       QuickVoterInfo.new(:voter_id => vote.voter.id,
                     :voter_ipaddress => vote.voter.ipaddress,
                     :vote_time => vote.time.to_i,
                     :vote => vote.votes,
@@ -97,7 +97,7 @@ class SelectricityService < ActionWebService::Base
       raise ArgumentError.new("Cannot find QuickVote named #{shortname}")
     end
 
-    ElectionStruct.new(
+    QuickVoteStruct.new(
       :id => election.id,
       :name => election.name,
       :description => election.description,

Benjamin Mako Hill || Want to submit a patch?