# the whole api. send lua, get back what it returned.
curl -X POST https://api.blazie.dev/run \
-H "Authorization: Bearer $BLAZIE_TOKEN" \
-d '{"world":"main","source":"
ada.height = 180
ada.friend = grace
return ada.height
"}'
{"value":180,"name":{"main":42},"wrote":5}
# that name is the answer's receipt. it does not change again.
curl -X POST https://api.blazie.dev/run \
-H "Authorization: Bearer $BLAZIE_TOKEN" \
-d '{"world":"main","name":{"main":42},"source":"
return ada.friend.height
"}'
{"value":175,"name":{"main":42},"wrote":0}
# find things. lua is the query language, so counting needs nothing new.
curl -X POST https://api.blazie.dev/run \
-H "Authorization: Bearer $BLAZIE_TOKEN" \
-d '{"world":"main","source":"
local n = 0
for p in each { height = 180 } do n = n + 1 end
return n
"}'
{"value":1,"name":{"main":43},"wrote":0}