Class: MnoEnterprise::ImpacClient

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/mno_enterprise/impac_client.rb

Class Method Summary collapse

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

.hostObject



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