Class: ZcashRubyExplorer::Api
- Inherits:
-
Object
- Object
- ZcashRubyExplorer::Api
- Defined in:
- lib/zcash_ruby_explorer/api.rb
Overview
Main class of this library, contains the following public methods: block_full_txs, address_full_txs and tx_info
Instance Method Summary collapse
- #address_full_txs(address, limit = 10, offset = 0) ⇒ Object
-
#block_full_txs(hash, direction = 'ascending', limit = 10, offset = 0) ⇒ Object
direction: ascending | descending limit: integer offset: integer.
- #tx_info(hash) ⇒ Object
Instance Method Details
#address_full_txs(address, limit = 10, offset = 0) ⇒ Object
21 22 23 24 |
# File 'lib/zcash_ruby_explorer/api.rb', line 21 def address_full_txs(address, limit = 10, offset = 0) query = { limit: limit, offset: offset } api_http_get("accounts/#{address}/recv", query: query) end |
#block_full_txs(hash, direction = 'ascending', limit = 10, offset = 0) ⇒ Object
direction: ascending | descending limit: integer offset: integer
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/zcash_ruby_explorer/api.rb', line 10 def block_full_txs(hash, direction = 'ascending', limit = 10, offset = 0) query = { sort: 'index', direction: direction, limit: limit, offset: offset } api_http_get("blocks/#{hash}/transactions", query: query) end |
#tx_info(hash) ⇒ Object
26 27 28 |
# File 'lib/zcash_ruby_explorer/api.rb', line 26 def tx_info(hash) api_http_get("transactions/#{hash}") end |