API Documentation
Making Requests
Handling Errors
{
"error": "LuaShield > all???"
}Quick Example
const fetch = require("node-fetch");
const LUASHIELD_API_KEY = "";
async function GetAccountInformation() {
return new Promise(async (resolve, reject) => {
let Response = await fetch("https://api.luashield.com/account", {
method: "GET",
headers: {
["LuaShield-API-Key"]: LUASHIELD_API_KEY
}
})
.then(res => res.json())
.catch(er => reject(er.toString()))
if (Response?.error) {
reject(Response.error);
}
resolve(Response);
});
}
(async () => {
let AccountInformation = await GetAccountInformation()
.catch(er => console.log(er));
console.log(AccountInformation)
})();Last updated