Class: STSPlatform::Client

Inherits:
RequestHandler show all
Defined in:
lib/stsplatform/client.rb

Overview

The base class of this library. Params:

config

(optional) a configuration dictionary

Returns:

STSPlatformResponse

object containing “data” and “code” parameters

The configuration should be:

"url": "http://wotkit.sensetecnic.com/api",
"auth": {

} Auth should contain either username and password or oauth key, for example: {“username”:“john”, “password”:“smith”} or {“oauth_key”:“2341lkj2f12341”}

Instance Attribute Summary

Attributes inherited from RequestHandler

#_successor, #auth, #resource, #url

Instance Method Summary collapse

Methods inherited from RequestHandler

#delete, #get, #post, #put, #set_config, #set_handler

Constructor Details

#initialize(config = nil) ⇒ Client

Returns a new instance of Client.



21
22
23
24
25
26
# File 'lib/stsplatform/client.rb', line 21

def initialize(config=nil)
  super(nil)
  unless config.nil?
    self.set_config(config)
  end
end