Class UpdateStreamSubscriptionSettingsApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.stream.request.UpdateStreamSubscriptionSettingsApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<List<String>>
public class UpdateStreamSubscriptionSettingsApiRequest
extends ZulipApiRequest
implements ExecutableApiRequest<List<String>>
Zulip API request builder for updating stream subscription settings.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute()Executes the Zulip API request for updating stream subscription settings.withAudibleNotifications(long streamId, boolean audibleNotifications) Sets whether to play a sound for messages sent to the stream.Sets the hex value of the color to display on the Zulip UI.withDesktopNotifications(long streamId, boolean desktopNotifications) Sets whether to show desktop notifications for messages sent to the stream.withEmailNotifications(long streamId, boolean emailNotifications) Sets whether to enable or disable email notifications a sound for messages sent to the stream.withIsMuted(long streamId, boolean muted) Sets whether the stream should be muted.withPinToTop(long streamId, boolean pinToTop) Sets whether the stream should be pinned to the top in the Zulip UI.withPushNotifications(long streamId, boolean pushNotifications) Sets whether to enable or disable push notifications a sound for messages sent to the stream.withWildcardMentionsNotify(long streamId, boolean wildcardMentionsNotify) Sets whether to enable or disable wildcard mentions trigger notifications for messages sent to the stream.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
COLOR
- See Also:
-
IS_MUTED
- See Also:
-
PIN_TO_TOP
- See Also:
-
DESKTOP_NOTIFICATIONS
- See Also:
-
AUDIBLE_NOTIFICATIONS
- See Also:
-
PUSH_NOTIFICATIONS
- See Also:
-
EMAIL_NOTIFICATIONS
- See Also:
-
WILDCARD_MENTIONS_NOTIFY
- See Also:
-
SUBSCRIPTION_DATA
- See Also:
-
-
Constructor Details
-
UpdateStreamSubscriptionSettingsApiRequest
Constructs aUpdateStreamSubscriptionSettingsApiRequest.- Parameters:
client- The Zulip HTTP client
-
-
Method Details
-
withColor
Sets the hex value of the color to display on the Zulip UI.- Parameters:
streamId- The id of the stream for which the setting should be updatedcolor- The hex value of the color- Returns:
- This
UpdateStreamSubscriptionSettingsApiRequestinstance
-
withIsMuted
Sets whether the stream should be muted.- Parameters:
streamId- The id of the stream for which the setting should be updatedmuted-trueto mute the stream.falseto unmute the stream- Returns:
- This
UpdateStreamSubscriptionSettingsApiRequestinstance
-
withPinToTop
Sets whether the stream should be pinned to the top in the Zulip UI.- Parameters:
streamId- The id of the stream for which the setting should be updatedpinToTop-trueto pin the stream to top.falseto unpin the stream- Returns:
- This
UpdateStreamSubscriptionSettingsApiRequestinstance
-
withDesktopNotifications
public UpdateStreamSubscriptionSettingsApiRequest withDesktopNotifications(long streamId, boolean desktopNotifications) Sets whether to show desktop notifications for messages sent to the stream.- Parameters:
streamId- The id of the stream for which the setting should be updateddesktopNotifications-trueto enable desktop notifications.falseto disable desktop notifications.- Returns:
- This
UpdateStreamSubscriptionSettingsApiRequestinstance
-
withAudibleNotifications
public UpdateStreamSubscriptionSettingsApiRequest withAudibleNotifications(long streamId, boolean audibleNotifications) Sets whether to play a sound for messages sent to the stream.- Parameters:
streamId- The id of the stream for which the setting should be updatedaudibleNotifications-trueto enable audible notifications.falseto disable audible notifications.- Returns:
- This
UpdateStreamSubscriptionSettingsApiRequestinstance
-
withPushNotifications
public UpdateStreamSubscriptionSettingsApiRequest withPushNotifications(long streamId, boolean pushNotifications) Sets whether to enable or disable push notifications a sound for messages sent to the stream.- Parameters:
streamId- The id of the stream for which the setting should be updatedpushNotifications-trueto enable mobile push notifications.falseto disable mobile push notifications.- Returns:
- This
UpdateStreamSubscriptionSettingsApiRequestinstance
-
withEmailNotifications
public UpdateStreamSubscriptionSettingsApiRequest withEmailNotifications(long streamId, boolean emailNotifications) Sets whether to enable or disable email notifications a sound for messages sent to the stream.- Parameters:
streamId- The id of the stream for which the setting should be updatedemailNotifications-trueto enable email notifications.falseto disable email notifications.- Returns:
- This
UpdateStreamSubscriptionSettingsApiRequestinstance
-
withWildcardMentionsNotify
public UpdateStreamSubscriptionSettingsApiRequest withWildcardMentionsNotify(long streamId, boolean wildcardMentionsNotify) Sets whether to enable or disable wildcard mentions trigger notifications for messages sent to the stream.- Parameters:
streamId- The id of the stream for which the setting should be updatedwildcardMentionsNotify-trueto enable wildcard mentions trigger notifications.falseto disable email notifications.- Returns:
- This
UpdateStreamSubscriptionSettingsApiRequestinstance
-
execute
Executes the Zulip API request for updating stream subscription settings.- Specified by:
executein interfaceExecutableApiRequest<List<String>>- Returns:
- List of modified settings encapsulated by
StreamSubscriptionSetting - Throws:
ZulipClientException- if the request was not successful
-