Class: Echo::Backplane

Inherits:
API show all
Includes:
HTTParty
Defined in:
lib/echor/backplane.rb

Instance Method Summary collapse

Constructor Details

#initialize(channel, options = {}) ⇒ Backplane

Returns a new instance of Backplane.



6
7
8
9
10
11
12
# File 'lib/echor/backplane.rb', line 6

def initialize(channel, options={})            
  self.class.debug_output $stdout if Echo.debug
  self.class.base_uri "http://api.echoenabled.com/v1/"
  self.class.basic_auth Echo.user, Echo.password
  
  @channel = channel
end

Instance Method Details

#login(config, echo_id) ⇒ Object

Log in the user in Backplane

the echo server config =

:identityUrl => "http://conferize.com/u/Pdegallego",
:source      => "http://conferize.com",
:username    => "Pdelgallego",
:displayName => "Pdelgallego"



24
25
26
27
# File 'lib/echor/backplane.rb', line 24

def (config, echo_id)      
  data = (config, echo_id, "identity/login")
  perform_request(data)
end

#logout(config, echo_id) ⇒ Object

Log out the user in Backplane

the echo server config =

:identityUrl => "http://conferize.com/u/Pdegallego",
:source      => "http://conferize.com",
:username    => "Pdelgallego",
:displayName => "Pdelgallego"



39
40
41
42
# File 'lib/echor/backplane.rb', line 39

def logout(config, echo_id)      
  data = (config, echo_id, "identity/logout")
  perform_request(data)
end