🎲Random
All kinds of jokes of different types
Last updated
Was this helpful?
Was this helpful?
const axios = require("axios");
axios.get('https://api.night-api.com/jokes', {
headers: {
authorization: "API token"
}
})
.then(function (response) {
console.log(response.data);
})const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');
const blague = await api.jokes.random(); // Return: Promiseconst { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');
const blague = await api.jokes.random({
disallow: ['dark', 'limit']
}); // Return: Promise