Unofficial API wrapper for https://shiro.gg/api
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()
Install with npm:
npm i shiro.gg
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'
Since version 0.1.2 both PascalCase (eg. Hug()) and camelCase (eg. hug()) are available.
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)
ImageResult {
// The url of the image
url: string;
// The type of the image (png | jpg | gif)
type: string;
}
| 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 |
| 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 |
Generated using TypeDoc