Lua
Lua request method
get
https://neko-love.xyz
/api/v1/:endpoint
Get Endpoint
local json = require("json");
local coro = require("coro-http")
function nekoGET(type)
local link = "https://neko-love.xyz/api/v1/"..type
local result, body = coro.request("GET", link)
body = json.parse(body) -- Return Body
return body["url"] -- Return the image link
end
nekoGET("neko") -- The desired endpoint is added in parameter
Last modified 3yr ago