Class ReportMessageApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.message.request.ReportMessageApiRequest
- All Implemented Interfaces:
VoidExecutableApiRequest
Zulip API request builder for reporting a message for moderation.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReportMessageApiRequest(ZulipHttpClient client, long messageId, MessageReportReason reportReason) Constructs aRenderMessageApiRequest. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the Zulip API request for reporting a message for moderation.withDescription(String description) Sets a short description with additional context about why the current user is reporting the target message for moderation.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
DESCRIPTION
- See Also:
-
REPORT_TYPE
- See Also:
-
-
Constructor Details
-
ReportMessageApiRequest
public ReportMessageApiRequest(ZulipHttpClient client, long messageId, MessageReportReason reportReason) Constructs aRenderMessageApiRequest.- Parameters:
client- The Zulip HTTP clientmessageId- The id of the message to reportreportReason- The reason for the message report
-
-
Method Details
-
withDescription
Sets a short description with additional context about why the current user is reporting the target message for moderation. If the givenMessageReportReasonisMessageReportReason.OTHERthen a description is required.- Parameters:
description- Short description- Returns:
- This
ReportMessageApiRequestinstance
-
execute
Executes the Zulip API request for reporting a message for moderation.- Specified by:
executein interfaceVoidExecutableApiRequest- Throws:
ZulipClientException- if the request was not successful
-