Class: Blockcypher::Client::Api::Call

Inherits:
Object
  • Object
show all
Defined in:
lib/blockcypher/client/api.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Call

Returns a new instance of Call.



32
33
34
35
36
37
38
# File 'lib/blockcypher/client/api.rb', line 32

def initialize(config)
  @config = config
  @http = HTTPClient.new(
    base_url: @config.base_uri.to_s,
    default_header: { Accept: 'application/json' }
  ) 
end

Instance Method Details

#get(path = '') ⇒ Object



44
45
46
# File 'lib/blockcypher/client/api.rb', line 44

def get(path = '')
  perform(:get, path)
end

#post(path, options = {}) ⇒ Object



40
41
42
# File 'lib/blockcypher/client/api.rb', line 40

def post(path, options = {})
  perform(:post, path, options)
end