README
4CHAN-FULL 🎉
www.4chan.org non-official read only api.
Installation
npm install 4chan-full
Possibilities
Custom Request Handler (
new FourChanFull(yourHandler)
);Get Thread (
.thread(boardCode, threadId)
)Get Board (
.board(boardCode, page)
)Get Archive (
.archive(boardCode)
)Get Popular Threads (
.popular(safetyType)
)Get Stats (
.stats()
)Board List (
.boards
)
Example Code
That small script lists all files of the thread..
const { fchf } = require("4chan-full");
(async () => {
const thread = await fchf.thread("wg", "7694540");
// thread.file -> Thread owner (OP) file.
// thread.replies[?].file -> reply file.
const files = [thread.file, ...thread.replies.map((i) => i?.file)].filter(
(i) => i != null
);
console.log(files);
})();
TODO
- Full Code REWRITE
- Parse Message Contents (Quotes etc.)
- Thread Update Watcher
- Board Update Watcher
Type List
- Archive
- ArchiveItem
- Board
- BoardInfo
- File
- MessageContent
- MessageContentPart
- PopularThreadPart
- PopularThread
- PopularThreads
- Reply
- SemiThread
- Stats
- Thread
Update 1.1.1
- Parse Message Contents
- Add Type List To README MD
HUGE Update 1.1.0
- Full Rewrite API
- Update README MD