Class: Morpheus::HubInterface
- Inherits:
-
APIClient
- Object
- APIClient
- Morpheus::HubInterface
- Defined in:
- lib/morpheus/api/hub_interface.rb
Instance Method Summary collapse
- #base_path ⇒ Object
- #checkin(payload = {}, params = {}, headers = {}) ⇒ Object
- #get(params = {}, headers = {}) ⇒ Object
- #register(payload = {}, params = {}, headers = {}) ⇒ Object
- #usage(params = {}, headers = {}) ⇒ Object
Instance Method Details
#base_path ⇒ Object
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 |