catfax
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i catfax

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

6.55 kB

Total Files

7

Last publish

Collaborators

  • mystic.ts