Class: KrakenClient::Requests::Post

Inherits:
Base
  • Object
show all
Defined in:
lib/kraken_client/requests/post.rb

Instance Attribute Summary

Attributes inherited from Base

#config, #endpoint_name, #type, #url

Instance Method Summary collapse

Methods inherited from Base

build, #initialize, type

Constructor Details

This class inherits a constructor from KrakenClient::Requests::Base

Instance Method Details

#call(url, endpoint_name, options) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/kraken_client/requests/post.rb', line 5

def call(url, endpoint_name, options)
  super

  @url           = url
  @endpoint_name = endpoint_name

  response       = HTTParty.post(url, params(options)).parsed_response
  response['error'].empty? ? response['result'] : response['error']
end