Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sefinek/random-fox-img
An npm module that provides random fox images. Fast and reliable. 🦊🌿
https://github.com/sefinek/random-fox-img
animal animals cute-fox cute-fox-image cute-foxes fox foxes foxy images javascript random random-animal random-fox random-foxes random-images random-picture
Last synced: 16 days ago
JSON representation
An npm module that provides random fox images. Fast and reliable. 🦊🌿
- Host: GitHub
- URL: https://github.com/sefinek/random-fox-img
- Owner: sefinek
- License: mit
- Created: 2022-05-15T06:44:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-01T21:16:55.000Z (3 months ago)
- Last Synced: 2024-12-06T10:54:36.517Z (17 days ago)
- Topics: animal, animals, cute-fox, cute-fox-image, cute-foxes, fox, foxes, foxy, images, javascript, random, random-animal, random-fox, random-foxes, random-images, random-picture
- Language: JavaScript
- Homepage: https://npmjs.com/package/random-fox-img
- Size: 473 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
🦊 » Random fox images « 🦊
Please check a more elaborate alternative: @sefinek/random-animals
» Star the repo if you liked it «
⭐
## 📑 » About
This module retrieves random fox images from the [api.sefinek.net](https://api.sefinek.net) API using native module like [https](https://nodejs.org/api/https.html).
Each image is appropriately compressed.## 😼 » Installation
```bash
npm install random-fox-img
```## 🐈 » Usage
### • Importing
```js
const getRandomFox = require('random-fox-img');
```
### • Async/await example
```js
(async () => {
const data = await getRandomFox();
console.log(data.message);
})();
```
### • Promise example
```js
getRandomFox().then(data => console.log(data.message));
```
### • Returned object
```json
{
"success": true,
"status": 200,
"info": { "category": "animals", "endpoint": "fox" },
"message": "https://cdn.sefinek.net/images/animals/fox/red-fox-in-the-wild-2-1624831.jpg"
}
```## ✨ » Final information
Open a new [Issue](https://github.com/sefinek24/random-fox-img/issues/new) if you have any questions or issues related to this module or API.If you like this module, please star [the repository](https://github.com/sefinek24/random-fox-img).
## 📜 » License MIT