Skip to content

A JavaScript/TypeScript API wrapper for the pet simulator web API.

Notifications You must be signed in to change notification settings

Soap-0020/petsim.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What Is petsim.js?

It is a JavaScript/TypeScript API wrapper for the pet simulator web API.

How Do I Install it?

Run "npm install petsim.js"

Usage

Getting Details Of A Clan

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
})();

Getting A Collection

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
})();

Getting Exists/RAP Data

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
})();

About

A JavaScript/TypeScript API wrapper for the pet simulator web API.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published