Class: Barometer::Utils::PayloadRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/barometer/utils/payload_request.rb

Instance Method Summary collapse

Constructor Details

#initialize(api) ⇒ PayloadRequest

Returns a new instance of PayloadRequest.



4
5
6
# File 'lib/barometer/utils/payload_request.rb', line 4

def initialize(api)
  @api = api
end

Instance Method Details

#getObject



8
9
10
11
12
# File 'lib/barometer/utils/payload_request.rb', line 8

def get
  response = make_request
  output = parse_response(response)
  Payload.new(output, api.current_query)
end