Class GetMessageHistoryApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.message.request.GetMessageHistoryApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<List<MessageHistory>>
public class GetMessageHistoryApiRequest
extends ZulipApiRequest
implements ExecutableApiRequest<List<MessageHistory>>
Zulip API request builder for retrieving the history of a message.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGetMessageHistoryApiRequest
(ZulipHttpClient client, long messageId) Constructs aGetMessageHistoryApiRequest
. -
Method Summary
Modifier and TypeMethodDescriptionexecute()
Executes The Zulip API request for retrieving the history of a message.withAllowEmptyTopicName
(boolean allowEmptyTopicName) Sets whether the topic names such as topic and prev_topic fields in the message_history objects returned can be an empty string.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
ALLOW_EMPTY_TOPIC_NAME
- See Also:
-
-
Constructor Details
-
GetMessageHistoryApiRequest
Constructs aGetMessageHistoryApiRequest
.- Parameters:
client
- The Zulip HTTP clientmessageId
- The id of the message to fetch history for
-
-
Method Details
-
withAllowEmptyTopicName
Sets whether the topic names such as topic and prev_topic fields in the message_history objects returned can be an empty string.- Parameters:
allowEmptyTopicName
- Whentrue
topic names such as topic and prev_topic fields in the message_history objects returned can be an empty string. When false, empty topic name strings are not allowed- Returns:
- This
GetMessageHistoryApiRequest
instance - See Also:
-
execute
Executes The Zulip API request for retrieving the history of a message.- Specified by:
execute
in interfaceExecutableApiRequest<List<MessageHistory>>
- Returns:
- this list of
MessageHistory
items - Throws:
ZulipClientException
- if the request was not successful
-