Class: Cloopen::REST::Client
- Inherits:
-
Object
- Object
- Cloopen::REST::Client
- Includes:
- Utils
- Defined in:
- lib/cloopen/rest/client.rb
Constant Summary collapse
- API_VERSION =
'2013-03-22'- HTTP_HEADERS =
{ 'Accept' => 'application/xml', 'Content-Type' => 'application/xml;charset=utf-8' }
- PRODUCTION_HOST =
'https://app.cloopen.com'- LOCAL_HOST =
'http://localhost'- SANDBOX_HOST =
'https://sandboxapp.cloopen.com'
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#account_sid ⇒ Object
readonly
Returns the value of attribute account_sid.
-
#app_id ⇒ Object
readonly
Returns the value of attribute app_id.
-
#auth_token ⇒ Object
readonly
Returns the value of attribute auth_token.
-
#authorization ⇒ Object
readonly
Returns the value of attribute authorization.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
Instance Method Summary collapse
-
#initialize(account_sid, auth_token, app_id, options = {}) ⇒ Client
constructor
A new instance of Client.
- #inspec ⇒ Object
Methods included from Utils
#beautify_hash, #build_body, #cloopfy, #decloopfy, #downcase_first, #prase_body
Constructor Details
#initialize(account_sid, auth_token, app_id, options = {}) ⇒ Client
Returns a new instance of Client.
19 20 21 22 23 24 |
# File 'lib/cloopen/rest/client.rb', line 19 def initialize(account_sid, auth_token, app_id, ={}) @account_sid, @auth_token, @app_id = account_sid.strip, auth_token.strip, app_id.strip @config = apply_defaults() set_up_subresources end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
17 18 19 |
# File 'lib/cloopen/rest/client.rb', line 17 def account @account end |
#account_sid ⇒ Object (readonly)
Returns the value of attribute account_sid.
17 18 19 |
# File 'lib/cloopen/rest/client.rb', line 17 def account_sid @account_sid end |
#app_id ⇒ Object (readonly)
Returns the value of attribute app_id.
17 18 19 |
# File 'lib/cloopen/rest/client.rb', line 17 def app_id @app_id end |
#auth_token ⇒ Object (readonly)
Returns the value of attribute auth_token.
17 18 19 |
# File 'lib/cloopen/rest/client.rb', line 17 def auth_token @auth_token end |
#authorization ⇒ Object (readonly)
Returns the value of attribute authorization.
17 18 19 |
# File 'lib/cloopen/rest/client.rb', line 17 def @authorization end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
17 18 19 |
# File 'lib/cloopen/rest/client.rb', line 17 def config @config end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
17 18 19 |
# File 'lib/cloopen/rest/client.rb', line 17 def headers @headers end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
17 18 19 |
# File 'lib/cloopen/rest/client.rb', line 17 def signature @signature end |
Instance Method Details
#inspec ⇒ Object
26 27 28 |
# File 'lib/cloopen/rest/client.rb', line 26 def inspec "<Cloopen::REST::Client @account_sid=#{@account_sid}>" end |