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