bqb
v0.0.6
Published
bitquery builder
Downloads
2
Readme
bqb
bitquery builder
Usage
Create a JSON file named api.json
, with the root attribute "dev" containing all the bitqueries.
api.json
{
"dev": {
"name": {
"v": 3,
"q": {"find": { "out.h1": "6d01"} },
"r": "[ ]"
},
"post": {
"v": 3,
"q": { "find": { "out.h1": "6d02" } },
"r": "[ ]"
}
}
}
1. Test APIs
Now you can test the results by running
bitquery get [filename] [api endpoint]
For example:
bitquery get api.json name
2. Build
Build all the query JSON objects into a single JSON that contains the imutable base64 encoded query.
bitquery build [filename]
for example:
bitquery build api.json
transforms above api.json
into
{
"dev": {
"name": {
"v": 3,
"q": {"find": { "out.h1": "6d01"} },
"r": "[ ]"
},
"post": {
"v": 3,
"q": { "find": { "out.h1": "6d02" } },
"r": "[ ]"
}
},
"prod": {
"name":
}
}