#NEWLINE# def get_block( self , crypto , block_number = '' , block_hash = '' , latest = False ) : #NEWLINE# #INDENT# if ( latest or block_hash ) : #NEWLINE# #INDENT# raise SkipThisService ( 'Block height and latest not implemented.' ) #NEWLINE# #UNINDENT# url = ( 'https://%s/explorerJson/getBlock?coin_id=%s&' % ( self . domain , self . _get_coin ( crypto ) ) ) #NEWLINE# if block_hash : #NEWLINE# #INDENT# url = ( '%shash=%s' % ( url , block_hash ) ) #NEWLINE# #UNINDENT# r = self . get_url ( url ) . json ( ) #NEWLINE# return dict ( confirmations = r [ 'confirmations' ] , size = r [ 'size' ] , txs = [ x [ 'hash' ] for x in r [ 'tx' ] ] , tx_count = len ( r [ 'tx' ] ) , hash = r [ 'hash' ] , block_number = r [ 'height' ] , difficulty = r [ 'difficulty' ] )