EverydayFun icon indicating copy to clipboard operation
EverydayFun copied to clipboard

Added searchability to Jokes and Quotes

Open NinjaLabs-Dev opened this issue 4 years ago • 5 comments

Added ability to search by Author/Category in Quotes/Jokes

Allows either object or string of search criteria

Examples:

getRandomJoke(['Military', 'Men'])
getRandomJoke('Military')

Also updated README.md with new feature

NinjaLabs-Dev avatar Oct 01 '20 11:10 NinjaLabs-Dev

Nice initiative, but what I don't get is where even is the search initiated from ??

There is no search bar. Maybe add that as well?

bsantosh909 avatar Oct 01 '20 14:10 bsantosh909

Using the function, Uses the function in index.js

You just pass a value if you want to search

NinjaLabs-Dev avatar Oct 01 '20 16:10 NinjaLabs-Dev

Using the function, Uses the function in index.js

You just pass a value if you want to search

@NinjaLabs-Dev Very nice idea, but what i think is that there may be very less probablity that there is a quote available with the requested author name (similar for the category of jokes). Most of the times, our users will get empty values. We wouldn't want that.

tachodril avatar Oct 01 '20 19:10 tachodril

Using the function, Uses the function in index.js You just pass a value if you want to search

@NinjaLabs-Dev Very nice idea, but what i think is that there may be very less probablity that there is a quote available with the requested author name (similar for the category of jokes). Most of the times, our users will get empty values. We wouldn't want that.

Ah ok, what would you suggest or just a nice idea that won't work?

Possibly add a return if empty something like:

{ "error": true, "message": "Oh No! We couldn't find any. }

NinjaLabs-Dev avatar Oct 01 '20 19:10 NinjaLabs-Dev

Any update on this?

NinjaLabs-Dev avatar Oct 06 '20 13:10 NinjaLabs-Dev