Coder Social home page Coder Social logo

sefinek24 / random-animals Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 371 KB

The best npm package that retrieves images of random animals such as cats, foxes, dogs, and more! ๐Ÿ˜ป๐ŸฆŠ๐Ÿ•

Home Page: https://npmjs.com/package/@sefinek/random-animals

License: MIT License

JavaScript 100.00%
alpacas api birds cats dogs fishes foxes image images random

random-animals's Introduction

Just a cat

ยป About this package ยซ
๐Ÿ˜ฝ ๐ŸฆŠ

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

The number of downloads Last commit Issues

๐Ÿ“ฅ ยป Installation

npm install @sefinek/random-animals

๐Ÿˆ ยป Usage

โ€ข Async/await example

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

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

โ€ข Promise example

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

random.fox().then(data => console.log(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
cdnVersion <random>.cdnVersion() Return CDN version

๐Ÿ“ƒ ยป Returned object

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

๐Ÿค ยป Help

If you encounter any issues or have questions, please open a new Issue on GitHub.

โญ ยป Thank you

If you find this package useful, please consider giving it a star on GitHub page.

random-animals's People

Contributors

dependabot[bot] avatar sefinek24 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

random-animals's Issues

Cors error

For api you need to add header access-control-allow-methods: * to your backend, without this header the requested methods are not available from the browser. Hope this page helps you:

https://enable-cors.org/server.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.