1 class VoteInfo < ActionWebService::Struct
3 member :voter_ipaddress, :string
4 member :vote_time, :int
7 class VoteResultStruct < ActionWebService::Struct
8 member :plurality_winners, [:int]
9 member :approval_winners, [:int]
10 member :condorcet_winners, [:int]
11 member :ssd_winners, [:int]
12 member :borda_winners, [:int]
13 member :errors, [:string]
15 class CandidateMap < ActionWebService::Struct
16 member :candidate_ids, [:int]
17 member :candidate_names, [:string]
18 member :errors, [:string]
20 class SelectricityAPI < ActionWebService::API::Base
21 api_method :cast_quickvote, :expects => [:string, :int, [[:int]]], :returns => [:string]
22 api_method :get_quickvote_results, :expects => [:string], :returns => [VoteResultStruct]
23 api_method :get_quickvote_candidate_map, :expects => [:string], :returns => [CandidateMap]
24 api_method :quickvote_candidate_ids_to_names, :expects => [:string,[:int]], :returns => [[:string]]
25 api_method :get_quickvote_votes, :expects => [:string], :returns => [ [VoteInfo] ]