JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q45811F
  • License MIT

This package returns random images of animals (cats, foxes etc.) from SkiffyBOT API.

Package Exports

  • @sefinek/random-animals
  • @sefinek/random-animals/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@sefinek/random-animals) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

😽 » What is that? « 🦊

This package for npm returns random images of animals (cats, foxes etc.) from API.

Random cat

📥 » Installation

$ npm install @sefinek/random-animals

🐈 » Usage

• Async/await example

const random = require('@sefinek/random-animals');

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

• Promise example

const random = require('@sefinek/random-animals');

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

😻 » Available functions

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
cdn <random>.cdn() Get data from CDN

📃 » Returned object

{
  "success": true,
  "status": 200,
  "category": "animals",
  "endpoint": "cat",
  "message": "https://cdn-skiffy.sefinek.fun/images/animals/cat/neva-masquerade-cats-1375033-min.jpg"
}

🤝 » Help

Open new Issue on GitHub.

⭐ » Thank you

Give a star if you can on GitHub page.