Module: PRX::Client
- Extended by:
- Model
- Defined in:
- lib/prx/client.rb,
lib/prx/client/version.rb
Constant Summary collapse
- VERSION =
"0.3.0"
Class Attribute Summary collapse
-
.host ⇒ Object
Returns the value of attribute host.
-
.key ⇒ Object
Returns the value of attribute key.
-
.port ⇒ Object
Returns the value of attribute port.
-
.scheme ⇒ Object
Returns the value of attribute scheme.
-
.secret ⇒ Object
Returns the value of attribute secret.
-
.token ⇒ Object
Returns the value of attribute token.
-
.version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
Class Attribute Details
.host ⇒ Object
Returns the value of attribute host.
15 16 17 |
# File 'lib/prx/client.rb', line 15 def host @host end |
.key ⇒ Object
Returns the value of attribute key.
15 16 17 |
# File 'lib/prx/client.rb', line 15 def key @key end |
.port ⇒ Object
Returns the value of attribute port.
15 16 17 |
# File 'lib/prx/client.rb', line 15 def port @port end |
.scheme ⇒ Object
Returns the value of attribute scheme.
15 16 17 |
# File 'lib/prx/client.rb', line 15 def scheme @scheme end |
.secret ⇒ Object
Returns the value of attribute secret.
15 16 17 |
# File 'lib/prx/client.rb', line 15 def secret @secret end |
.token ⇒ Object
Returns the value of attribute token.
15 16 17 |
# File 'lib/prx/client.rb', line 15 def token @token end |
.version ⇒ Object
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 = .merge(opts) path = api_path(path) unless path.starts_with?('/') response = access_token.send(action, path, opts) # puts response.inspect response end |