Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

tentaclenotsoft/node-waifupics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


A simple wrapper for waifu.pics api

Version Dependencies License

Installation

# with npm
$ npm install waifu.pics

# or with Yarn
$ yarn add waifu.pics

Methods

The structure of this library contains an object of functions and they are Promise. Available methods
Exists possibility of having methods not available in this package that will be possible to be accessed from the fetch method.

fetch(endpoint)

  • endpoint: A string containing one of these endpoints

Returns:    Promise<Object>

endpoints()

Returns:    Promise<string[]>

Search usage example

const WaifuPics = require('waifu.pics')

WaifuPics.fetch('nsfw')
  .then(console.log)
  .catch(console.error)

Returns

{ url: 'https://i.waifu.pics/8Ml_Y6V.jpg' }