✅ Easy to use cat api wrapper!
📌 Variety of methods to use!
📚 Can be used in Typescript and Javascript!
npm install catfax
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 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
Get support here: https://discord.gg/36nFHPmRqk