Class CreateSavedSnippetApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.snippet.request.CreateSavedSnippetApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<Integer>
public class CreateSavedSnippetApiRequest
extends ZulipApiRequest
implements ExecutableApiRequest<Integer>
Zulip API request builder for creating a saved snippet.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreateSavedSnippetApiRequest(ZulipHttpClient client, String title, String content) Constructs aCreateSavedSnippetApiRequest. -
Method Summary
Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
CONTENT
- See Also:
-
TITLE
- See Also:
-
-
Constructor Details
-
CreateSavedSnippetApiRequest
Constructs aCreateSavedSnippetApiRequest.- Parameters:
client- The Zulip HTTP clienttitle- The title of the saved snippetcontent- The content of the saved snippet in text or Markdown format
-
-
Method Details
-
execute
Executes the Zulip API request for creating a saved snippet.- Specified by:
executein interfaceExecutableApiRequest<Integer>- Returns:
- The id of the created saved snippet
- Throws:
ZulipClientException- if the request was not successful
-