// TypeScript
import NekosAPI from "nekosapi";
// JavaScript
const { NekosAPI } = require("nekosapi");
const api = new NekosAPI();
api.getRandomImage("Catgirl")
.then(image => console.log(image));
const { NekosAPIv1 } = require("nekosapi");
// Or using /v1 path
const { NekosAPI } = require("nekosapi/v1");
// Or using default export in /v1 path
import NekosAPI from "nekosapi/v1";
// The constructor accepts a token
const api = new NekosAPI();
// Returns NekosImage object
api.getRandomImage("Catgirl")
.then(image => console.log(image));
Generated using TypeDoc