1.0.2 ā€¢ Published 3 years ago

catfax v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Logo

CatFax

āœ… Easy to use cat api wrapper!

šŸ“Œ Variety of methods to use!

šŸ“š Can be used in Typescript and Javascript!

Installation

npm install catfax

Setup

Using CatFax is simple really, here is a simple example.

NOTE: All methods must be awaited or have a .then

const CatFax = require("catfax");

const facts = new CatFax();

/* Some of the methods may require a APIKey.
 * Go to https://thecatapi.com to get it.
 * And put it in the options of where you defined the new catfax class!
 */
(async () => {
  const res = await facts.getImage();
  console.log(res);
})();

Getting Images

Getting images from the API is pretty easy, but with CatFax it's even easier!

You can specify the limit, the order, or the amount of pages.

// Without options.
await facts.getImage();
// With options.
await facts.getImage({ limit: 5, pages: 1, order: "DESC" });

Read more: Here

Support

Get support here: https://discord.gg/36nFHPmRqk

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago