Module: PRX::Client

Extended by:
Model
Defined in:
lib/prx/client.rb,
lib/prx/client/version.rb

Constant Summary collapse

VERSION =
"1.0.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.hostObject

Returns the value of attribute host.



15
16
17
# File 'lib/prx/client.rb', line 15

def host
  @host
end

.keyObject

Returns the value of attribute key.



15
16
17
# File 'lib/prx/client.rb', line 15

def key
  @key
end

.portObject

Returns the value of attribute port.



15
16
17
# File 'lib/prx/client.rb', line 15

def port
  @port
end

.schemeObject

Returns the value of attribute scheme.



15
16
17
# File 'lib/prx/client.rb', line 15

def scheme
  @scheme
end

.secretObject

Returns the value of attribute secret.



15
16
17
# File 'lib/prx/client.rb', line 15

def secret
  @secret
end

.tokenObject

Returns the value of attribute token.



15
16
17
# File 'lib/prx/client.rb', line 15

def token
  @token
end

.versionObject

Returns the value of attribute version.



15
16
17
# File 'lib/prx/client.rb', line 15

def version
  @version
end

Class Method Details

.request(opts = {}) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/prx/client.rb', line 18

def request(opts={})
  # puts "PRX::Client::request - opts: #{opts.inspect}"
  path = opts.delete(:path) || ''
  action = opts.delete(:action) || :get
  opts = default_options.merge(opts)

  path = api_path(path) unless path[0] == '/'
  response = access_token.send(action, path, opts)
  # puts response.inspect
  response
end