night-api
Version:
Ce paquet Npm fourni une interface pour intéragir avec [Night-API](https://night-api.com)
24 lines • 795 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const functions_1 = __importDefault(require("../../functions"));
const constants_1 = require("../constants");
class IPinfo {
token;
constructor(token) {
this.token = token;
this.functions = new functions_1.default(this.token);
}
;
async getInfos(ip) {
if (!ip)
throw new Error("No IP adress specified");
return await this.functions.get(`${constants_1.Endpoints.General._}${constants_1.Endpoints.General.IPinfo}/${ip}`);
}
}
;
;
exports.default = IPinfo;
//# sourceMappingURL=IPinfo.js.map