Class: Morpheus::HubInterface

Inherits:
APIClient
  • Object
show all
Defined in:
lib/morpheus/api/hub_interface.rb

Instance Method Summary collapse

Instance Method Details

#base_pathObject



5
6
7
# File 'lib/morpheus/api/hub_interface.rb', line 5

def base_path
  "/api/hub"
end

#checkin(payload = {}, params = {}, headers = {}) ⇒ Object



17
18
19
# File 'lib/morpheus/api/hub_interface.rb', line 17

def checkin(payload={}, params={}, headers={})
  execute(method: :post, url: "#{base_path}/checkin", payload: payload, params: params, headers: headers)
end

#get(params = {}, headers = {}) ⇒ Object



9
10
11
# File 'lib/morpheus/api/hub_interface.rb', line 9

def get(params={}, headers={})
  execute(method: :get, url: "#{base_path}", params: params, headers: headers)
end

#register(payload = {}, params = {}, headers = {}) ⇒ Object



21
22
23
# File 'lib/morpheus/api/hub_interface.rb', line 21

def register(payload={}, params={}, headers={})
  execute(method: :post, url: "#{base_path}/register", payload: payload, params: params, headers: headers)
end

#usage(params = {}, headers = {}) ⇒ Object



13
14
15
# File 'lib/morpheus/api/hub_interface.rb', line 13

def usage(params={}, headers={})
  execute(method: :get, url: "#{base_path}/usage", params: params, headers: headers)
end