Skip to main content
Version: Next

JavaScript and TypeScript

We made a client for our API in JavaScript and TypeScript. It is currently published on NPM (Node Package Manager) and you can find it on our GitHub repository.

Please be aware that the client does not support NSFW content for now.

note

The package uses node-fetch to make requests to our API.

Installation

You can install the client using NPM or Yarn.

npm install nekonya.js
yarn add nekonya.js

Usage

Firstly, you need to import the client.

const nekonya = require('nekonya.js');

Then, you can use the client to make requests to our API.

nekonya.neko().then((url) => console.log(url)); // https://nekonya.classydev.fr/images/nekos/...

Available methods

Here is a list of the available methods in the client:

MethodDescription
nekoGet a random neko image.
kitsuneGet a random kitsune image.
patGet a random pat image.
hugGet a random hug image.
slapGet a random slap image.
kissGet a random kiss image.
owoifyOwoify text.
eightballGet a random answer from the 8ball.

TypeScript Support

The package is written in TypeScript. Simply import it as you would in TypeScript.

import * as nekonya from 'nekonya.js';

It has types for all the methods, so you can use it in your TypeScript projects without any issues.

Contributing

If you want to contribute to the client, you can find the repository on GitHub. Feel free to submit a pull request with your changes.

We will be happy to review your changes and merge them if they are good.

License

The client is open-source and available under the MIT license. You can find the license on the GitHub repository. Please report any issues you find on the repository's issues tab.