Class: TuneupTechnology::Client
- Inherits:
-
Object
- Object
- TuneupTechnology::Client
- Defined in:
- lib/tuneuptechnology.rb
Overview
Build the HTTP client for the library
Class Attribute Summary collapse
-
.base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
.headers ⇒ Object
readonly
Returns the value of attribute headers.
-
.version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
Class Attribute Details
.base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
17 18 19 |
# File 'lib/tuneuptechnology.rb', line 17 def base_url @base_url end |
.headers ⇒ Object (readonly)
Returns the value of attribute headers.
30 31 32 |
# File 'lib/tuneuptechnology.rb', line 30 def headers @headers end |
.version ⇒ Object (readonly)
Returns the value of attribute version.
22 23 24 |
# File 'lib/tuneuptechnology.rb', line 22 def version @version end |
Class Method Details
.post(data, endpoint) ⇒ Object
33 34 35 36 |
# File 'lib/tuneuptechnology.rb', line 33 def self.post(data, endpoint) response = RestClient.post(endpoint, data.to_json, headers) JSON.pretty_generate(JSON.parse(response)) end |