Links
Comment on page
📋

Category

Choose which Category of joke you would like to have
get
https://api.night-api.com/
jokes/:type
Joke by Category
Lists of available categories:
  • global
  • dev
  • dark
  • limit
  • beauf
  • blondes
const axios = require("axios");
axios.get('https://api.night-api.com/jokes/global', {
headers: {
authorization: "API token"
}
})
.then(function (response) {
console.log(response.data);
})
Or with the NPM module
const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');
const blague = await api.jokes.byCategory('dev'); // Return: Promise
Last modified 1yr ago