class VpsbClient::Api::PostMetricRequest
Public Class Methods
metric_id(http_response)
click to toggle source
# File lib/vpsb_client/api/post_metric_request.rb, line 23 def self.metric_id(http_response) http_response.parsed_response['id'] end
new(http_client, trial_id, metric)
click to toggle source
Calls superclass method
# File lib/vpsb_client/api/post_metric_request.rb, line 5 def initialize(http_client, trial_id, metric) super(http_client) @trial_id = trial_id @metric = metric end
Public Instance Methods
content_type()
click to toggle source
# File lib/vpsb_client/api/post_metric_request.rb, line 19 def content_type 'application/json' end
post_params()
click to toggle source
# File lib/vpsb_client/api/post_metric_request.rb, line 15 def post_params @post_params = { metric: @metric.merge(trial_id: @trial_id) } end
url_path()
click to toggle source
# File lib/vpsb_client/api/post_metric_request.rb, line 11 def url_path "/api/metrics" end