A Node.js wrapper for the JokeAPI with only one dependency isomorphic-unfetch.
npm i @qgisk/jokeapi-wrapper
For the full wrapper documentation checkout this
For complete API documentation, up-to-date parameters, responses and errors, please refer to JokeAPI.
// Import the wrapper library
import JokeAPI from '@qgisk/jokeapi-wrapper';
// Initiate the client
const JokeClient = new JokeAPI();
// Create a function that gets a joke
const get = async () => {
const joke = await JokeClient.getJoke();
console.log(joke);
};
// Execute the function
get();