sefinek24 / random-fox-img

An npm module that provides random fox images. Fast and reliable. 🦊🌿

Home Page:https://npmjs.com/package/random-fox-img

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🦊 » What is that? « 🦊

This package for npm returns a random fox image from API.

Check better alternative @sefinek/random-animals.

Random fox image

» Star the repo if you liked it «

😼 » Installation

$ npm install random-fox-img

🌠 » Usage

• Async/await example

const randomFox = require('random-fox-img');

(async () => {
    const res = await randomFox();
    console.log(res.data.message);
})();

• Promise example

const randomFox = require('random-fox-img');

randomFox().then(res => console.log(res.data.message));

• Returned object

{
  "success": true,
  "status": 200,
  "category": "animals",
  "endpoint": "fox",
  "message": "https://cdn.sefinek.net/images/animals/fox/red-fox-in-the-wild-2-1624831.jpg"
}

🤝 » Help

Open new Issue on GitHub.

» Thank you

Give a star if you can on GitHub page.

About

An npm module that provides random fox images. Fast and reliable. 🦊🌿

https://npmjs.com/package/random-fox-img

License:MIT License


Languages

Language:JavaScript 100.0%