Skip to content

Commit

Permalink
chore: add shield mode scopes to enum (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
iProdigy committed Apr 28, 2023
1 parent 6d62c0d commit e58d7f7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
Expand Up @@ -46,6 +46,8 @@ public enum TwitchScopes {
HELIX_CHAT_MESSAGES_MANAGE("moderator:manage:chat_messages"),
HELIX_CHAT_SETTINGS_MANAGE("moderator:manage:chat_settings"),
HELIX_CHAT_SETTINGS_READ("moderator:read:chat_settings"),
HELIX_SHIELD_MODE_MANAGE("moderator:manage:shield_mode"),
HELIX_SHIELD_MODE_READ("moderator:read:shield_mode"),
HELIX_SHOUTOUTS_MANAGE("moderator:manage:shoutouts"),
HELIX_SHOUTOUTS_READ("moderator:read:shoutouts"),
HELIX_USER_COLOR_MANAGE("user:manage:chat_color"),
Expand Down
Expand Up @@ -9,6 +9,9 @@
* This event informs the subscriber that the broadcaster’s moderation settings were changed based on the broadcaster’s Shield Mode configuration settings.
* <p>
* Requires the moderator:read:shield_mode or moderator:manage:shield_mode scope.
*
* @see com.github.twitch4j.auth.domain.TwitchScopes#HELIX_SHIELD_MODE_READ
* @see com.github.twitch4j.auth.domain.TwitchScopes#HELIX_SHIELD_MODE_MANAGE
*/
public class ShieldModeBeginType implements SubscriptionType<ShieldModeCondition, ShieldModeCondition.ShieldModeConditionBuilder<?, ?>, ShieldModeBeginEvent> {
@Override
Expand Down
Expand Up @@ -9,6 +9,9 @@
* This event informs the subscriber that the broadcaster’s moderation settings were changed based on the broadcaster’s Shield Mode configuration settings.
* <p>
* Requires the moderator:read:shield_mode or moderator:manage:shield_mode scope.
*
* @see com.github.twitch4j.auth.domain.TwitchScopes#HELIX_SHIELD_MODE_READ
* @see com.github.twitch4j.auth.domain.TwitchScopes#HELIX_SHIELD_MODE_MANAGE
*/
public class ShieldModeEndType implements SubscriptionType<ShieldModeCondition, ShieldModeCondition.ShieldModeConditionBuilder<?, ?>, ShieldModeEndEvent> {
@Override
Expand Down
Expand Up @@ -1921,6 +1921,8 @@ default HystrixCommand<ModeratorEventList> getModeratorEvents(
* @param broadcasterId The ID of the broadcaster whose Shield Mode activation status you want to get.
* @param moderatorId The ID of the broadcaster or a user that is one of the broadcaster’s moderators. This ID must match the user ID in the access token.
* @return ShieldModeStatusWrapper
* @see com.github.twitch4j.auth.domain.TwitchScopes#HELIX_SHIELD_MODE_READ
* @see com.github.twitch4j.auth.domain.TwitchScopes#HELIX_SHIELD_MODE_MANAGE
*/
@RequestLine("GET /moderation/shield_mode?broadcaster_id={broadcaster_id}&moderator_id={moderator_id}")
@Headers("Authorization: Bearer {token}")
Expand All @@ -1938,6 +1940,7 @@ HystrixCommand<ShieldModeStatusWrapper> getShieldModeStatus(
* @param moderatorId The ID of the broadcaster or a user that is one of the broadcaster’s moderators. This ID must match the user ID in the access token.
* @param active A Boolean value that determines whether to activate Shield Mode.
* @return ShieldModeStatusWrapper
* @see com.github.twitch4j.auth.domain.TwitchScopes#HELIX_SHIELD_MODE_MANAGE
*/
@RequestLine("PUT /moderation/shield_mode?broadcaster_id={broadcaster_id}&moderator_id={moderator_id}")
@Headers({
Expand Down

0 comments on commit e58d7f7

Please sign in to comment.