Skip to main content

ModerationApiClient

Contains all the endpoints needed to manage moderation.

Constructors

new ModerationApiClient()

new ModerationApiClient(): ModerationApiClient

Returns

ModerationApiClient

Methods

getAllFlaggedContributions()

static getAllFlaggedContributions(params?, config?): Promise <SCPaginatedResponse<SCFlaggedContributionType>>

This endpoint retrieves all flagged contributions.

Parameters

ParameterTypeDescription
params?FlaggedContributionParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCFlaggedContributionType>>

Source

services/moderation/index.ts:73


getAllFlagsForSpecificContribution()

static getAllFlagsForSpecificContribution(id, contribution_type, flag_type?, config?): Promise <SCPaginatedResponse<SCFlagType>>

This endpoint retrieves all flags for a specific contribution.

Parameters

ParameterTypeDescription
idstring | number
contribution_typeSCContributionType
flag_type?SCFlagTypeEnum
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCFlagType>>

Source

services/moderation/index.ts:88


getContributionModerationStatus()

static getContributionModerationStatus(id, contribution_type, config?): Promise<SCContributionStatus>

This endpoint retrieves moderation status for a specific contribution.

Parameters

ParameterTypeDescription
idstring | number
contribution_typeSCContributionType
config?AxiosRequestConfig<any>

Returns

Promise<SCContributionStatus>

Source

services/moderation/index.ts:120


getUsersForModeration()

static getUsersForModeration(params?, config?): Promise <SCPaginatedResponse<SCUserModerationType>>

This endpoint retrieves all users for moderation purpose.

Parameters

ParameterTypeDescription
params?ModerationParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserModerationType>>

Source

services/moderation/index.ts:39


moderateAContribution()

static moderateAContribution(id, data, config?): Promise<any>

This endpoint provides actions for flagged contributions moderation.

Parameters

ParameterTypeDescription
idstring | number
dataModerateContributionParams
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/moderation/index.ts:110


moderateASpecificUser()

static moderateASpecificUser(id, status, days_blocked?, hard?, config?): Promise<any>

This endpoint performs users moderation.

Parameters

ParameterTypeDescription
idstring | number
statusSCUserStatus
days_blocked?string
hard?number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/moderation/index.ts:52