Lua

Lua request method

get
Get Endpoint

https://neko-love.xyz/api/v1/:endpoint
Request
Response
Request
Path Parameters
Parameter Type
required
string
The "endpoint" parameter must be a valid type
Response
200: OK
The answer is in URL
"https://neko-love.xyz/v1/neko/neko-love_54.jpg"
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