Class: Blockcypher::Client::Api::Call
- Inherits:
-
Object
- Object
- Blockcypher::Client::Api::Call
- Defined in:
- lib/blockcypher/client/api.rb
Instance Method Summary collapse
- #get(path = '') ⇒ Object
-
#initialize(config) ⇒ Call
constructor
A new instance of Call.
- #post(path, options = {}) ⇒ Object
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, = {}) perform(:post, path, ) end |