lib/webex/user/partner.rb in webex-0.0.1 vs lib/webex/user/partner.rb in webex-0.0.2
- old
+ new
@@ -1,25 +1,26 @@
module Webex
module User
# comment
class Partner
include Webex
+ include Webex::User
attr_accessor :webex_id, :ticket, :password, :back_type, :back_url, :email,
:session, :first_name, :last_name, :new_password
def initialize(attributes = {})
attributes.each { |k, v| send("#{k}=", v) }
env_attributes!
option_required! :webex_id, :back_type, :back_url
end
def login
- { params: generate_params(api_type: 'LI'),
- url: URI.join(CONFIGURATION.host_url + PATH_URL) }
+ res = Net::HTTP.post_form post_url, generate_params(api_type: 'LI')
+ Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
end
def logout
- { params: generate_params(api_type: 'LO'),
- url: URI.join(CONFIGURATION.host_url + PATH_URL) }
+ res = Net::HTTP.post_form post_url, generate_params(api_type: 'LO')
+ Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
end
private
def generate_params(overwrite_params = {})