class MailserviceApi < ActionWebService::API::Base #------------------------------------------------------------------------ # Server methods #------------------------------------------------------------------------ api_method :ping, :returns => [ :bool ], :expects => [ ] #------------------------------------------------------------------------ # domain methods #------------------------------------------------------------------------ api_method :domain_login, :returns => [ :bool ], :expects => [ { :domainname => :string }, { :password => :string } ] api_method :domain_logout, :returns => [ :bool ], :expects => [] api_method :domain_logged_in, :returns => [ :bool ], :expects => [] api_method :domain_name, :returns => [ :string ], :expects => [] #------------------------------------------------------------------------ # admin methods #------------------------------------------------------------------------ api_method :is_admin, :returns => [ :bool ], :expects => [ ] api_method :admin_user_signup, :returns => [ :bool ], :expects => [ { :login => :string }, { :password => :string }, { :password_confirmation => :string } ] api_method :admin_user_list, :returns => [ [ [:string, :string] ] ], :expects => [ ] api_method :admin_user_reset_password, :returns => [ :bool ], :expects => [ { :login => :string }, { :password => :string }, { :password_confirmation => :string } ] api_method :admin_user_delete, :returns => [ :bool ], :expects => [ { :login => :string }, { :login_confirmation => :string } ] api_method :admin_get_confirmation_code, :returns => [ :string ], :expects => [ { :mailinglist_name => :string }, { :address => :string } ] #------------------------------------------------------------------------ # user methods #------------------------------------------------------------------------ api_method :user_login, :returns => [ :bool ], :expects => [ { :username => :string }, { :password => :string } ] api_method :user_logout, :returns => [ :bool ], :expects => [] api_method :user_logged_in, :returns => [ :bool ], :expects => [] api_method :user_name, :returns => [ :string ], :expects => [] api_method :user_mailinglists, :returns => [ [ :integer ] ], :expects => [] api_method :user_email_address, :returns => [ :string ], :expects => [] api_method :user_email_addresses, :returns => [ [ :string ] ], :expects => [ ] api_method :user_email_addresses_confirmed, :returns => [ [ :string ] ], :expects => [ ] api_method :user_email_addresses_unconfirmed, :returns => [ [ :string ] ], :expects => [ ] api_method :user_email_address_confirm, :returns => [ :bool ], :expects => [ { :address => :string }, { :code => :string } ] api_method :user_change_password, :returns => [ :bool ], :expects => [ { :old_password => :string }, { :password => :string }, { :password_confirmation => :string } ] api_method :user_real_name, :returns => [ :string ], :expects => [ ] api_method :user_change_real_name, :returns => [ :string ], :expects => [ { :password => :string }, { :new_name => :string } ] api_method :user_email_addresses_add, :returns => [ [ :string ] ], :expects => [ { :addr => :string } ] api_method :user_email_addresses_remove, :returns => [ :string ], :expects => [ { :addr => :string } ] #------------------------------------------------------------------------ # mailing list methods #------------------------------------------------------------------------ api_method :mailinglist_create, :returns => [ :string ], :expects => [ { :name => :string }, { :mailinglist_class => :string } ] api_method :mailinglist_classes, :returns => [ [ :string ] ], :expects => [ ] api_method :mailinglist_class_get_attributes, :returns => [ MailinglistClass], :expects => [ { :mlclass => :string } ] api_method :mailinglist_name, :returns => [ :string ], :expects => [ { :id => :integer } ] api_method :mailinglist_address, :returns => [ :string ], :expects => [ { :id => :integer } ] api_method :mailinglist_find_by_name, :returns => [ :integer ], :expects => [ { :name => :string } ] api_method :mailinglist_delete, :returns => [ :bool ], :expects => [ { :mailinglist_id => :integer } ] api_method :mailinglist_subscribers, :returns => [ [ :string ] ], :expects => [ { :mailinglist_id => :integer } ] api_method :mailinglist_pending, :returns => [ [ :string ] ], :expects => [ { :mailinglist_id => :integer } ] api_method :mailinglist_subscribe, :returns => [ :bool ], :expects => [ { :mailinglist_id => :integer }, { :address => :string } ] api_method :mailinglist_confirm, :returns => [ :bool ], :expects => [ { :mailinglist_name => :string }, { :address => :string }, { :code => :string } ] api_method :mailinglist_unsubscribe, :returns => [ :bool ], :expects => [ { :mailinglist_id => :integer }, { :address => :string } ] api_method :mailinglist_messages, :returns => [ [ :integer ] ], :expects => [ { :mailinglist_id => :integer } ] api_method :message, :returns => [ Message ], :expects => [ { :message_id => :integer } ] api_method :message_parent, :returns => [ :integer ], :expects => [ { :message_id => :integer } ] api_method :message_responses, :returns => [ [ :integer ] ], :expects => [ { :message_id => :integer } ] end