Class: ArkEcosystem::Client::API::Two::Blocks
- Defined in:
- lib/arkecosystem/client/api/two/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.
17 18 19 |
# File 'lib/arkecosystem/client/api/two/blocks.rb', line 17 def all(parameters = {}) @client.get('blocks', parameters) end |
#search(parameters) ⇒ Faraday::Response
Search all blocks.
45 46 47 |
# File 'lib/arkecosystem/client/api/two/blocks.rb', line 45 def search(parameters) @client.post('blocks/search', parameters) end |
#show(id) ⇒ Faraday::Response
Get the block by the given id.
26 27 28 |
# File 'lib/arkecosystem/client/api/two/blocks.rb', line 26 def show(id) @client.get("blocks/#{id}") end |
#transactions(id, parameters = {}) ⇒ Faraday::Response
Get the transaction for the given block.
36 37 38 |
# File 'lib/arkecosystem/client/api/two/blocks.rb', line 36 def transactions(id, parameters = {}) @client.get("blocks/#{id}/transactions", parameters) end |