Saurabh3333 / give-me-a-joke

A npm-module for random and customized jokes.
https://www.npmjs.com/package/give-me-a-joke
MIT License
14 stars 10 forks source link

Add Jokes API Free #9

Closed MrShoopa closed 4 years ago

MrShoopa commented 4 years ago

Includes Category filter

Saurabh3333 commented 4 years ago

Thank for the pull request. Can you please also explain how to use it?

Please update README.md

Saurabh3333 commented 4 years ago

@MrShoopa Please also explain, why you decided to improve this module? What was missing and what value are you adding?

Thank you.

MrShoopa commented 4 years ago

Hi @Saurabh3333, thanks for looking at my PR.

So this new function fetches the 'Joke of the Day' from Jokes.one API. Their endpoint supports fetching from multiple categories of jokes.

The usage of this function can be just getRandomJokeOfTheDay(), but you can pass in a parameter with a string with any of the categories Jokes.one supports (This includes knock or blonde) for example.

Saurabh3333 commented 4 years ago

@MrShoopa Can you please also do changes to the README file in the appropriate format?

MrShoopa commented 4 years ago

Done

Saurabh3333 commented 4 years ago

Thank you. I have merged your code. Best of Luck.