The block explorer API is defined in blocks.js ,which contain the BlockExplorer class.
To use the blockexplorer API, first need to import the block.js file
<script type="text/javascript" src="/assets/js/blocks.js"></script>
And create a new instance of the blockexplorer class :
<script type="text/javascript" >
MyBlocks = new BlockExplorer();
</script>
And then calling MyBlocks methods to fetch and update data on the webpage.
create_block_list(root_element)
create_addr_panel(root_element,addr)
create_tx_panel(root_element, txid)
create_day_nav(root_element,currentTime)
create_block_infos(root_element)
new_blocks()
list_addr_txs()
get_addr_balance()
get_lastblock()
get_lasttxs()
list_blocks(date, lastBlock)
list_txs(date)
list_block_txs(hash)
get_tx(hash)
add_block_filter(key, op, val)
remove_filter(i)
selectBlockTxs(hash)
SelectTx(hash)
selectBlock(hash)
selectAddress(saddr)
update_addr_balance()
update_filter_list()
update_txs()
update_addr_txs()
update_tx(tx)
update_blocks_calendar(d, reload)
update_blocks()
updateblock(block)
resetblock(block)
seteventsrc(in_url = '/newblock_event', handler)