4chan-ts
Version:
A typescript client wrapper for 4chan api
45 lines (32 loc) โข 855 B
Markdown
# 4chan-ts
A modern and typed 4chan API wrapper written in TypeScript.
This package provides simple access to [4chan's public JSON API](https://github.com/4chan/4chan-API), supporting boards, threads, and posts with full type safety.
## โจ Features
- ๐ Supports all public endpoints of the 4chan API
- โก Built in TypeScript for type safety and modern dev experience
- ๐งช Lightweight
- ๐ Bun-first, Node/npm-compatible
---
## ๐ฆ Installation
### Using [Bun](https://bun.sh)
```bash
bun add 4chan-ts
```
### Using [NPM]
```bash
npm install 4chan-ts
```
### Quick Start
```ts
import { FourChanClient } from "4chan-ts";
(async ()=>{
const chan = new FourChanClient();
const {data , error} = await chan.getBoards();
if (error)
{
console.error(error);
return ;
}
console.log(data); // const data: BoardList
})()
```