shiro.gg
TypeScript icon, indicating that this package has built-in type declarations

1.1.8 • Public • Published

Shiro.gg

GitHub top language
npm bundle size
Maintenance
GitHub last commit (branch)

Unofficial API wrapper for api.dbot.dev/ Formerly shiro.gg

A Quick Example

const shiro = require('shiro.gg')

// Using promise .then()
shiro.hug().then(hug => {
    console.log(hug.url)
})

// Using async function
const hug = async () => {
    let hugData = await shiro.hug()
    console.log(hug.url)
}
hug()

Installation

Install with npm:

npm i shiro.gg

Importing

Import with CommonJS require():

// Import the whole module
const shiro = require("shiro.gg");
// Or, Just some functions
const { Hug } = require("shiro.gg");

Import with EcmaScript / TypeScript import:

// Whole Module
import * as shiro from 'shiro.gg'

//Or, Just some functions
import { Hug } from 'shiro.gg'

Namings

Since version 0.1.2 both PascalCase (eg. Hug()) and camelCase (eg. hug()) are available.

Example

A basic example using await
Note: await is only usable in async functions

const res = await Hug()
console.log(res)

A basic example using .then():

Hug().then( (res) => {
    console.log(res)
})
//Optional
.catch(console.log)

Return type

ImageResult {
    // The url of the image
    url: string;
    // The type of the image (png | jpg | gif)
    type: string;
}

Functions

SFW

Name Description
Avatar Get a random avatar
Avatars Same as Avatar
Blush Get a random image / gif of blushing
Cry Get a random image / gif of crying
Hug Get a random image / gif of hugging
Kiss Get a random image / gif of kissing
Lick Get a random image / gif of licking
Neko Get a random image of a catgirl
Nom Get a random image / gif of eating
Pat Get a random image / gif of patting
Poke Get a random image / gif of poking
Pout Get a random image / gif of pouting
Punch Get a random image / gif of punching
Slap Get a random image / gif of slapping
Sleep Get a random image / gif of sleeping
Smug Get a random image / gif of smugging
Tickle Get a random image / gif of tickling
Trap Get a random image of a Trap
Wallpaper Get a random wallpaper
Wallpapers Same as wallpaper

NSFW

Name Description
BDSM Get image of BDSM
Bondage Get a random Bondage (subset of BDSM) image
Hentai Get a random Hentai image
Thigh Get a random thigh image
Thighs Same as thigh

Other info

GitHub repo
NPM module
Shiro Api

Package Sidebar

Install

npm i shiro.gg

Weekly Downloads

7

Version

1.1.8

License

MIT

Unpacked Size

39 kB

Total Files

20

Last publish

Collaborators

  • moyshik7