Class: Zillabyte::API::Metrics
- Defined in:
- lib/zillabyte/api/metrics.rb
Instance Method Summary collapse
-
#list(options = {}) ⇒ Object
GET /metrics.
-
#show(id, options = {}, block = nil) ⇒ Object
GET /metrics.
Methods inherited from Base
Methods included from Helpers
#app, #ask, #command, #create_git_remote, #display, #error, #extract_app_from_git_config, #extract_app_in_dir, #format_with_bang, #friendly_dir, #get_flow_ui_link, #get_info, #get_rich_info, #git, #handle_downloading_manifest, #has_git?, #longest, #read_multiline, #truncate_message, #version_okay?, #with_tty
Constructor Details
This class inherits a constructor from Zillabyte::API::Base
Instance Method Details
#list(options = {}) ⇒ Object
GET /metrics
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/zillabyte/api/metrics.rb', line 7 def list( = {}) = { # TODO }.merge() res = @api.request( :expects => 200, :method => :get, :path => "/metrics" ) res.body end |
#show(id, options = {}, block = nil) ⇒ Object
GET /metrics
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/zillabyte/api/metrics.rb', line 26 def show(id, = {}, block = nil) require("active_support/core_ext/object/to_query.rb") if block res = @api.request( :expects => 200, :method => :get, :path => "/metrics/#{id}?#{options.to_query}", :response_block => block ) else res = @api.request( :expects => 200, :method => :get, :path => "/metrics/#{id}?#{options.to_query}", ) end res.body end |