3.0.0 • Published 2 years ago

nekos.life v3.0.0

Weekly downloads
4,996
License
MIT
Repository
github
Last release
2 years ago

npm npm install size

NPM

Nekos.life

Installation

npm i -s nekos.life

Official wrapper for nekos.life! Very small install size with no external dependencies.

Please note that NSFW endpoints and images have been removed from the API

This is a breaking change, please alter your code to reflect the breaking change.

Endpoints

FunctionDescription
smugGets a URL of a smug image/gif
bakaGets a URL of a baka image/gif
tickleGets a URL of a tickle image/gif
slapGets a URL of a slap image/gif
pokeGets a URL of a poke image/gif
patGet a URL of a pat image/gif
nekoGet a URL of a neko image
nekoGifGet a URL of a neko gif
meowGet a URL of a cat image/gif
lizardGet a URL of a lizard image
kissGet a URL of a kiss image/gif
hugGet a URL of a hug image/gif
foxGirlGet a URL of a fox girl image/gif
feedGet a URL of a feeding image/gif
cuddleGet a URL of a cuddle image/gif
kemonomimiGet a URL of a kemonomimi image/gif
holoGet a URL of a Holo image/gif
woofGet a URL of a dog image/gif
wallpaperGet a URL of a wallpaper
gooseGet a URL of a goose image
gecgGet a URL of a gecg (genetically engineered catgirl) image
avatarGet a URL of an avatar image
waifuGet a URL of a waifu image
whyGet text of a question
catTextGet text of a cat emoji
OwOifyGet OwOified text of a string
eightBallSends the text and replies with a text as a response to the magic 8Ball and an image as well.
factGets the text and replies with a text that is a random fact
spoilerCreates an individual spoiler per letter for Discord

All of the endpoints but the ones marked with text, except Chat/8Ball/Fact in the description will return JSON: { url: <theURL>}.

neko.catText will return JSON: {cat: <catemoji>}
neko.why will return JSON {why: <whytext>}
neko.OwOify will return JSON {owo: <owoified string>}

neko.fact will return JSON {fact: <fact string>}
neko.eightBall will return JSON {response: <8Ball response string>, url: <URL to a matching 8Ball image>}

As of now, OwOify and eightBall are the only ones with query parameters. It requires an object containing the parameter, and the key should be the value. In this case, the key is text and the value is whatever you want OwOified. There is an example in this README. {text: 'Some text you want weebified.}

Typings

I added a typings file and will be working to improve it. This allows editors like VSC to use intellisense/autocomplete to suggest functions and help out with parameters and to see what you'll be receiving as a result of function calls.

Examples

Await/Async example

const client = require('nekos.life');
const neko = new client();

async function test() {
  console.log(await neko.hug());
}

test();

returns:

{ url: 'https://cdn.nekos.life/hug/hug10050.gif' }

Promise example

const client = require('nekos.life');
const neko = new client();

neko.catText().then((catText) => console.log(catText));

returns

{ cat: '((≡^⚲͜^≡))' }

OwOify example

const client = require('nekos.life');
const neko = new client();

async function work() {
  let owo = await neko.OwOify({text: 'This lib is really awesome!'});
  console.log(owo);
}

work();

returns

{ owo: 'This wib is weawwy awesome >w< ' }
3.0.0

2 years ago

2.0.9

2 years ago

2.0.8

2 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.5

5 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago