Skip to content

Commit

Permalink
refactor: make channel.raid eventsub official (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
iProdigy committed Mar 4, 2021
1 parent 15729fc commit 9605003
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
@@ -1,18 +1,14 @@
package com.github.twitch4j.eventsub.subscriptions;

import com.github.twitch4j.common.annotation.Unofficial;
import com.github.twitch4j.eventsub.condition.ChannelRaidCondition;
import com.github.twitch4j.eventsub.events.ChannelRaidEvent;

/**
* A broadcaster raids another broadcaster’s channel.
* <p>
* No authorization required.
* <p>
* This {@link SubscriptionType} is marked as {@link Unofficial} due to Twitch indicating that it is not intended for use in production environments.
*/
@Unofficial
public class BetaChannelRaidType implements SubscriptionType<ChannelRaidCondition, ChannelRaidCondition.ChannelRaidConditionBuilder<?, ?>, ChannelRaidEvent> {
public class ChannelRaidType implements SubscriptionType<ChannelRaidCondition, ChannelRaidCondition.ChannelRaidConditionBuilder<?, ?>, ChannelRaidEvent> {

@Override
public String getName() {
Expand All @@ -21,7 +17,7 @@ public String getName() {

@Override
public String getVersion() {
return "beta";
return "1";
}

@Override
Expand Down
@@ -1,6 +1,5 @@
package com.github.twitch4j.eventsub.subscriptions;

import com.github.twitch4j.common.annotation.Unofficial;
import lombok.experimental.UtilityClass;

import java.util.Collections;
Expand All @@ -12,8 +11,6 @@
@UtilityClass
public class SubscriptionTypes {
private final Map<String, SubscriptionType<?, ?, ?>> SUBSCRIPTION_TYPES;
@Unofficial
public final BetaChannelRaidType CHANNEL_RAID_BETA;
public final ChannelBanType CHANNEL_BAN;
public final ChannelCheerType CHANNEL_CHEER;
public final ChannelFollowType CHANNEL_FOLLOW;
Expand All @@ -22,6 +19,7 @@ public class SubscriptionTypes {
public final ChannelPointsCustomRewardRedemptionUpdateType CHANNEL_POINTS_CUSTOM_REWARD_REDEMPTION_UPDATE;
public final ChannelPointsCustomRewardRemoveType CHANNEL_POINTS_CUSTOM_REWARD_REMOVE;
public final ChannelPointsCustomRewardUpdateType CHANNEL_POINTS_CUSTOM_REWARD_UPDATE;
public final ChannelRaidType CHANNEL_RAID;
public final ChannelSubscribeType CHANNEL_SUBSCRIBE;
public final ChannelUnbanType CHANNEL_UNBAN;
public final ChannelUpdateType CHANNEL_UPDATE;
Expand All @@ -40,7 +38,6 @@ public class SubscriptionTypes {
static {
SUBSCRIPTION_TYPES = Collections.unmodifiableMap(
Stream.of(
CHANNEL_RAID_BETA = new BetaChannelRaidType(),
CHANNEL_BAN = new ChannelBanType(),
CHANNEL_CHEER = new ChannelCheerType(),
CHANNEL_FOLLOW = new ChannelFollowType(),
Expand All @@ -49,6 +46,7 @@ public class SubscriptionTypes {
CHANNEL_POINTS_CUSTOM_REWARD_REDEMPTION_UPDATE = new ChannelPointsCustomRewardRedemptionUpdateType(),
CHANNEL_POINTS_CUSTOM_REWARD_REMOVE = new ChannelPointsCustomRewardRemoveType(),
CHANNEL_POINTS_CUSTOM_REWARD_UPDATE = new ChannelPointsCustomRewardUpdateType(),
CHANNEL_RAID = new ChannelRaidType(),
CHANNEL_SUBSCRIBE = new ChannelSubscribeType(),
CHANNEL_UNBAN = new ChannelUnbanType(),
CHANNEL_UPDATE = new ChannelUpdateType(),
Expand Down

0 comments on commit 9605003

Please sign in to comment.