moderator-toolbox-nxg-for-reddit / modules/historybutton/moduleapi

modules/historybutton/moduleapi

Functions

getCommentHistoryData()

getCommentHistoryData(user, commentCount): Promise<CommentHistoryData>

Defined in: extension/data/modules/historybutton/moduleapi.ts:89

Fetches and aggregates a user’s comment history into subreddit and external link domain frequency tables.

Parameters

user

string

The user whose comment history to fetch.

commentCount

number

Maximum number of comments to retrieve.

Returns

Promise<CommentHistoryData>

Total comment count, per-subreddit counts, and external domains linked in comment bodies.


getSubmissionHistoryData()

getSubmissionHistoryData(user): Promise<SubmissionHistoryData>

Defined in: extension/data/modules/historybutton/moduleapi.ts:56

Fetches and aggregates a user’s submission history into domain and subreddit frequency tables.

Parameters

user

string

Returns

Promise<SubmissionHistoryData>

Total submission count, per-domain counts, per-subreddit counts with karma, and external domains linked in selfpost bodies.


getUserInfo()

getUserInfo(user): Promise<UserInfo>

Defined in: extension/data/modules/historybutton/moduleapi.ts:11

Fetches basic account information for a Reddit user.

Parameters

user

string

Returns

Promise<UserInfo>

Account age, submission karma, and comment karma.