Repository
Current version released
3 years ago
Versions
nekosapi
Unofficial deno module for nekosapi.com~
Import deno 🦖
import {Nekos} from 'https://deno.land/x/nekosapi@v1.0.1/mod.ts';Import NekosUrl to use diff api urls. (nekosapi, nekidev, vercel)
import {NekosUrl} from 'https://deno.land/x/nekosapi@v1.0.1/mod.ts'SLIME: defaults to NekosUrl.vercel.
new Nekos(nekosUrl?: NekosUrl, token?: string)
SLIME: smth like-
import {Nekos, NekosUrl} from 'https://deno.land/x/nekosapi@v1.0.1/mod.ts';
const neko = new Nekos(NekosUrl.nekosapi, 'token uwO');SLIME: nekosUrl and token are optional~
.me() fetches /token
SLIME: smth like-
await neko.me(); // (await) cus returns a <Promise>SLIME: access token is necessary.
.images() fetches /image
SLIME: smth like-
await neko.images(); // (await) cus returns a <Promise>SLIME: access token is necessary.
.image(id: string) fetches /image/{id}
SLIME: smth like-
await neko.image('d02a6ffc-0f2a-4b60-8ef7-c28460890136'); // (await) cus returns a <Promise>.randoImage() fetches /image/random
SLIME: smth like-
await neko.randoImage(); // (await) cus returns a <Promise>.randoImages(limit?: number) fetches /image/random?limit=2
SLIME: smth like-
await neko.randoImage(); // (await) cus returns a <Promise>SLIME: limit is optional and defaults to 2~
.artists() fetches /artist
SLIME: smth like-
await neko.artists(); // (await) cus returns a <Promise>.artist(id: string) fetches /artist/{id}
SLIME: smth like-
await neko.artist('ea6e23ab-d0fc-4ede-984a-350a07e41ced'); // (await) cus returns a <Promise>.artistImages(id: string) fetches /artist/{id}/images
SLIME: smth like-
await neko.artistImages('ea6e23ab-d0fc-4ede-984a-350a07e41ced'); // (await) cus returns a <Promise>.characters() fetches /character
SLIME: smth like-
await neko.characters(); // (await) cus returns a <Promise>.character(id: string) fetches /character/{id}
SLIME: smth like-
await neko.character('347b1792-866f-4b2b-b68a-98e226de6b8f'); // (await) cus returns a <Promise>.categories() fetches /category
SLIME: smth like-
await neko.categories(); // (await) cus returns a <Promise>.category(id: string) fetches /category/{id}
SLIME: smth like-
await neko.category('ae7bd1bb-a9e1-4bf3-ab4d-02ec47eff3ba'); // (await) cus returns a <Promise>