UNPKG

mika-ffstalk

Version:

A modern CLI and TypeScript library to inspect Free Fire player accounts using public API data.

191 lines (141 loc) โ€ข 3.58 kB
# ๐Ÿ” FreeFire Stalker ![npm](https://img.shields.io/npm/v/mika-ffstalk?color=crimson) ![types](https://img.shields.io/npm/types/mika-ffstalk) ![license](https://img.shields.io/npm/l/mika-ffstalk) ![downloads](https://img.shields.io/npm/dm/mika-ffstalk) > A blazing-fast, fully typed, and CLI-ready toolkit to fetch and inspect **Garena Free Fire** player profiles using public community APIs. > Designed for **Node.js**, **TypeScript**, and modern development workflows. --- <p align="center"> <img src="https://files.catbox.moe/md4zwm.jpeg" alt="Free Fire Banner" width="600" /> </p> --- ## โœจ Features - ๐Ÿง  **TypeScript-first** with full typings - โšก๏ธ Supports **ESM**, **CJS**, and **CLI** - ๐Ÿ” Fetches detailed **player metadata**, **pet**, **profile**, and **credit score** - ๐Ÿ“ท Built-in URLs for **banner** and **outfit** images - ๐Ÿงช Battle-tested with **Vitest** - ๐Ÿ’ก Ideal for: bots, dashboards, analytics, gamer tools --- ## ๐Ÿ“ฆ Installation ```bash # Using npm npm install mika-ffstalk # Or using yarn yarn add mika-ffstalk ``` --- ## ๐Ÿš€ Programmatic Usage ```ts import { fetchFreeFireAccountDetails } from "mika-ffstalk"; (async () => { const data = await fetchFreeFireAccountDetails("470699855"); console.log(data.metadata.nickname); // e.g., "Mika ST" })(); ``` --- ## ๐Ÿ”ง CLI Usage ```bash npx mika-ffstalk 470699855 # or npm link mika-stalk 470699855 ``` Optional flags: ```bash --json # Output raw JSON --table # Output in table format ``` Example: ```bash npx mika-ffstalk 470699855 --table ``` --- ## ๐Ÿ“‚ Output Format (Simplified) ```ts type FreeFireAccountData = { metadata: { nickname: string; accountId: string; region: string; level: string; rank: string; exp: string; lastLoginAt: string; diamondCost: string; }; pet: { name: string; level: string; exp: string; }; profile: { avatarId: string; clothes: string[]; equippedSkills: string[]; }; social: { battleTags: { tag: string; count: number }[]; language: string; signature: string; }; credit: { score: string; rewardState: string; }; assets: { bannerImageUrl: string; outfitImageUrl: string; }; }; ``` --- ## ๐Ÿงพ Sample Output ```json { "metadata": { "nickname": "PontaSensei", "accountId": "470699855", "region": "ID", "level": "57", "rank": "Diamond IV" }, "assets": { "bannerImageUrl": "https://discordbot.freefirecommunity.com/banner_image_api?uid=470699855&region=id", "outfitImageUrl": "https://discordbot.freefirecommunity.com/outfit_image_api?uid=470699855&region=id" } } ``` --- ## ๐Ÿ“š API Reference ### `fetchFreeFireAccountDetails(uid: string): Promise<FreeFireAccountData>` | Parameter | Type | Required | Description | | --------- | ------ | -------- | ---------------------------- | | `uid` | string | โœ… | The Free Fire UID to inspect | Returns a structured object with all account details, suitable for UIs or APIs. --- ## ๐Ÿ–ผ๏ธ UI-Ready Assets - โœ… `bannerImageUrl` - โœ… `outfitImageUrl` Embed them directly into dashboards or profile cards. --- ## ๐Ÿง‘โ€๐Ÿ’ป Local Development Clone and install: ```bash git clone https://github.com/MikaYelovich/mika-ffstalk cd mika-ffstalk npm install npm run dev ``` Run tests: ```bash npm run test ``` --- ## ๐Ÿค Contributing Contributions are welcome! If you'd like to fix a bug or add a feature, please open an issue or submit a PR. --- ## ๐Ÿ“„ License MIT ยฉ 2025 Mika Yelovich