Class: MnoEnterprise::ImpacClient
- Inherits:
-
Object
- Object
- MnoEnterprise::ImpacClient
- Includes:
- HTTParty
- Defined in:
- lib/mno_enterprise/impac_client.rb
Class Method Summary collapse
- .endpoint_url(endpoint, params) ⇒ Object
- .host ⇒ Object
- .send_get(endpoint, params, opts = {}) ⇒ Object
Class Method Details
.endpoint_url(endpoint, params) ⇒ Object
9 10 11 |
# File 'lib/mno_enterprise/impac_client.rb', line 9 def self.endpoint_url(endpoint, params) "#{File.join(host,endpoint)}?#{params.to_query}" end |
.host ⇒ Object
5 6 7 |
# File 'lib/mno_enterprise/impac_client.rb', line 5 def self.host "#{Settings.impac.protocol}://#{Settings.impac.host}" end |
.send_get(endpoint, params, opts = {}) ⇒ Object
13 14 15 16 |
# File 'lib/mno_enterprise/impac_client.rb', line 13 def self.send_get(endpoint, params, opts={}) url = endpoint_url(endpoint, params) get(url, opts) end |