nekosapi
v0.6.3
Published
Async wrapper for NekosAPI
Downloads
134
Readme
Async wrapper for Nekos API
- Supports NekosAPI v1 and v3
- Axios
- Proxy support
Documentation
Quick overview
Import NekosAPI v3:
// TypeScript
import NekosAPI from "nekosapi";
// JavaScript
const { NekosAPI } = require("nekosapi");
const api = new NekosAPI();
api.getRandomImage("Catgirl")
.then(image => console.log(image));
Import NekosAPI v1:
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));