Search
⌃K
Links
🆔

ID

Choose a specific joke by its ID
get
https://api.night-api.com/
images/sfw/:id
SFW Images
​
const axios = require("axios");
​
axios.get('https://api.night-api.com/images/sfw/5', {
headers: {
authorization: "Your API token"
}
})
.then(function (response) {
console.log(response.data);
})
​
Or with the module
// Return: Promise
​
const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');
​
const image = await api.sfw.fetchImage(5); // Image with ID 5