Class UpdateLinkifierApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.server.request.UpdateLinkifierApiRequest
- All Implemented Interfaces:
VoidExecutableApiRequest
Zulip API request builder for updating a linkifier.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUpdateLinkifierApiRequest(ZulipHttpClient client, long id, String pattern, String urlTemplate) Constrtucts aUpdateLinkifierApiRequest. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the Zulip API request for updating a linkifier.withAlternativeUrlTemplates(String... alternativeUrlTemplates) Sets additional RFC 6570 compliant URL templates used for reverse linkification.withExampleInput(String exampleInput) Sets an example input string that matches the linkifier pattern.withReverseTemplate(String reverseTemplate) Sets the template used to convert a URL back into the text that the linkifier pattern matches.Methods inherited from class ZulipApiRequest
client, getParam, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
PATTERN
- See Also:
-
URL_TEMPLATE
- See Also:
-
EXAMPLE_INPUT
- See Also:
-
REVERSE_TEMPLATE
- See Also:
-
ALTERNATIVE_URL_TEMPLATES
- See Also:
-
-
Constructor Details
-
UpdateLinkifierApiRequest
public UpdateLinkifierApiRequest(ZulipHttpClient client, long id, String pattern, String urlTemplate) Constrtucts aUpdateLinkifierApiRequest.- Parameters:
client- The Zulip HTTP clientid- The id of the linkifier to updatepattern- The regular expression that should trigger the linkifierurlTemplate- The RFC 6570 compliant URL template used for the link
-
-
Method Details
-
withExampleInput
Sets an example input string that matches the linkifier pattern. Required when setting a reverse template.- Parameters:
exampleInput- The example input- Returns:
- This
UpdateLinkifierApiRequestinstance - See Also:
-
withReverseTemplate
Sets the template used to convert a URL back into the text that the linkifier pattern matches.- Parameters:
reverseTemplate- The reverse template- Returns:
- This
UpdateLinkifierApiRequestinstance - See Also:
-
withAlternativeUrlTemplates
Sets additional RFC 6570 compliant URL templates used for reverse linkification.- Parameters:
alternativeUrlTemplates- The alternative URL templates- Returns:
- This
UpdateLinkifierApiRequestinstance - See Also:
-
execute
Executes the Zulip API request for updating a linkifier.- Specified by:
executein interfaceVoidExecutableApiRequest- Throws:
ZulipClientException- if the request was not successful
-