It is a JavaScript/TypeScript API wrapper for the pet simulator web API.
Run "npm install petsim.js"
import { getClan } from "petsim.js"; // Or Using The require() function
(async () => {
const clan = await getClan("HIPM"); // Get details of the "HIPM" clan
console.log(clan); // Log out the result
})();
import { getCollection } from "petsim.js"; // Or Using The require() function
(async () => {
const pets = await getCollection("pets"); // Get the "pets" collection data
console.log(pets); // Log out the result
})();
import { getRAP, getExists } from "petsim.js"; // Or Using The require() function
(async () => {
const [RAP, exists] = await Promise.all([getRAP(), getExists()]); // get RAP and Exists data
console.log(RAP, exists); // Log out the result
})();