Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add shield mode scopes to enum #774

Merged
merged 1 commit into from Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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