Class: ArkEcosystem::Client::API::Blocks
- Defined in:
- lib/arkecosystem/client/api/blocks.rb
Overview
Methods for the Blocks API
Instance Method Summary collapse
-
#all(parameters = {}) ⇒ Faraday::Response
Get all blocks.
-
#search(parameters) ⇒ Faraday::Response
Search all blocks.
-
#show(id) ⇒ Faraday::Response
Get the block by the given id.
-
#transactions(id, parameters = {}) ⇒ Faraday::Response
Get the transaction for the given block.
Methods inherited from Base
Constructor Details
This class inherits a constructor from ArkEcosystem::Client::API::Base
Instance Method Details
#all(parameters = {}) ⇒ Faraday::Response
Get all blocks.
13 14 15 |
# File 'lib/arkecosystem/client/api/blocks.rb', line 13 def all(parameters = {}) @client.get('blocks', parameters) end |
#search(parameters) ⇒ Faraday::Response
Search all blocks.
41 42 43 |
# File 'lib/arkecosystem/client/api/blocks.rb', line 41 def search(parameters) @client.post('blocks/search', parameters) end |
#show(id) ⇒ Faraday::Response
Get the block by the given id.
22 23 24 |
# File 'lib/arkecosystem/client/api/blocks.rb', line 22 def show(id) @client.get("blocks/#{id}") end |
#transactions(id, parameters = {}) ⇒ Faraday::Response
Get the transaction for the given block.
32 33 34 |
# File 'lib/arkecosystem/client/api/blocks.rb', line 32 def transactions(id, parameters = {}) @client.get("blocks/#{id}/transactions", parameters) end |