Skip to content

Anime girls holding programming books API wrapper for πŸŒ• Lua.

License

Notifications You must be signed in to change notification settings

THEGOLDENPRO/aghpb.lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŒ• aghpb.lua πŸ“š

Lua API wrapper for the anime girls holding programming books API

LuaRocks


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

Install

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 

Examples

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/