dadjokes-wrapper
NodeJS wrapper for the ICanHazDadJokes API
This module will help you to get some nice Dad Jokes !
Usage
const DadJokes = require('dadjokes-wrapper');
const dj = new Dadjokes();
dj.randomJoke()
.then(res => console.log(res))
.catch(err => console.error(err));
exemple of output
Two guys walked into a bar, the third one ducked.
API
const DadJokes = require('dadjokes-wrapper');
const dj = new Dadjokes();
dj.randomJoke()
.then(res => console.log(res))
.catch(err => console.error(err));
dj.randomSlackJoke()
.then(res => console.log(res))
.catch(err => console.error(err));
dj.jokeById('R7UfaahVfFd')
.then(res => console.log(res))
.catch(err => console.error(err));
dj.jokeImgById('gNu41gNeqjb')
.then(res => res)
.catch(err => console.error(err));
dj.searchJoke()
.then(res => console.log(res))
.catch(err => console.error(err));
Install
With npm installed, run
$ npm install dadjokes-wrapper
Or with yarn installed, run
$ yarn add dadjokes-wrapper
See Also
License
MIT