Note
This is part of my aghpb api wrapper challenge where I attempt to write an api wrapper in every language possible. So yes expect spaghetti code as it will be my first time writing in these languages. Although I'm 100% open to improvements and corrections so feel free to contribute anything. Other languages I've done
luarocks install aghpb
The LuaRocks package can be located here.
or (from source)
git clone https://github.com/THEGOLDENPRO/aghpb.lua/
cd aghpb.lua
sudo luarocks make
This is how you may retrieve a random anime girl holding a programming book:
aghpb = require("aghpb")
local book = aghpb.random()
print(book.name)
print(book.category)
print(book.date_added)
local file = assert(io.open("./anime_girl.png", "wb"))
file:write(book.image_bytes)
file:close()
You can also retrieve specific categories of anime girls holding programming books like so:
aghpb.random("lua")
This is how you may retrieve a list of available categories:
aghpb = require("aghpb")
local categories = aghpb.categories()
for key, value in pairs(categories) do
print(key, value)
end
For more examples see the examples folder.
Made using my API at π https://api.devgoldy.xyz/aghpb/v1/