Class: AriaRestClient
- Inherits:
-
Object
- Object
- AriaRestClient
- Includes:
- HTTParty
- Defined in:
- lib/aria_sdk/aria_rest_client.rb
Direct Known Subclasses
AriaAdmintoolsRestClient, AriaCoreRestClient, AriaObjectQueryRestClient
Instance Attribute Summary collapse
-
#auth_key ⇒ Object
Returns the value of attribute auth_key.
-
#client_no ⇒ Object
Returns the value of attribute client_no.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #call(api_name, options = {}) ⇒ Object
-
#initialize(client_no, auth_key, url) ⇒ AriaRestClient
constructor
A new instance of AriaRestClient.
Constructor Details
#initialize(client_no, auth_key, url) ⇒ AriaRestClient
Returns a new instance of AriaRestClient.
9 10 11 12 13 |
# File 'lib/aria_sdk/aria_rest_client.rb', line 9 def initialize(client_no, auth_key, url) self.client_no = client_no self.auth_key = auth_key self.url = url end |
Instance Attribute Details
#auth_key ⇒ Object
Returns the value of attribute auth_key.
7 8 9 |
# File 'lib/aria_sdk/aria_rest_client.rb', line 7 def auth_key @auth_key end |
#client_no ⇒ Object
Returns the value of attribute client_no.
7 8 9 |
# File 'lib/aria_sdk/aria_rest_client.rb', line 7 def client_no @client_no end |
#url ⇒ Object
Returns the value of attribute url.
7 8 9 |
# File 'lib/aria_sdk/aria_rest_client.rb', line 7 def url @url end |
Instance Method Details
#call(api_name, options = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/aria_sdk/aria_rest_client.rb', line 15 def call(api_name, = {}) defaults = { :output_format => 'json', :client_no => self.client_no, :auth_key => self.auth_key, :rest_call => api_name } .merge!(defaults) result = self.class.post(self.url, :body => ) return result end |