Class: CardanoRubyExplorer::Api

Inherits:
Object
  • Object
show all
Defined in:
lib/cardano_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

Instance Method Details

#address_full_txs(address) ⇒ Object



12
13
14
# File 'lib/cardano_ruby_explorer/api.rb', line 12

def address_full_txs(address)
  api_http_get("addresses/summary/#{address}")
end

#block_full_txs(block, limit = 5000) ⇒ Object



7
8
9
10
# File 'lib/cardano_ruby_explorer/api.rb', line 7

def block_full_txs(block, limit = 5000)
  query = { limit: limit }
  api_http_get("blocks/txs/#{block}", query: query)
end

#tx_info(hash) ⇒ Object



16
17
18
# File 'lib/cardano_ruby_explorer/api.rb', line 16

def tx_info(hash)
  api_http_get("txs/summary/#{hash}")
end