nekosapi
TypeScript icon, indicating that this package has built-in type declarations

0.6.3 • Public • Published

Async wrapper for Nekos API

npm version

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));

ko-fi

Readme

Keywords

Package Sidebar

Install

npm i nekosapi

Weekly Downloads

22

Version

0.6.3

License

MIT

Unpacked Size

60.9 kB

Total Files

76

Last publish

Collaborators

  • cataclym