Class: Ikbis::Advanced::Test

Inherits:
Base
  • Object
show all
Defined in:
lib/ikbis/advanced/test.rb

Instance Attribute Summary

Attributes inherited from Base

#access_token

Instance Method Summary collapse

Methods inherited from Base

#oauth_authentication

Instance Method Details

#echo(options = {}) ⇒ Object



5
6
7
8
9
10
# File 'lib/ikbis/advanced/test.rb', line 5

def echo(options={})
   options.merge!(:what => "ikbis.test.echo")
   options.merge!(:how => 'xml') unless options.has_key?(:how)
   response = @access_token.post('/api/rest' , options)
   return response.body
end

#login(options = {}) ⇒ Object

ikbis.test.login

-> Is the user logged in?

Returns:

-> <profile>
->      <id>25874</id> 
->      <username>moski_doski</username>
-> </profile>

Error Codes:

->  205: Not Logged in


27
28
29
30
31
# File 'lib/ikbis/advanced/test.rb', line 27

def (options = {})
  options.merge!(:what => "ikbis.test.login")
  options.merge!(:how => "xml") unless options.has_key?(:how)
  return send_request(options)
end

#ping(options = {}) ⇒ Object

ikbis.test.ping

-> This is just a simple ping test...

Returns:

-> <rsp>ok</rsp>


43
44
45
46
47
# File 'lib/ikbis/advanced/test.rb', line 43

def ping(options = {})
  options.merge!(:what => "ikbis.test.ping")
  options.merge!(:how => 'xml') unless options.has_key?(:how)
  return send_request(options)
end