ModerationApiClient
Contains all the endpoints needed to manage moderation.
Constructors
new ModerationApiClient()
new ModerationApiClient():
ModerationApiClient
Returns
Methods
getAllFlaggedContributions()
static
getAllFlaggedContributions(params
?,config
?):Promise
<SCPaginatedResponse
<SCFlaggedContributionType
>>
This endpoint retrieves all flagged contributions.
Parameters
Parameter | Type | Description |
---|---|---|
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
Parameter | Type | Description |
---|---|---|
id | string | number | |
contribution_type | SCContributionType | |
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
Parameter | Type | Description |
---|---|---|
id | string | number | |
contribution_type | SCContributionType | |
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
Parameter | Type | Description |
---|---|---|
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
Parameter | Type | Description |
---|---|---|
id | string | number | |
data | ModerateContributionParams | |
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
Parameter | Type | Description |
---|---|---|
id | string | number | |
status | SCUserStatus | |
days_blocked ? | string | |
hard ? | number | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<any
>