jokify
v1.1.5
Published
Random funny dadjokes fetcher
Downloads
32
Maintainers
Readme
jokify
Random funny dadjokes fetcher
Installation
To get started with jokify, simply run the following command in your terminal:
npm installation command:
$ npm i jokifyyarn installation command:
$ yarn add jokifyGetting started
First, require this library to your project as follows:
const jokify = require("jokify");If it's an ES Module then import it to your project as follows:
import jokify from "jokify";Notes
New to Promises?
If you're not familiar with promises, check out the MDN documentation to learn more.
Api usage
Once you've imported jokify into your project, you're ready to fetch your first funny dadjoke.
Here's a simple example to get you started:
// Import the 'JokifyClient' class
const { JokifyClient } = require("jokify");
// Create a new instance of 'JokifyClient' class
const client = new JokifyClient();
// Call the fetchJoke() method
client.fetchJoke()
.then(result => {
// Log the result
console.log(result);
// Result object contains:
// - joke
// - id
// - status
})
.catch(error => {
// Handle any error(s) which occur
console.error(error);
})LICENSE
jokify is released under the MIT License.
View the full license terms here.
Bugs & Issues
Found a bug or want a new feature?
Report issues and request features on the jokify issue tracker.
Thanks for reading!
Have a great day ahead :D
