1 class ElectionStruct < ActionWebService::Struct
3 member :description, :string
4 member :candidates, [:int]
7 class VoteInfo < ActionWebService::Struct
9 member :voter_ipaddress, :string
10 member :vote_time, :int
13 class VoteResultStruct < ActionWebService::Struct
14 member :plurality_winners, [:int]
15 member :approval_winners, [:int]
16 member :condorcet_winners, [:int]
17 member :ssd_winners, [:int]
18 member :borda_winners, [:int]
19 member :errors, [:string]
21 class CandidateMap < ActionWebService::Struct
22 member :candidate_ids, [:int]
23 member :candidate_names, [:string]
24 member :errors, [:string]
26 class SelectricityAPI < ActionWebService::API::Base
27 api_method :cast_quickvote, :expects => [:string, :int, [[:int]]], :returns => [:string]
28 api_method :get_quickvote_results, :expects => [:string], :returns => [VoteResultStruct]
29 api_method :get_quickvote_candidate_map, :expects => [:string], :returns => [CandidateMap]
30 api_method :quickvote_candidate_ids_to_names, :expects => [:string,[:int]], :returns => [[:string]]
31 api_method :get_quickvote_votes, :expects => [:string], :returns => [ [VoteInfo] ]
32 api_method :list_quickvotes, :expects => [], :returns => [[ElectionStruct]]