Twitch4J Javadoc

website·Indexed 29 days ago

https://twitch4j.github.io/

Java documentation for the Twitch4J library, featuring API references for the Helix and GraphQL packages, including domain classes such as Game, StreamSchedule, and ExtensionTransaction.

Tokens
536.7K
Snippets
3K
Records
4.5K
Agent score
70%

What's inside Twitch4J

  1. Overview of IClientHelper interface

    The IClientHelper interface in the com.github.twitch4j package provides helper functionality for the Twitch4J client. It extends java.lang.AutoCloseable, meaning implementations can be used within try-with-resources blocks to ensure proper resource cleanup. The primary implementing class is TwitchClientHelper.
    public interface IClientHelper extends AutoCloseable {
        // Implementation details provided by TwitchClientHelper
    }
  2. Overview of com.github.twitch4j.common.events.domain package

    The com.github.twitch4j.common.events.domain package provides the base domain classes for events in the Twitch4J library. It defines core event entities such as EventChannel and EventUser which are used across various event-related packages like com.github.twitch4j.common.events.channel and com.github.twitch4j.common.events.user.
  3. Overview of com.github.twitch4j.modules package hierarchy

    The com.github.twitch4j.modules package provides the core infrastructure for module management in Twitch4J. Key classes include Configuration for module settings, IModule as the base interface for modules, ModuleLoader for loading modules, and ModulePair for associating modules. Error handling for module operations is managed via ModuleException, which extends RuntimeException.
  4. Overview of com.github.twitch4j.eventsub.domain classes

    The com.github.twitch4j.eventsub.domain package contains the domain models used for Twitch EventSub. Key classes include:

    • Reward & Redemption: Reward, AutomaticReward, RedemptionStatus
    • Predictions & Polls: PredictionOutcome, Predictor, PollChoice, PollStatus, PredictionStatus
    • Moderation & Automod: Automod, BlockedTerm, BlockedTermWrapper, AutomodCategory, AutomodCaughtReason, AutomodMessageStatus
    • Chat & Messaging: Message, AugmentedMessage (extends com.github.twitch4j.eventsub.domain.chat.Message), Whisper, SimpleEmote
    • Stream & User Interaction: Contribution, GoalType, StreamType, SharedChatParticipant
  5. Overview of the com.github.twitch4j.helix package hierarchy

    The com.github.twitch4j.helix package provides the core components for interacting with the Twitch Helix API. Key components include the TwitchHelix interface for API interactions, the TwitchHelixBuilder for initializing the client, and the TwitchHelixErrorDecoder for handling API errors (which implements feign.codec.ErrorDecoder).
  6. Overview of com.github.twitch4j.eventsub.domain enums

    The com.github.twitch4j.eventsub.domain package provides several enumeration types to categorize EventSub data:

    • Moderation: AutomodCategory, AutomodCaughtReason, AutomodMessageStatus, EvasionEvaluation, SuspiciousStatus, SuspiciousType, TermUpdateType
    • Predictions/Polls: PredictionColor, PredictionStatus, PollStatus
    • Rewards/Contributions: AutomaticReward.Type, Contribution.Type, RedemptionStatus
    • General: ContentClassification, GoalType, StreamType, UnbanRequestStatus
  7. Overview of EventSub Conduits

    Conduits are a wrapper transport type for server-side applications that simplify forwarding EventSub notifications. They utilize app access tokens and consist of shards (webhooks or websockets). Twitch handles load balancing by deciding which shard receives a notification; if a shard fails, Twitch retries with another.

    Key constraints and behaviors:

    • Limits: Maximum 5 enabled conduits per client, with up to 20,000 shards per conduit.
    • Resilience: If a shard fails, only that shard is disabled. A conduit is only deleted by Twitch if all shards remain disabled for 72 hours.
    • Reliability: Avoid having more than one disabled websocket shard at a time to prevent dropped notifications.
    • Cost: The subscription cost model is identical to standard webhooks (default max_total_cost is 10,000).