You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

nekos.life

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nekos.life - npm Package Compare versions

Comparing version

to
3.0.0

101

endpoints.json
{
"nsfw": {
"randomHentaiGif": "/img/Random_hentai_gif",
"pussy": "/img/pussy",
"nekoGif": "/img/nsfw_neko_gif",
"neko": "/img/lewd",
"lesbian": "/img/les",
"kuni": "/img/kuni",
"cumsluts": "/img/cum",
"classic": "/img/classic",
"boobs": "/img/boobs",
"bJ": "/img/bj",
"anal": "/img/anal",
"avatar": "/img/nsfw_avatar",
"yuri": "/img/yuri",
"trap": "/img/trap",
"tits": "/img/tits",
"girlSoloGif": "/img/solog",
"girlSolo": "/img/solo",
"pussyWankGif": "/img/pwankg",
"pussyArt": "/img/pussy_jpg",
"kemonomimi": "/img/lewdkemo",
"kitsune": "/img/lewdk",
"keta": "/img/keta",
"holo": "/img/hololewd",
"holoEro": "/img/holoero",
"hentai": "/img/hentai",
"futanari": "/img/futanari",
"femdom": "/img/femdom",
"feetGif": "/img/feetg",
"eroFeet": "/img/erofeet",
"feet": "/img/feet",
"ero": "/img/ero",
"eroKitsune": "/img/erok",
"eroKemonomimi": "/img/erokemo",
"eroNeko": "/img/eron",
"eroYuri": "/img/eroyuri",
"cumArts": "/img/cum_jpg",
"blowJob": "/img/blowjob",
"spank": "/img/spank",
"gasm": "/img/gasm"
},
"sfw": {
"tickle": "/img/tickle",
"slap": "/img/slap",
"poke": "/img/poke",
"pat": "/img/pat",
"neko": "/img/neko",
"meow": "/img/meow",
"lizard": "/img/lizard",
"kiss": "/img/kiss",
"hug": "/img/hug",
"foxGirl": "/img/fox_girl",
"feed": "/img/feed",
"cuddle": "/img/cuddle",
"why": "/why",
"catText": "/cat",
"OwOify": "/owoify",
"eightBall": "/8ball",
"fact": "/fact",
"nekoGif": "/img/ngif",
"kemonomimi": "/img/kemonomimi",
"holo": "/img/holo",
"smug": "/img/smug",
"baka": "/img/baka",
"woof": "/img/woof",
"spoiler": "/spoiler",
"wallpaper": "/img/wallpaper",
"goose": "/img/goose",
"gecg": "/img/gecg",
"avatar": "/img/avatar",
"waifu": "/img/waifu"
}
"tickle": "/img/tickle",
"slap": "/img/slap",
"poke": "/img/poke",
"pat": "/img/pat",
"neko": "/img/neko",
"meow": "/img/meow",
"lizard": "/img/lizard",
"kiss": "/img/kiss",
"hug": "/img/hug",
"foxGirl": "/img/fox_girl",
"feed": "/img/feed",
"cuddle": "/img/cuddle",
"why": "/why",
"catText": "/cat",
"OwOify": "/owoify",
"eightBall": "/8ball",
"fact": "/fact",
"nekoGif": "/img/ngif",
"kemonomimi": "/img/kemonomimi",
"holo": "/img/holo",
"smug": "/img/smug",
"baka": "/img/baka",
"woof": "/img/woof",
"spoiler": "/spoiler",
"wallpaper": "/img/wallpaper",
"goose": "/img/goose",
"gecg": "/img/gecg",
"avatar": "/img/avatar",
"waifu": "/img/waifu"
}

@@ -33,8 +33,6 @@ const {get} = require('https');

let self = this;
self.sfw = {};
self.nsfw = {};
let baseURL = 'https://nekos.life/api/v2';
Object.keys(endpoints.sfw).forEach(async (endpoint) => {
self.sfw[endpoint] = async function (queryParams = '') {
let url = new URL(`${baseURL}${endpoints.sfw[endpoint]}`);
Object.keys(endpoints).forEach(async (endpoint) => {
self[endpoint] = async function (queryParams = '') {
let url = new URL(`${baseURL}${endpoints[endpoint]}`);
queryParams !== '' ? url.search = new URLSearchParams(queryParams) : '';

@@ -44,9 +42,2 @@ return await getContent(url.toString());

});
Object.keys(endpoints.nsfw).forEach( async (endpoint) => {
self.nsfw[endpoint] = async function (queryParams = '') {
let url = new URL(`${baseURL}${endpoints.nsfw[endpoint]}`);
queryParams !== '' ? url.search = new URLSearchParams(queryParams) : '';
return await getContent(url.toString());
};
});
}

@@ -53,0 +44,0 @@ }

{
"name": "nekos.life",
"version": "2.0.9",
"version": "3.0.0",
"description": "JS wrapper for https://nekos.life",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -17,4 +17,9 @@ [![npm](https://img.shields.io/npm/v/nekos.life.svg)](https://www.npmjs.com/package/nekos.life)

### SFW
> 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
| Function | Description |

@@ -52,54 +57,10 @@ | -------- | ----------- |

### NSFW
| Function | Description |
| -------- | ----------- |
| `randomHentaiGif` | Get a URL of hentai gif |
| `pussy` | Get a NSFW URL of a pussy image/gif |
| `nekoGif`| Get a NSFW URL of a neko gif |
| `neko` | Get a NSFW URL of a neko image |
| `lesbian` | Get a NSFW URL of a lesbian image/gif |
| `kuni` | Get a NSFW URL of a kuni image/gif |
| `cumsluts` | Get a NSFW URL of a cumslut image/gif |
| `classic` | Gets a NSFW URL of the classic endpoint image/gif |
| `boobs` | Gets a NSFW URL of boobs image/gif |
| `bJ` | Gets a NSFW URL of bj image/gif |
| `anal` | Gets a NSFW URL of anal image/gif |
| `avatar` | Gets a NSFW URL of an avatar image/gif |
| `yuri` | Gets a NSFW URL of yuri image/gif |
| `trap` | Gets a NSFW URL of trap image/gif |
| `tits` | Gets a NSFW URL of an/a image/gif containing tits |
| `girlSoloGif` | Gets a NSFW URL of a solo girl gif |
| `girlSolo` | Gets a NSFW URL of a solo girl image |
| `pussyWankGif` | Gets a NSFW URL of a gif of pussy masterbation |
| `pussyArt` | Gets a NSFW URL of an/a image/gif of pussy art |
| `kemonomimi` | Gets a NSFW URL of an/a image/gif containing kemonomimi|
| `kitsune` | Gets a NSFW URL of an/a image/gif of kitsune |
| `keta` | Gets a NSFW URL of an/a image/gif of keta |
| `holo` | Gets a NSFW URL of an/a image/gif of Holo |
| `holoEro` | Gets a NSFW URL of an/a image/gif Holo ero |
| `hentai` | Gets a NSFW URL of an/a image/gif of hentai |
| `futanari` | Gets a NSFW URL of an/a image/gif of futa |
| `femdom` | Gets a NSFW URL of an/a image/gif of femdom |
| `feetGif` | Gets a NSFW URL of a gif of feet |
| `eroFeet` | Gets a NSFW URL of an/a image/gif of ero feet |
| `feet` | Gets a NSFW URL of an image of feet |
| `ero` | Gets a NSFW URL of an/a image/gif ero |
| `eroKitsune` | Gets a NSFW URL of an/a image/gif ero kitsune |
| `eroKemonomimi` | Gets a NSFW URL of an/a image/gif ero kemonomimi |
| `eroNeko` | Gets a NSFW URL of an/a image/gif ero neko |
| `eroYuri` | Gets a NSFW URL of an/a image/gif ero yuri |
| `cumArts` | Gets a NSFW URL of an/a image/gif of cum arts |
| `blowJob` | Gets a NSFW URL of an/a image/gif blowjob |
| `spank` | Gets a NSFW URL of an/a image/gif spank |
| `gasm` | Gets a NSFW URL of a gasm image |
All of the endpoints but the ones marked with `text`, except Chat/8Ball/Fact in the description will return JSON: `{ url: <theURL>}`.
`sfw.catText` will return JSON: `{cat: <catemoji>}`
`sfw.why` will return JSON `{why: <whytext>}`
`sfw.OwOify` will return JSON `{owo: <owoified string>}`
`neko.catText` will return JSON: `{cat: <catemoji>}`
`neko.why` will return JSON `{why: <whytext>}`
`neko.OwOify` will return JSON `{owo: <owoified string>}`
`sfw.fact` will return JSON `{fact: <fact string>}`
`sfw.eightBall` will return JSON `{response: <8Ball response string>, url: <URL to a matching 8Ball image>}`
`neko.fact` will return JSON `{fact: <fact string>}`
`neko.eightBall` will return JSON `{response: <8Ball response string>, url: <URL to a matching 8Ball image>}`

@@ -122,3 +83,3 @@ 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.

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

@@ -138,3 +99,3 @@

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

@@ -152,3 +113,3 @@ returns

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

@@ -163,40 +124,1 @@ }

```
NSFW example
```js
const client = require('nekos.life');
const neko = new client();
neko.nsfw.neko().then(neko => {console.log(neko);});
```
returns
```js
{ url: 'https://cdn.nekos.life/lewd/lewd_neko750.jpeg' }
```
## Advanced examples
Here I'll show you how to import either `sfw` or `nsfw` if you would like to do so. That allows you to only use one or the other So if you only need `sfw`, you can just import that without anything `nsfw`!
Importing only `sfw`
```js
const client = require('nekos.life');
const {sfw} = new client();
sfw.neko().then(neko => console.log(neko));
```
returns
```js
{ url: 'https://cdn.nekos.life/neko/neko_083.jpg' }
```
Importing only `nsfw`
```js
const client = require('nekos.life');
const {nsfw} = new client();
nsfw.neko().then(neko => console.log(neko));
```
returns
```js
{ url: 'https://cdn.nekos.life/lewd/lewd_neko_058.jpeg' }
```
//List all the functions
declare class NekoClient {
sfw: {
tickle():Promise<NekoClient.NekoRequestResults>;

@@ -33,44 +32,2 @@ slap():Promise<NekoClient.NekoRequestResults>;

wallpaper():Promise<NekoClient.NekoRequestResults>;
}
nsfw: {
randomHentaiGif():Promise<NekoClient.NekoRequestResults>;
pussy():Promise<NekoClient.NekoRequestResults>;
nekoGif():Promise<NekoClient.NekoRequestResults>;
neko():Promise<NekoClient.NekoRequestResults>;
lesbian():Promise<NekoClient.NekoRequestResults>;
kuni():Promise<NekoClient.NekoRequestResults>;
cumsluts():Promise<NekoClient.NekoRequestResults>;
classic():Promise<NekoClient.NekoRequestResults>;
boobs():Promise<NekoClient.NekoRequestResults>;
bJ():Promise<NekoClient.NekoRequestResults>;
anal():Promise<NekoClient.NekoRequestResults>;
avatar():Promise<NekoClient.NekoRequestResults>;
yuri():Promise<NekoClient.NekoRequestResults>;
trap():Promise<NekoClient.NekoRequestResults>;
tits():Promise<NekoClient.NekoRequestResults>;
girlSoloGif():Promise<NekoClient.NekoRequestResults>;
girlSolo():Promise<NekoClient.NekoRequestResults>;
pussyWankGif():Promise<NekoClient.NekoRequestResults>;
pussyArt():Promise<NekoClient.NekoRequestResults>;
kemonomimi():Promise<NekoClient.NekoRequestResults>;
kitsune():Promise<NekoClient.NekoRequestResults>;
keta():Promise<NekoClient.NekoRequestResults>;
holo():Promise<NekoClient.NekoRequestResults>;
holoEro():Promise<NekoClient.NekoRequestResults>;
hentai():Promise<NekoClient.NekoRequestResults>;
futanari():Promise<NekoClient.NekoRequestResults>;
femdom():Promise<NekoClient.NekoRequestResults>;
feetGif():Promise<NekoClient.NekoRequestResults>;
eroFeet():Promise<NekoClient.NekoRequestResults>;
feet():Promise<NekoClient.NekoRequestResults>;
ero():Promise<NekoClient.NekoRequestResults>;
eroKitsune():Promise<NekoClient.NekoRequestResults>;
eroKemonomimi():Promise<NekoClient.NekoRequestResults>;
eroNeko():Promise<NekoClient.NekoRequestResults>;
eroYuri():Promise<NekoClient.NekoRequestResults>;
cumArts():Promise<NekoClient.NekoRequestResults>;
blowJob():Promise<NekoClient.NekoRequestResults>;
spank():Promise<NekoClient.NekoRequestResults>;
gasm():Promise<NekoClient.NekoRequestResults>;
}
}

@@ -77,0 +34,0 @@