Search…
⌃K
Links
🆔

ID

Choose a specific joke by its ID
get
https://api.night-api.com/
jokes/:id
Blague par ID
​
const axios = require("axios");
​
axios.get('https://api.night-api.com/jokes/44', {
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.byID(50); // Return: Promise