fakesocial-ts
v0.9.9
Published
<p align="center"> <img src="./assets/banner.png" alt="FakeSocial Banner" /> </p> <p align="center"> Official TypeScript SDK for the FakeSocial API </p>
Downloads
43
Readme
About
FakeSocial is a modern, lightweight and fully typed SDK designed to interact with the FakeSocial API effortlessly.
Built with performance and developer experience in mind, it provides a clean and modular interface for building apps, bots and integrations.
Installation
npm install fakesocial-ts
bun add fakesocial-tsQuick Example
import { createFakeMediaClient } from "fakesocial-ts";
const client = createFakeMediaClient({
baseUrl: "https://fakesocial.fr",
token: "your-token",
});
const me = await client.me.get();
console.log(me);Bot Example
Create a simple FakeSocial bot that listens for new posts:
const bot = createFakeMediaClient({
baseUrl: "https://fakesocial.fr",
token: "bot-token",
});
const watcher = bot.posts.watch({
intervalMs: 10000,
initialFetch: true,
});
watcher.on("new-posts", (posts) => {
console.log(posts);
});
watcher.start();Features
- Fully typed with TypeScript
- Simple and intuitive API
- Modular architecture
- Bot-ready features
- Optimized for performance
API Modules
auth– authentication (login, register, TOTP, passkeys)oauth– tokens, apps, URL helpersusers,me,posts,conversations,notificationsreports,appeals,admin,platform
Includes FakeMediaApiError for consistent error handling.
Architecture
The SDK is structured into clear layers:
core/→ HTTP layer & shared utilitiesmodules/→ domain-specific endpointsclient.ts→ public API interface
This design ensures scalability and maintainability.
Contributing
Contributions, issues and feature requests are welcome!
License
MIT
