This package for npm returns random images of animals (cats, dogs, foxes etc.) from the official API.
npm install @sefinek/random-animals
const random = require('@sefinek/random-animals');
(async () => {
const data = await random.cat();
console.log(data.message);
})();
const random = require('@sefinek/random-animals');
random.fox().then(data => console.log(data.message));
Name | Usage | Description |
---|---|---|
cat | <random>.cat() |
Return random cats |
dog | <random>.dog() |
Return random dogs |
fox | <random>.fox() |
Return random foxes |
fish | <random>.fish() |
Return random fishes |
alpaca | <random>.alpaca() |
Return random alpacas |
bird | <random>.bird() |
Return random bird |
version | <random>.version() |
Return version of this module |
apiVersion | <random>.apiVersion() |
Return API version |
cdnVersion | <random>.cdnVersion() |
Return CDN version |
{
"success": true,
"status": 200,
"info": { "category": "animals", "endpoint": "cat" },
"message": "https://cdn.sefinek.net/images/animals/cat/neva-masquerade-cats-1375033-min.jpg"
}
If you encounter any issues or have questions, please open a new Issue on GitHub.
If you find this package useful, please consider giving it a star on GitHub page.