1.0.0 • Published 5 years ago

twdne.js v1.0.0

Weekly downloads
6
License
GPL-3.0
Repository
github
Last release
5 years ago

twdne.js

A simple library for getting a waifu from thiswaifudoesnotexist.net

Installing

$ npm install --save twdne.js

Usage

const twdne = require('twdne.js');

// Randomly selects one
twdne.randomWaifu().then(({desc, img}) => {
  console.log(`Waifu Image URL: ${img}`);
  console.log(desc);
});

// Pulls a selected waifu by it's ID.
twdne.fetchWaifu(21566).then(({desc, img}) => {
  console.log(`Waifu Image URL: ${img}`);
  console.log(desc);
});