Class: Morpheus::PluginsInterface
- Inherits:
-
RestInterface
- Object
- RestInterface
- Morpheus::PluginsInterface
- Defined in:
- lib/morpheus/api/plugins_interface.rb
Instance Method Summary collapse
- #base_path ⇒ Object
- #check_updates(payload = {}, params = {}, headers = {}) ⇒ Object
-
#upload(local_file, params = {}, headers = {}) ⇒ Object
upload a file with content-type: multipart.
Instance Method Details
#base_path ⇒ Object
5 6 7 |
# File 'lib/morpheus/api/plugins_interface.rb', line 5 def base_path "/api/plugins" end |
#check_updates(payload = {}, params = {}, headers = {}) ⇒ Object
18 19 20 |
# File 'lib/morpheus/api/plugins_interface.rb', line 18 def check_updates(payload={}, params={}, headers={}) execute(method: :post, url: "#{base_path}/check-updates", params: params, payload: payload, headers: headers) end |
#upload(local_file, params = {}, headers = {}) ⇒ Object
upload a file with content-type: multipart
10 11 12 13 14 15 16 |
# File 'lib/morpheus/api/plugins_interface.rb', line 10 def upload(local_file, params={}, headers={}) url = "#{base_path}/upload" payload = {} payload[:multipart] = true payload["plugin"] = local_file execute(method: :post, url: url, params: params, payload: payload, headers: headers, timeout: 172800) end |