Skip to main content

ReportUser

public BackendReturnObject ReportUser(string ReportedNickname, string Details);
public BackendReturnObject ReportUser(string ReportedNickname, string Reason, string Details);

Parameters

ValueTypeDescription
ReportedNicknamestringNickname of the user being reported
Reasonstring(Optional) Reason for report
DetailsstringContent of the report(max 500 characters)

Description

A report of a specific user is made to the admin. The content of the report can be found in the console.

Example

Synchronous

Backend.Chat.ReportUser("ReportedNickname" , "Reasons", "Details");

Asynchronous

Backend.Chat.ReportUser("ReportedNickname" , "Reasons", "Details", callback => 
{
// Post-process
});

SendQueue

SendQueue.Enqueue(Backend.Chat.ReportUser, "ReportedNickname" , "Reasons", "Details", callback => 
{
// Post-process
});

Return cases

Success cases

When the report is successful
statusCode : 200
message : Success returnValue : {"result":"The report of id1(on id2) has been accepted."}

Error cases

When details are not entered
statusCode : 400
errorCode : BadParameterException
message : bad details of report, Invalid details of report

When the details are too long
statusCode : 400
errorCode : BadParameterException
message : bad details, Invalid details

When the nickname of the reported user does not exist
statusCode : 404
errorCode : NotFoundException
message: Nickname of user to report not found, The nickname of the user to report cannot be found