Class: Coinbasepro::Api::NetHTTPResponse
Overview
Instance Attribute Summary
Attributes inherited from APIResponse
#received_at
Instance Method Summary
collapse
Methods inherited from APIResponse
#initialize, #raw
Instance Method Details
#body ⇒ Object
50
51
52
|
# File 'lib/coinbasepro/api/adapters/net_http.rb', line 50
def body
@response.body
end
|
54
55
56
57
58
59
|
# File 'lib/coinbasepro/api/adapters/net_http.rb', line 54
def
out = @response.to_hash.map do |key, val|
[ key.upcase.gsub('_', '-'), val.count == 1 ? val.first : val ]
end
out.to_h
end
|
#status ⇒ Object
61
62
63
|
# File 'lib/coinbasepro/api/adapters/net_http.rb', line 61
def status
@response.code.to_i
end
|