New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

playcat-sdk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

playcat-sdk

**PlayCat SDK** is an all‑in‑one **JavaScript/TypeScript toolkit** for seamlessly connecting your games to the **CatRoom Ecosystem**, **CatAds network**, and **PlayCat services** — with full support for both **browser** and **Node.js** environments.

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

PlayCat SDK 🐾

PlayCat SDK is an all‑in‑one JavaScript/TypeScript toolkit for seamlessly connecting your games to the CatRoom Ecosystem, CatAds network, and PlayCat services — with full support for both browser and Node.js environments.

Whether you’re building a casual web game, a mobile hybrid, or a Node‑powered server integration, PlayCat SDK gives you real‑time connectivity, easy authentication, and direct access to CatRoom game APIs.

✨ Features

  • Cross‑platform — works in browsers & Node.js out‑of‑the‑box.
  • Real‑time communication — powered by Socket.IO, automatically handles requests & responses.
  • Ease of authentication — token from query string (&cr_game_token) or direct constructor input.
  • Pre‑built API methods:
    • Get user by token
    • Guest login
    • Fetch leaderboard
    • Access shop items
    • Buy items or coins
    • Load user data by ID
  • Lightweight & fast — optimized build with ESM, CJS, and minified IIFE versions.

🚀 Installation

# Using Yarn
yarn add playcat-sdk

# Using npm
npm install playcat-sdk

📦 Usage

In Browser

<script src="https://unpkg.com/playcat-sdk/dist/playcat.min.js"></script>
<script>
  const pc = new PlayCat();
  pc.getLeaderboard(10).then(console.log);
</script>

In Node.js

import { PlayCat } from 'playcat-sdk';

const pc = new PlayCat({ token: 'YOUR_TOKEN_HERE' });

(async () => {
  const leaderboard = await pc.getLeaderboard();
  console.log(leaderboard);
})();

🔌 API Methods

MethodDescription
getUserWithToken()Retrieve a user with the current authentication token.
loginAsGuest()Log in as a guest user.
getLeaderboard(limit?: number)Get top players from the leaderboard.
getShopItems()Retrieve available shop items.
buyItem(itemId: string)Purchase a shop item by ID.
buyCoin(amount: number)Purchase coins.
getUserDataById(userId: string)Retrieve a user’s data by ID.

🛠 Development

Clone the repo, install dependencies, and build:

git clone https://github.com/yourusername/playcat-sdk.git
cd playcat-sdk
yarn install
yarn build

📢 Keywords

Game SDK · CatRoom API · CatAds Integration · PlayCat Services · Real‑Time Game API · Browser Game SDK · Node.js Game SDK · Multiplayer Game Toolkit · WebSocket Game API · Socket.IO Game Client

🤝 Commercial Collaboration

For commercial or partnership inquiries, please visit:
poolakey.ir

📄 License

MIT License © 2025 / SefrTaSad

FAQs

Package last updated on 01 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts