Napping Peanut Monsters

    @sefinek/random-animals
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.3 • Public • Published

    😽 » 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.sefinek.net/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.

    Install

    npm i @sefinek/random-animals

    DownloadsWeekly Downloads

    12

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    9.6 kB

    Total Files

    8

    Last publish

    Collaborators

    • sefinek