A collection of community scripts to access public Tezos API and collect data from it.
sudo apt-get install git
git clone https://github.com/hclivess/tezos_api_noobs
sudo apt-get install Python3.9
sudo apt install python3-pip
sudo Python3.9 -m pip install -r requirements.txt
sudo Python3.9 [filename].py
All .json
files are just structured examples of individual operations for easy navigation in element identification.
There are two types of data structures in this API:
- introduced with
[]
- example:
["hello", 100, 500, "world"]
list[0]
returns"hello"
list[1]
returns100
list[2]
returns500
list[3]
returns"world"
- introduced with
{}
- example:
{"operation": "sell", "name": "john", "age": 50}
dictionary["operation"]
returns"sell"
dictionary["name"]
returns"john"
dictionary["age"]
returns50
What API usually returns are combined and nested data structures, simplified examples:
[{transactions: ["{"name": "transaction1", "value": 50}, {"name": "transaction2", "value": 50}}]
To see how this is done in practice, open individual Python files in this directory. Examples returned for each of this files are stored in the corresponding json files. To format a json file to make it more readable, try a service like curiousconcept url formatter.