joke-sdk

1.0.1 • Public • Published

Joke-SDK

A simple API wrapper that pulls random jokes from

Author: 5.H.4.D.0.W

{
    "type":"general",
    "setup":"What's black and white and read all over?",
    "punchline":"The newspaper.",
    "id":269
}
{
    "id":"mrHQKBA5MCd",
    "joke":"My boss told me that he was going to fire the person with the worst posture. I have a hunch, it might be me.",
    "status":200
}

Example

const jokeAPI = require('joke-sdk');

jokeAPI.getRandomJoke()
	.then(j => console.log(`Random Joke : \n${j.setup}\n${j.punchline}`))
   .catch(e => console.error(e));

jokeAPI.getRandomDadJoke()
   .then(dj => console.log(`\nRandom Dad Joke : \n${dj.joke}`))
   .catch(e => console.error(e));

Readme

Keywords

Package Sidebar

Install

npm i joke-sdk

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

1.55 kB

Total Files

3

Last publish

Collaborators

  • 5.h.4.d.0.w