random-cat-img

    1.0.3 • Public • Published

    😻 » What is that? « 😽

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

    Random cat

    😼 » Installation

    $ npm install random-cat-img

    🐈 » Usage

    • Async/await example

    const randomCat = require('random-cat-img');
    
    (async () => {
        const res = await randomCat();
        console.log(res.data);
    })();

    • Promise example

    const randomCat = require('random-cat-img');
    
    randomCat().then(res => console.log(res.data));

    • Returned object

    {
      "success": true,
      "status": 200,
      "category": "animals",
      "endpoint": "cat",
      "message": "https://cdn.skiffybot.xyz/images/animals/cat/little-cat-1408118-min.jpg"
    }

    🤝 » Help

    Open new Issue on GitHub.

    » Thank you

    Give a star if you can on GitHub page.

    Install

    npm i random-cat-img

    DownloadsWeekly Downloads

    301

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    3.47 kB

    Total Files

    6

    Last publish

    Collaborators

    • sefinek