iexbase / tron-api-python

A Python API for interacting with Tron (TRX)
https://tronapi-for-python.readthedocs.io
MIT License
166 stars 84 forks source link

Fix doc #66

Closed jjconti closed 4 years ago

jjconti commented 4 years ago

The current docs fail with the last version of the library (tronapi==3.1.6).

serderovsh commented 4 years ago

The specified strategy also works

jjconti commented 4 years ago

Are you sure? First it fails because HttpProvider is not defined.

Then tron.get_block('latests') fails because the method is not there:

>>> tron.get_block('latest')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Tron' object has no attribute 'get_block'
>>> tron.trx.get_block('latest')
{'blockID': '000000000...