API Reference
API Reference
Every class, method and type.
class Botlists extends EventEmitter
| Method | Returns | Description |
|---|---|---|
postStats(stats?, opts?) | Promise<PostReport> | Post to every tokened list, filter with only or skip |
postStatsTo(list, stats?) | Promise<PostResult> | Post to one list |
postViaBotBlock(stats?) | Promise<PostReport> | Single BotBlock fan-out |
startWebhooks(port?) | Promise<string> | Start the realtime server, returns address |
stopWebhooks() | Promise<void> | Stop the server |
ingestWebhook(list, body, isTest?) | void | Feed a webhook from your own framework |
fetchBot(list, botId?) | Promise<UniversalBot> | Normalized bot data from one list |
fetchVotes(list, botId?) | Promise<number | null> | Vote count on one list |
hasVoted(list, userId) | Promise<boolean | null> | User vote check where supported |
searchBots(list, query, limit?) | Promise<UniversalBot[]> | Search a list directory |
refreshStatus(force?) | Promise<StatusBoard> | Probe every list |
checkAndReportStatus(force?) | Promise<StatusBoard> | Probe, print table, issue links |
widgetUrl(list, botId?) | string | null | Widget image url |
viewBotUrl(list, botId?) | string | null | Listing page url |
startAutoPost(intervalMs?, stats?) | void | Periodic posting, default 30 min |
stopAutoPost() | void | Stop periodic posting |
class VoteWebhookServer extends EventEmitter
| Member | Description |
|---|---|
start() / stop() | Control the http server |
ingest(listQuery, body, opts) | Parse and emit without a socket |
address | http://host:port/path |
isRunning | Server state |
class UniversalParser
| Method | Returns |
|---|---|
parseBot(list, payload) | UniversalBot |
parseBots(list, payload) | UniversalBot[] |
parseVotes(list, payload) | number | null |
parseVoteWebhook(list, body, isTest?) | UniversalVote |
parseCommentWebhook(list, body, kind?) | UniversalComment |
class ConsoleReport (static)
| Method | Returns |
|---|---|
table(board) | Unicode status table string |
issueUrls(dead, repo?) | Prefilled GitHub issue urls per dead list |
class StatusChecker (static)
| Method | Returns |
|---|---|
toMarkdown(board) | Markdown table for READMEs |
Errors
BotlistsError carries listId, status and retryAfter so you can react per list. resolveList throws on ambiguous matches and returns null on unknown ids.