1 class VoteResultStruct < ActionWebService::Struct
2 member :plurality_winners, [:int]
3 member :approval_winners, [:int]
4 member :condorcet_winners, [:int]
5 member :ssd_winners, [:int]
6 member :borda_winners, [:int]
7 member :errors, [:string]
9 class CandidateMap < ActionWebService::Struct
10 member :candidate_ids, [:int]
11 member :candidate_names, [:string]
12 member :errors, [:string]
14 class SelectricityAPI < ActionWebService::API::Base
15 api_method :cast_quickvote, :expects => [:string, :int, [[:int]]], :returns => [:string]
16 api_method :get_quickvote_results, :expects => [:string], :returns => [VoteResultStruct]
17 api_method :get_quickvote_candidate_map, :expects => [:string], :returns => [CandidateMap]
18 api_method :quickvote_candidate_ids_to_names, :expects => [:string,[:int]], :returns => [[:string]]