Skip to content

Commit

Permalink
Mark 'official' PubSub topics as obsolete (#152)
Browse files Browse the repository at this point in the history
Co-authored-by: Foretack <[email protected]>
  • Loading branch information
occluder and occluder authored Jan 26, 2025
1 parent 0a8193b commit ba931ff
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions MiniTwitch.PubSub/Models/Topics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public static class Topics
/// </summary>
/// <param name="channelId">ID of the channel to observe the events in</param>
/// <param name="overrideToken">Optional: An access token to override the provided token in <see cref="PubSubClient"/></param>
[Obsolete("Twitch will decommission all official PubSub topics on April 14, 2025.")]
public static Topic BitsEventsV1(long channelId, string? overrideToken = null) => new($"channel-bits-events-v1.{channelId}") { OverrideToken = overrideToken };
/// <summary>
/// Events that can be triggered by this topic:
Expand All @@ -49,6 +50,7 @@ public static class Topics
/// </summary>
/// <param name="channelId">ID of the channel to observe the events in</param>
/// <param name="overrideToken">Optional: An access token to override the provided token in <see cref="PubSubClient"/></param>
[Obsolete("Twitch will decommission all official PubSub topics on April 14, 2025.")]
public static Topic BitsEventsV2(long channelId, string? overrideToken = null) => new($"channel-bits-events-v2.{channelId}") { OverrideToken = overrideToken };
/// <summary>
/// Events that can be triggered by this topic:
Expand All @@ -59,6 +61,7 @@ public static class Topics
/// </summary>
/// <param name="channelId">ID of the channel to observe the events in</param>
/// <param name="overrideToken">Optional: An access token to override the provided token in <see cref="PubSubClient"/></param>
[Obsolete("Twitch will decommission all official PubSub topics on April 14, 2025.")]
public static Topic BitsBadgeUnlock(long channelId, string? overrideToken = null) => new($"channel-bits-badge-unlocks.{channelId}") { OverrideToken = overrideToken };
/// <summary>
/// Events that can be triggered by this topic:
Expand All @@ -81,6 +84,7 @@ public static class Topics
/// </summary>
/// <param name="channelId">ID of the channel to observe the events in</param>
/// <param name="overrideToken">Optional: An access token to override the provided token in <see cref="PubSubClient"/></param>
[Obsolete("Twitch will decommission all official PubSub topics on April 14, 2025.")]
public static Topic SubscribeEvents(long channelId, string? overrideToken = null) => new($"channel-subscribe-events-v1.{channelId}") { OverrideToken = overrideToken };
/// <summary>
/// Events that can be triggered by this topic:
Expand All @@ -92,6 +96,7 @@ public static class Topics
/// <param name="moderatorId">ID of the moderator observing the events</param>
/// <param name="channelId">ID of the channel to observe the events in</param>
/// <param name="overrideToken">Optional: An access token to override the provided token in <see cref="PubSubClient"/></param>
[Obsolete("Twitch will decommission all official PubSub topics on April 14, 2025.")]
public static Topic AutomodQueue(long moderatorId, long channelId, string? overrideToken = null) => new($"automod-queue.{moderatorId}.{channelId}") { OverrideToken = overrideToken };
/// <summary>
/// Events that can be triggered by this topic:
Expand All @@ -104,6 +109,7 @@ public static class Topics
/// <param name="moderatorId">ID of the moderator observing the events</param>
/// <param name="channelId">ID of the channel to observe the events in</param>
/// <param name="overrideToken">Optional: An access token to override the provided token in <see cref="PubSubClient"/></param>
[Obsolete("Twitch will decommission all official PubSub topics on April 14, 2025.")]
public static Topic LowTrustUsers(long moderatorId, long channelId, string? overrideToken = null) => new($"low-trust-users.{moderatorId}.{channelId}") { OverrideToken = overrideToken };
/// <summary>
/// Events that can be triggered by this topic:
Expand All @@ -115,6 +121,7 @@ public static class Topics
/// <param name="moderatorId">ID of the moderator observing the events</param>
/// <param name="channelId">ID of the channel to observe the events in</param>
/// <param name="overrideToken">Optional: An access token to override the provided token in <see cref="PubSubClient"/></param>
[Obsolete("Twitch will decommission all official PubSub topics on April 14, 2025.")]
public static Topic ModerationNotifications(long moderatorId, long channelId, string? overrideToken = null) => new($"user-moderation-notifications.{moderatorId}.{channelId}") { OverrideToken = overrideToken };
/// <summary>
/// Events that can be triggered by this topic:
Expand Down Expand Up @@ -228,6 +235,7 @@ public static class Topics
/// </summary>
/// <param name="channelId">ID of the channel to observe the events in</param>
/// <param name="overrideToken">Optional: An access token to override the provided token in <see cref="PubSubClient"/></param>
[Obsolete("Twitch will decommission all official PubSub topics on April 14, 2025.")]
public static Topic Following(long channelId, string? overrideToken = null) => new($"following.{channelId}") { OverrideToken = overrideToken };
/// <summary>
/// Events that can be triggered by this topic:
Expand Down

0 comments on commit ba931ff

Please sign in to comment.