### ExtensionBitsProduct Constructor with Parameters Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/ExtensionBitsProduct Constructs a new ExtensionBitsProduct instance with specified details. This constructor is used to create a product object with all its attributes, including SKU, cost, development status, display name, expiration, and broadcast settings. It's essential for initializing a Bits product with its complete configuration. ```java public ExtensionBitsProduct(String sku, ExtensionBitsProduct.Cost cost, Boolean isInDevelopment, String displayName, Instant expiration, Boolean isBroadcast) Creates a new `ExtensionBitsProduct` instance. Parameters: `sku` - SKU of the Bits product. This is unique across all products that belong to an Extension. `cost` - Object containing cost information. `isInDevelopment` - Indicates if the product is in development and not yet released for public use. `displayName` - Name of the product to be displayed in the Extension. `expiration` - Expiration time for the product in RFC3339 format. `isBroadcast` - Indicates if Bits product purchase events are broadcast to all instances of an Extension on a channel via the “onTransactionComplete” helper callback. ``` -------------------------------- ### Get Prediction Started At Method Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/eventsub/events/ChannelPredictionEvent Retrieves the timestamp when the Channel Points Prediction started. This method returns an Instant object. ```java public Instant getStartedAt() // The time the Channel Points Prediction started. ``` -------------------------------- ### Java Method to Get Started At Date (Deprecated) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/AnaylticsDateRange Retrieves the starting date for analytics reports. This method is deprecated in favor of getStartedAtInstant(). ```Java @Deprecated public Date getStartedAt() ``` -------------------------------- ### Initialize TwitchGraphQL Builder Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/TwitchGraphQLBuilder Provides a static method to start building a TwitchGraphQL client. This is the entry point for configuring and creating a TwitchGraphQL instance. ```java public static TwitchGraphQLBuilder builder() Initialize the builder Returns: Twitch GraphQL Builder ``` -------------------------------- ### Get Poll Start Time - Java Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/eventsub/events/ChannelPollEvent Retrieves the time when the poll started. This method is part of the ChannelPollEvent class and returns an Instant object. ```java public Instant getStartedAt() ``` -------------------------------- ### BucketUtils - Simple Bandwidth Creation Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/common/util/BucketUtils Utility methods for creating simple bandwidth configurations. ```APIDOC ## BucketUtils - Simple Bandwidth Creation ### Description Utility methods for creating simple bandwidth configurations. ### Method `simple` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **Bandwidth** (io.github.bucket4j.Bandwidth) - The created bandwidth configuration. #### Response Example ```json { "example": "Bandwidth object" } ``` ``` -------------------------------- ### TwitchGraphQL Constructor Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/TwitchGraphQL Initializes the TwitchGraphQL client with various configuration options. ```APIDOC ## TwitchGraphQL Constructor ### Description Initializes the TwitchGraphQL client with the specified base URL, user agent, event manager, client ID, default OAuth2 credential, proxy configuration, batching enabled flag, timeout, and additional headers. ### Method `TwitchGraphQL` ### Endpoint N/A (Constructor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "baseUrl": "https://api.twitch.tv/helix", "userAgent": "MyTwitchApp/1.0", "eventManager": "", "clientId": "your_client_id", "defaultToken": "", "proxyConfig": "", "batchingEnabled": true, "timeout": 10000, "additionalHeaders": { "X-Custom-Header": "Value" } } ``` ### Response N/A (Constructor) ``` -------------------------------- ### Get Stream Start Time (Instant) in Java Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/Stream Retrieves the precise UTC timestamp when the stream started. This method returns an `Instant` object, providing an accurate and standardized representation of the start time. ```java public Instant getStartedAtInstant() { // Implementation to return the stream start time as an Instant } ``` -------------------------------- ### ExtensionBitsProduct Constructor and Getters - Java Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/ExtensionBitsProduct Demonstrates the constructor and getter methods for the ExtensionBitsProduct class. These methods allow retrieval of product details such as SKU, cost, display name, and expiration. ```java public class ExtensionBitsProduct { // ... constructors ... public ExtensionBitsProduct(String sku, ExtensionBitsProduct.Cost cost, Boolean isInDevelopment, String displayName, Instant expiration, Boolean isBroadcast) { // constructor implementation } public String getSku() { // getter implementation } public ExtensionBitsProduct.Cost getCost() { // getter implementation } public String getDisplayName() { // getter implementation } public Instant getExpiration() { // getter implementation } public Boolean isInDevelopment() { // getter implementation } public Boolean isBroadcast() { // getter implementation } } ``` -------------------------------- ### Get Command Run Start Time in Nanoseconds (Java) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/command/CommandUpdateCustomRedemptionStatuses Retrieves the start time of the command execution in nanoseconds. This method is part of the HystrixInvokableInfo interface. ```java public long getCommandRunStartTimeInNanos() Specified by: `getCommandRunStartTimeInNanos` in interface `com.netflix.hystrix.HystrixInvokableInfo` ``` -------------------------------- ### Java Method to Get Started At Instant Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/AnaylticsDateRange Retrieves the starting date/time for analytics reports in RFC3339 format with zeroed time components and UTC timezone. ```Java public Instant getStartedAtInstant() ``` -------------------------------- ### TwitchClient Constructor Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/TwitchClient Details on how to construct a TwitchClient instance with various dependencies. ```APIDOC ## TwitchClient Constructor ### Description Instantiates a TwitchClient with all required services and credentials. ### Method `TwitchClient` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Constructor Parameters - **eventManager** (EventManager) - Required - The event manager instance. - **extensions** (TwitchExtensions) - Required - The TwitchExtensions instance. - **helix** (TwitchHelix) - Required - The TwitchHelix instance for REST API interactions. - **kraken** (TwitchKraken) - Required - The TwitchKraken instance (deprecated). - **messagingInterface** (TwitchMessagingInterface) - Required - The messaging interface for API communication. - **chat** (TwitchChat) - Required - The TwitchChat instance for chat interactions. - **pubsub** (TwitchPubSub) - Required - The TwitchPubSub instance for PubSub interactions. - **graphql** (TwitchGraphQL) - Required - The TwitchGraphQL instance for GraphQL API interactions. - **eventSocket** (IEventSubSocket) - Required - The EventSub socket instance. - **threadPoolExecutor** (ScheduledThreadPoolExecutor) - Required - The thread pool executor. - **credentialManager** (CredentialManager) - Required - The credential manager. - **defaultAuthToken** (OAuth2Credential) - Required - The default OAuth2 credential. ### Request Example ```java TwitchClient twitchClient = new TwitchClient( eventManager, extensions, helix, kraken, messagingInterface, chat, pubsub, graphql, eventSocket, threadPoolExecutor, credentialManager, defaultAuthToken ); ``` ### Response #### Success Response (Instance Created) - **TwitchClient** - A new instance of TwitchClient. ``` -------------------------------- ### Get Command Run Start Time in Nanoseconds (Java) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/command/CommandFetchUserSubscriptions Retrieves the start time of a command's execution in nanoseconds. This method is part of the HystrixInvokableInfo interface. ```java public long getCommandRunStartTimeInNanos() ``` -------------------------------- ### Create TwitchSingleUserEventSocketPool Instance Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/eventsub/socket/TwitchSingleUserEventSocketPool This snippet demonstrates how to create a builder for the TwitchSingleUserEventSocketPool, which is the starting point for configuring and instantiating the pool. ```java TwitchSingleUserEventSocketPool.TwitchSingleUserEventSocketPoolBuilder builder = TwitchSingleUserEventSocketPool.builder(); ``` -------------------------------- ### Get Command Run Start Time in Nanoseconds (Java) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/command/CommandCancelPrediction Returns the start time of the command execution in nanoseconds. This method is specified by the HystrixInvokableInfo interface. ```java long getCommandRunStartTimeInNanos() ``` -------------------------------- ### Build TwitchClient Instance Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/TwitchClientBuilder This method initializes the TwitchClient based on the configurations set in the TwitchClientBuilder. It returns a fully configured TwitchClient instance ready for use. ```java public TwitchClient build() { // Implementation details to construct and return a TwitchClient } ``` -------------------------------- ### CommandFetchChatHistory Constructor Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/command/CommandFetchChatHistory Initializes a new instance of the CommandFetchChatHistory class. ```APIDOC ## CommandFetchChatHistory Constructor ### Description Initializes a new instance of the CommandFetchChatHistory class. ### Method `public` ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "apolloClient": "com.apollographql.apollo.ApolloClient", "channelId": "String", "userId": "String", "after": "String (Optional)" } ``` ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Get Scheduled Segment Start Time (Java) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/ScheduledSegment This method retrieves the scheduled start time of a broadcast in RFC3339 format. This is crucial for scheduling and display purposes. ```java public Instant getStartTime() Scheduled start time for the scheduled broadcast in RFC3339 format. ``` -------------------------------- ### TwitchClientBuilder Initialization and Build Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/TwitchClientBuilder Methods for initializing the builder and constructing the TwitchClient instance. ```APIDOC ## TwitchClientBuilder Initialization and Build Methods ### Description Methods to create a builder instance and to finalize the TwitchClient construction. ### Methods #### `builder()` Initializes and returns a new `TwitchClientBuilder` instance. - **Returns** - `TwitchClientBuilder` - A new builder instance. #### `build()` Initializes and returns a fully configured `TwitchClient`. - **Returns** - `TwitchClient` - The initialized Twitch client. ### Request Example ```java TwitchClient twitchClient = TwitchClientBuilder.builder().build(); ``` ### Response Example ```java // Returns a TwitchClient instance ``` ``` -------------------------------- ### Get Start Index of Flagged Region Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/chat/flag/AutoModFlag Retrieves the starting index within the chat message where the AutoMod-flagged region begins. This method is part of the AutoModFlag class. ```java int startIndex = autoModFlag.getStartIndex(); ``` -------------------------------- ### Initialize TwitchClientBuilder Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/TwitchClientBuilder This method initializes and returns a new instance of the TwitchClientBuilder. It is the starting point for configuring and building a TwitchClient. ```java public static TwitchClientBuilder builder() { // Implementation details to create and return a new builder instance } ``` -------------------------------- ### getCommandRunStartTimeInNanos Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/command/CommandDeleteChannelPermittedTerm Gets the start time of the command execution in nanoseconds. ```APIDOC ## getCommandRunStartTimeInNanos ### Description Gets the start time of the command execution in nanoseconds. ### Method N/A (Method within an interface) ### Endpoint N/A (Javadoc documentation) ### Parameters None ### Request Example N/A ### Response #### Success Response - **long** - The command run start time in nanoseconds. ``` -------------------------------- ### Get Poll Started At Timestamp - Twitch4J Java Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/Poll Retrieves the UTC timestamp indicating when the poll started. This method is part of the Poll class and returns an Instant object. ```Java public Instant getStartedAt() UTC timestamp for the poll’s start time. ``` -------------------------------- ### Initialize TwitchClientBuilder Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/TwitchClientBuilder Static method to create a new instance of TwitchClientBuilder. This is the starting point for configuring a Twitch client. ```java public static TwitchClientBuilder builder() Initialize the builder Returns: Twitch Client Builder ``` -------------------------------- ### Get Command Run Start Time (Java) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/command/CommandFollowUser Retrieves the start time of a command execution in nanoseconds. This method is part of the HystrixInvokableInfo interface, used for monitoring and managing Hystrix commands. ```java public long getCommandRunStartTimeInNanos(); ``` -------------------------------- ### Initialize KrakenChannel Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/kraken/domain/KrakenChannel Demonstrates the constructor for the KrakenChannel class. Note that this constructor is deprecated. ```java public KrakenChannel() Deprecated. ``` -------------------------------- ### ExtensionBitsProduct Constructors Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/ExtensionBitsProduct Provides details on how to instantiate ExtensionBitsProduct objects, both with default values and with specific product attributes. ```APIDOC ## ExtensionBitsProduct Constructors ### public ExtensionBitsProduct() Default constructor for ExtensionBitsProduct. ### public ExtensionBitsProduct(String sku, ExtensionBitsProduct.Cost cost, Boolean isInDevelopment, String displayName, Instant expiration, Boolean isBroadcast) Creates a new `ExtensionBitsProduct` instance. #### Parameters - **sku** (String) - Required - SKU of the Bits product. This is unique across all products that belong to an Extension. - **cost** (ExtensionBitsProduct.Cost) - Required - Object containing cost information. - **isInDevelopment** (Boolean) - Required - Indicates if the product is in development and not yet released for public use. - **displayName** (String) - Required - Name of the product to be displayed in the Extension. - **expiration** (Instant) - Required - Expiration time for the product in RFC3339 format. - **isBroadcast** (Boolean) - Required - Indicates if Bits product purchase events are broadcast to all instances of an Extension on a channel via the “onTransactionComplete” helper callback. ``` -------------------------------- ### Get Command Run Start Time in Nanoseconds (Java) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/command/CommandAddChannelBlockedTerm Retrieves the start time of a Hystrix command execution in nanoseconds. This method is specified by the HystrixInvokableInfo interface and is useful for precise timing. ```java public long getCommandRunStartTimeInNanos() ``` -------------------------------- ### Get Command Run Start Time in Nanoseconds (Java) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/command/CommandArchivePoll Retrieves the start time of the command execution in nanoseconds. This method is specified by the HystrixInvokableInfo interface. It returns a long value representing the time. ```java public long getCommandRunStartTimeInNanos() Specified by: getCommandRunStartTimeInNanos in interface com.netflix.hystrix.HystrixInvokableInfo ``` -------------------------------- ### Channel Class Constructors Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/extensions/domain/Channel Provides details on how to instantiate a Channel object. ```APIDOC ## Channel Class Constructors ### Channel() Creates a new `Channel` instance with default values. ### Channel(String id, String username, String game, String title, Long viewCount) Deprecated. No migration path in the new Helix API. Creates a new `Channel` instance. #### Parameters - **id** (String) - Required - User id of the channel owner. - **username** (String) - Required - Display name of the channel owner. - **game** (String) - Required - Game Id. - **title** (String) - Required - Stream title. - **viewCount** (Long) - Required - Stream view count. ``` -------------------------------- ### Get Start Time of Vacation - Java Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/ScheduledVacation Retrieves the start time of the scheduled vacation. The time is returned as an Instant object, specified in RFC3339 format. This method is crucial for determining when a vacation period begins. ```java public Instant getStartTime() ``` -------------------------------- ### TwitchClientPool Constructor Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/TwitchClientPool Initializes a new TwitchClientPool instance with various Twitch service dependencies. ```APIDOC ## TwitchClientPool Constructor ### Description Initializes a new TwitchClientPool instance with various Twitch service dependencies. ### Method CONSTRUCTOR ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "Constructor arguments" } ``` ### Response #### Success Response (200) None #### Response Example ```json { "example": "Instance of TwitchClientPool" } ``` ``` -------------------------------- ### Initialize TwitchClientPoolBuilder Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/TwitchClientPoolBuilder This method initializes and returns a new instance of the TwitchClientPoolBuilder. It's the starting point for configuring a Twitch client pool. No specific dependencies are required beyond the library itself. ```java TwitchClientPoolBuilder.builder() ``` -------------------------------- ### Get Command Run Start Time in Nanoseconds (Java) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/command/BaseCommand Retrieves the start time of a command execution in nanoseconds. This method is part of the HystrixInvokableInfo interface, indicating it's related to Hystrix command invocation details. ```java long getCommandRunStartTimeInNanos(); ``` -------------------------------- ### TwitchAuth Constructor Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/auth/TwitchAuth Initializes the TwitchAuth provider with necessary credentials and URLs. ```APIDOC ## TwitchAuth Constructor ### Description Initializes the TwitchAuth provider with the provided CredentialManager, client ID, client secret, and redirect URL. ### Method `TwitchAuth(CredentialManager credentialManager, String clientId, String clientSecret, String redirectUrl)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "credentialManager": "com.github.philippheuer.credentialmanager.CredentialManager", "clientId": "your_client_id", "clientSecret": "your_client_secret", "redirectUrl": "http://localhost:8080/callback" } ``` ### Response #### Success Response (N/A - Constructor) #### Response Example N/A ``` -------------------------------- ### ShoutoutReceiveEvent Get Started At Method Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/eventsub/events/ShoutoutReceiveEvent Returns the UTC timestamp indicating when the moderator initiated the shoutout. This method returns an Instant object. ```java public Instant getStartedAt() The UTC timestamp of when the moderator sent the Shoutout. ``` -------------------------------- ### BaseCommand Instance Methods Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/command/CommandFetchUserEmoteSets Details on instance methods available within the BaseCommand class, including methods for exception handling, cache management, and Hystrix command execution. ```APIDOC ## BaseCommand Instance Methods ### Description Provides details on various instance methods within the BaseCommand class, covering aspects like exception decomposition, cache key retrieval, Hystrix command group and key access, execution metrics, and observable streams. ### Method - `protected Throwable decomposeException(Exception arg0)` - `protected String getCacheKey()` - `com.netflix.hystrix.HystrixCommandGroupKey getCommandGroup()` - `com.netflix.hystrix.HystrixCommandKey getCommandKey()` - `long getCommandRunStartTimeInNanos()` - `com.netflix.hystrix.ExecutionResult.EventCounts getEventCounts()` - `protected Exception getExceptionFromThrowable(Throwable arg0)` - `List getExecutionEvents()` - `Throwable getExecutionException()` - `protected com.netflix.hystrix.AbstractCommand.TryableSemaphore getExecutionSemaphore()` - `int getExecutionTimeInMilliseconds()` - `Throwable getFailedExecutionException()` - `protected com.netflix.hystrix.AbstractCommand.TryableSemaphore getFallbackSemaphore()` - `protected com.apollographql.apollo.ApolloCall getGraphQLCall()` - `protected String getLogMessagePrefix()` - `com.netflix.hystrix.HystrixCommandMetrics getMetrics()` - `int getNumberCollapsed()` - `int getNumberEmissions()` - `int getNumberFallbackEmissions()` - `com.netflix.hystrix.HystrixCollapserKey getOriginatingCollapserKey()` - `com.netflix.hystrix.HystrixCommandProperties getProperties()` - `String getPublicCacheKey()` - `com.netflix.hystrix.HystrixThreadPoolKey getThreadPoolKey()` - `protected void handleThreadEnd(com.netflix.hystrix.AbstractCommand arg0)` - `boolean isCircuitBreakerOpen()` - `boolean isExecutedInThread()` - `boolean isExecutionComplete()` - `boolean isFailedExecution()` - `protected boolean isRequestCachingEnabled()` - `boolean isResponseFromCache()` - `boolean isResponseFromFallback()` - `boolean isResponseRejected()` - `boolean isResponseSemaphoreRejected()` - `boolean isResponseShortCircuited()` - `boolean isResponseThreadPoolRejected()` - `boolean isResponseTimedOut()` - `boolean isSuccessfulExecution()` - `rx.Observable observe()` - `protected boolean shouldNotBeWrapped(Throwable arg0)` - `protected boolean shouldOutputOnNextEvents()` - `rx.Observable toObservable()` ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ### Response Example N/A ``` -------------------------------- ### Configure Command Trigger - Java Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/TwitchClientPoolBuilder Sets the character that triggers commands in chat. For example, using '!' as the trigger would mean commands must start with '!'. ```Java TwitchClientPoolBuilder withCommandTrigger(String commandTrigger); ``` -------------------------------- ### GET /extensions/live_channels Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/extensions/TwitchExtensions Retrieves a paginated list of live channels that have a specified extension installed and activated. There are two versions of this endpoint, one with and one without a cursor for pagination. ```APIDOC ## GET /extensions/live_channels ### Description Returns one page of live channels that have installed and activated a specified extension. A channel that just went live may take a few minutes to appear in this list, and a channel may continue to appear on this list for a few minutes after it stops broadcasting. ### Method GET ### Endpoint /extensions/live_channels ### Parameters #### Query Parameters - **clientId** (String) - Required - The client ID value assigned to the extension when it is created. - **cursor** (String) - Optional - Cursor for forward pagination. ### Response #### Success Response (200) - **ChannelList** (Object) - A list of channels. #### Response Example { "example": "ChannelList object" } ``` ```APIDOC ## GET /extensions/live_channels (Deprecated) ### Description Returns one page of live channels that have installed and activated a specified extension. This is a deprecated endpoint and recommends using the version with a cursor. ### Method GET ### Endpoint /extensions/live_channels ### Parameters #### Query Parameters - **clientId** (String) - Required - The client ID value assigned to the extension when it is created. ### Response #### Success Response (200) - **ChannelList** (Object) - A list of channels. #### Response Example { "example": "ChannelList object" } ``` -------------------------------- ### TwitchGraphQL Constructor Java Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/TwitchGraphQL Initializes the TwitchGraphQL client with various configuration options including base URL, user agent, event manager, client ID, default token, proxy settings, batching, timeout, and additional headers. ```java public TwitchGraphQL(String baseUrl, String userAgent, com.github.philippheuer.events4j.core.EventManager eventManager, String clientId, com.github.philippheuer.credentialmanager.domain.OAuth2Credential defaultToken, ProxyConfig proxyConfig, boolean batchingEnabled, Integer timeout, Map additionalHeaders) ``` -------------------------------- ### Create ExtensionConfigurationSegmentInput Instance Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/ExtensionConfigurationSegmentInput Demonstrates creating a new ExtensionConfigurationSegmentInput instance using its constructor. This constructor takes parameters for extension ID, segment type, broadcaster ID, content, and version, all of which are crucial for defining extension configurations. ```java public ExtensionConfigurationSegmentInput(String extensionId, ExtensionSegment segment, @Nullable @Nullable String broadcasterId, @Nullable @Nullable String content, @Nullable @Nullable String version) ``` -------------------------------- ### Get HypeTrainConfig Difficulty Settings (Java) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/pubsub/domain/HypeTrainConfig.DifficultySettings Provides examples of deprecated getter methods for HypeTrainConfig.DifficultySettings.DifficultySetting. These methods retrieve the goal, rewards, and value associated with a difficulty setting in Twitch4J. ```java public Integer getValue() Deprecated. public Integer getGoal() Deprecated. public List getRewards() Deprecated. ``` -------------------------------- ### Constructor for CommandFetchUserSubscriptions (Java) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/command/CommandFetchUserSubscriptions Initializes a new instance of the CommandFetchUserSubscriptions class. It requires an ApolloClient, a user ID, and optional parameters for pagination (first and after). ```java public CommandFetchUserSubscriptions(com.apollographql.apollo.ApolloClient apolloClient, @NonNull String userId, @Nullable Integer first, @Nullable String after) ``` -------------------------------- ### Get Scheduled Segment End Time (Java) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/ScheduledSegment This method retrieves the scheduled end time of a broadcast in RFC3339 format. It complements the start time for defining the broadcast duration. ```java public Instant getEndTime() Scheduled end time for the scheduled broadcast in RFC3339 format. ``` -------------------------------- ### Get Active Timestamp (Java) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/ExtensionSecret Retrieves the earliest possible time (in RFC 3339 format) at which this secret is valid for signing a JWT. This indicates the start of the secret's validity period. ```java public Instant getActiveAt() ``` -------------------------------- ### ExtensionBitsProduct Builder Method Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/ExtensionBitsProduct Provides a builder instance for creating ExtensionBitsProduct objects. The builder pattern simplifies the creation of complex objects by allowing step-by-step construction. This method is the entry point for using the builder to configure and create an ExtensionBitsProduct. ```java public static ExtensionBitsProduct.ExtensionBitsProductBuilder builder() ``` -------------------------------- ### TwitchKrakenBuilder Initialization Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/kraken/TwitchKrakenBuilder Methods for initializing and building a TwitchKraken client. ```APIDOC ## TwitchKrakenBuilder Initialization ### Description Methods for initializing and building a TwitchKraken client. Note that all methods are deprecated. ### Method Factory method ### Endpoint N/A ### Parameters None ### Request Example None ### Response #### Success Response - **TwitchKrakenBuilder** (object) - A builder instance. #### Response Example ```java TwitchKrakenBuilder builder = TwitchKrakenBuilder.builder(); ``` --- ## build ### Description Builds the Twitch API client (Kraken). ### Method Deprecated ### Endpoint N/A ### Parameters None ### Request Example None ### Response #### Success Response - **TwitchKraken** (object) - The constructed Twitch API client. #### Response Example ```java TwitchKraken krakenClient = TwitchKrakenBuilder.builder().build(); ``` ``` -------------------------------- ### Get Stream Uptime in Java Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/Stream Retrieves the duration of the stream based on its start date. This method is part of the Stream class and returns a `Duration` object representing the stream's uptime. ```java public Duration getUptime() { // Implementation to calculate and return stream uptime } ``` -------------------------------- ### Get User View Count Source: https://twitch4j.github.io/javadoc/deprecated-list Retrieves the view count for a user. This field will contain stale data starting April 15, 2022, and will eventually be deprecated due to Twitch changes. ```java com.github.twitch4j.helix.domain.User.getViewCount() ``` -------------------------------- ### Constructor for CommandFetchVideoComments Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/graphql/command/CommandFetchVideoComments Initializes a new instance of the CommandFetchVideoComments class. It requires an ApolloClient, channel ID, video ID, and optional pagination parameters. ```java public CommandFetchVideoComments(com.apollographql.apollo.ApolloClient apolloClient, String channelId, String videoId, String id, String after, String before, Integer first, Integer last) ``` -------------------------------- ### ExtensionLiveChannelsList Constructor and Methods Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/ExtensionLiveChannelsList This section covers the constructor and key instance methods of the ExtensionLiveChannelsList class, providing details on how to access live channel information and pagination cursors. ```APIDOC ## ExtensionLiveChannelsList ### Description Represents a paginated list of live channels associated with a specific Twitch Extension. ### Method `ExtensionLiveChannelsList()` ### Endpoint N/A (This is a class documentation, not an API endpoint) ### Parameters None ### Request Example ```json { "example": "N/A - Class constructor" } ``` ### Response #### Success Response (200) N/A (This is class documentation) #### Response Example ```json { "example": "N/A - Class documentation" } ``` ## Method Details ### getChannels ### Description Retrieves a list of live channels that have installed or activated a specific Extension. ### Method `public List getChannels()` ### Endpoint N/A ### Parameters None ### Request Example ```json { "example": "N/A" } ``` ### Response #### Success Response (200) - **channels** (List) - A list of live channels. #### Response Example ```json { "channels": [ { "id": "12345", "broadcaster_name": "example_broadcaster", "broadcaster_login": "examplelogin", "game_id": "67890", "game_name": "Example Game", "type": "live", "title": "Example Stream Title", "viewer_count": 1000, "started_at": "2023-10-27T10:00:00Z", "language": "en", "thumbnail_url": "https://example.com/thumbnail.jpg", "tag_ids": [], "tags": [], "is_mature": false } ] } ``` ### getCursor ### Description Retrieves the cursor for pagination, used to fetch the next page of results. ### Method `public Optional getCursor()` ### Endpoint N/A ### Parameters None ### Request Example ```json { "example": "N/A" } ``` ### Response #### Success Response (200) - **cursor** (Optional) - The cursor for the next page of results, if available. #### Response Example ```json { "cursor": "some_pagination_token" } ``` ### equals ### Description Compares this ExtensionLiveChannelsList object to another object for equality. ### Method `public boolean equals(Object o)` ### Endpoint N/A ### Parameters - **o** (Object) - The object to compare with. ### Request Example ```json { "example": "N/A" } ``` ### Response #### Success Response (200) - **equals** (boolean) - True if the objects are equal, false otherwise. #### Response Example ```json { "equals": true } ``` ### canEqual ### Description Indicates whether some other object can be a subtype of this one. ### Method `protected boolean canEqual(Object other)` ### Endpoint N/A ### Parameters - **other** (Object) - The object to check. ### Request Example ```json { "example": "N/A" } ``` ### Response #### Success Response (200) - **canEqual** (boolean) - True if the other object can be a subtype, false otherwise. #### Response Example ```json { "canEqual": true } ``` ### hashCode ### Description Returns a hash code value for the object. ### Method `public int hashCode()` ### Endpoint N/A ### Parameters None ### Request Example ```json { "example": "N/A" } ``` ### Response #### Success Response (200) - **hashCode** (int) - A hash code value for this object. #### Response Example ```json { "hashCode": 123456789 } ``` ### toString ### Description Returns a string representation of the object. ### Method `public String toString()` ### Endpoint N/A ### Parameters None ### Request Example ```json { "example": "N/A" } ``` ### Response #### Success Response (200) - **toString** (String) - A string representation of the object. #### Response Example ```json { "toString": "ExtensionLiveChannelsList[channels=[...], cursor=Optional[some_pagination_token]]" } ``` ``` -------------------------------- ### Get VOD Offset - Java Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/Clip Returns the zero-based offset, in seconds, indicating where the clip starts within the original video (VOD) or stream. This helps pinpoint the clip's location in the source. ```java public Integer getVodOffset() The zero-based offset, in seconds, to where the clip starts in the video (VOD) or stream. ``` -------------------------------- ### Get Live Channels List - Java Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/ExtensionLiveChannelsList Retrieves a list of live channels that have installed or activated a specific Twitch extension. This method returns a List of ExtensionLiveChannel objects, representing one page of results. ```java public List getChannels() ``` -------------------------------- ### Create Simple Bandwidth - Java Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/common/util/BucketUtils Defines a basic bandwidth configuration with a specified capacity and refill period. This is a convenient way to set up simple rate limits. ```java import io.github.bucket4j.Bandwidth; import java.time.Duration; // Create bandwidth with capacity 100 tokens, refilling every minute Bandwidth bandwidth = BucketUtils.simple(100, Duration.ofMinutes(1)); // Create bandwidth with capacity 50 tokens, refilling every 30 seconds, with an ID Bandwidth namedBandwidth = BucketUtils.simple(50, Duration.ofSeconds(30), "api-limit-1"); ``` -------------------------------- ### CreatorGoal Class Overview Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/CreatorGoal This section provides an overview of the CreatorGoal class, including its constructors and instance methods. ```APIDOC ## CreatorGoal Class ### Description Represents a creator goal within the Twitch platform. This class provides methods to access various details about a specific goal set by a broadcaster. ### Constructor Summary * **CreatorGoal()**: Default constructor for the CreatorGoal class. ### Method Summary All Methods | Instance Methods | Concrete Methods -- | -- | -- Modifier and Type | Method | Description `protected boolean` | `canEqual(Object other)` | Determines if another object can be equal to this one. `boolean` | `equals(Object o)` | Compares this CreatorGoal object with another object for equality. `String` | `getBroadcasterId()` | Returns the ID that uniquely identifies the broadcaster. `String` | `getBroadcasterLogin()` | Returns the broadcaster’s user handle. `String` | `getBroadcasterName()` | Returns the broadcaster’s display name. `Instant` | `getCreatedAt()` | Returns the UTC timestamp in RFC 3339 format indicating when the broadcaster created the goal. `Integer` | `getCurrentAmount()` | Returns the current value of the goal. `String` | `getDescription()` | Returns a description of the goal, if specified. `String` | `getId()` | Returns the ID that uniquely identifies this goal. `Integer` | `getTargetAmount()` | Returns the goal’s target value. `GoalType` | `getType()` | Returns the type of goal. `int` | `hashCode()` | Computes the hash code for this CreatorGoal object. `String` | `toString()` | Returns a string representation of the CreatorGoal object. ### Methods inherited from class java.lang.Object `clone, finalize, getClass, notify, notifyAll, wait, wait, wait` ``` -------------------------------- ### Java: Get Live Channels with Extension Activated (Deprecated) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/extensions/TwitchExtensions Returns a page of live channels that have a specific extension installed and activated. This method can be called with or without a cursor for pagination. It requires the extension's client ID. This functionality is deprecated and users should migrate to the Helix API. ```java default com.netflix.hystrix.HystrixCommand getLiveChannelsWithExtensionActivated(String clientId) ``` ```java com.netflix.hystrix.HystrixCommand getLiveChannelsWithExtensionActivated(String clientId, String cursor) ``` -------------------------------- ### TwitchExtensionsClientIdInterceptor Constructor Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/extensions/util/TwitchExtensionsClientIdInterceptor Initializes the TwitchExtensionsClientIdInterceptor with a TwitchExtensionsBuilder. ```APIDOC ## TwitchExtensionsClientIdInterceptor Constructor ### Description Initializes the TwitchExtensionsClientIdInterceptor with a TwitchExtensionsBuilder. ### Method `TwitchExtensionsClientIdInterceptor` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java TwitchExtensionsBuilder builder = new TwitchExtensionsBuilder(); TwitchExtensionsClientIdInterceptor interceptor = new TwitchExtensionsClientIdInterceptor(builder); ``` ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Get Live Channels with Extension Activated - Java Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/extensions/compat/TwitchExtensionsCompatibilityLayer Returns a paginated list of live Twitch channels that have a specific extension installed and activated. Channels may take a few minutes to appear after going live and may remain listed for a few minutes after going offline. ```java public com.netflix.hystrix.HystrixCommand getLiveChannelsWithExtensionActivated(String clientId, String cursor) ``` -------------------------------- ### Get Live Channels with Extension Activated (Java) - With Cursor Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/extensions/TwitchExtensions Retrieves a paginated list of live channels that have a specific extension installed and activated. It uses a client ID and an optional cursor for pagination. Note that there might be a delay in channels appearing or disappearing from the list after their live status changes. ```Java com.netflix.hystrix.HystrixCommand getLiveChannelsWithExtensionActivated(String clientId, String cursor) ``` -------------------------------- ### TwitchIdentityProvider Constructors Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/auth/providers/TwitchIdentityProvider Constructors for initializing the TwitchIdentityProvider. ```APIDOC ## TwitchIdentityProvider Constructors ### TwitchIdentityProvider(String clientId, String clientSecret, String redirectUrl) **Description**: Constructor for TwitchIdentityProvider. **Parameters**: - `clientId` (String) - Required - OAuth Client Id - `clientSecret` (String) - Required - OAuth Client Secret - `redirectUrl` (String) - Required - Redirect Url ### TwitchIdentityProvider(String clientId, String clientSecret, String redirectUrl, String baseUrl) **Description**: Constructor for TwitchIdentityProvider with a custom base URL. **Parameters**: - `clientId` (String) - Required - OAuth Client Id - `clientSecret` (String) - Required - OAuth Client Secret - `redirectUrl` (String) - Required - Redirect Url - `baseUrl` (String) - Optional - Custom base URL for Twitch API requests. ``` -------------------------------- ### Build TwitchClient Instance Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/TwitchClientBuilder Method to construct and initialize the TwitchClient based on the configured builder settings. Returns the fully initialized TwitchClient. ```java public TwitchClient build() Initialize Returns: `TwitchClient` initialized class ``` -------------------------------- ### Get Live Channels with Extension Activated (Java) - No Cursor Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/extensions/TwitchExtensions Retrieves a list of live channels that have a specific extension installed and activated, without explicit pagination. This method is a convenience wrapper for the cursor-based version and can accept a null cursor. Similar to the cursor-based method, there can be a slight delay in list updates. ```Java com.netflix.hystrix.HystrixCommand getLiveChannelsWithExtensionActivated(String clientId) ``` -------------------------------- ### Charity Campaign Stop Subscription Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/eventsub/subscriptions/CharityCampaignStopType This endpoint allows you to subscribe to notifications when a Twitch broadcaster stops a charity campaign. It requires the 'channel:read:charity' scope. Note that the event data does not include charity details; for that information, subscribe to the Start event or use the Get Charity Campaign endpoint. ```APIDOC ## POST /eventsub/subscriptions ### Description Subscribes to notifications when a broadcaster stops a charity campaign. ### Method POST ### Endpoint /eventsub/subscriptions ### Parameters #### Query Parameters - **'token'** (string) - Required - Your OAuth token with the 'channel:read:charity' scope. - **' wanita_id'** (string) - Required - The ID of the broadcaster. #### Request Body ```json { "type": "channel.charity_campaign.stop", "version": "1", "condition": { "broadcaster_user_id": "{broadcaster_id}" }, "transport": { "method": "webhook", "callback": "{your_callback_url}" } } ``` ### Request Example ```json { "type": "channel.charity_campaign.stop", "version": "1", "condition": { "broadcaster_user_id": "12345" }, "transport": { "method": "webhook", "callback": "https://example.com/twitch/events" } } ``` ### Response #### Success Response (200) - **data** (array) - An array of subscription objects. - **id** (string) - The ID of the subscription. - **status** (string) - The status of the subscription. - **type** (string) - The type of the subscription. - **version** (string) - The version of the subscription type. - **condition** (object) - The condition object for the subscription. - **transport** (object) - The transport object for the subscription. - **created_at** (string) - The timestamp when the subscription was created. #### Response Example ```json { "data": [ { "id": "abcdef12-3456-7890-abcd-ef1234567890", "status": "enabled", "type": "channel.charity_campaign.stop", "version": "1", "condition": { "broadcaster_user_id": "12345" }, "transport": { "method": "webhook", "callback": "https://example.com/twitch/events" }, "created_at": "2023-01-01T12:00:00Z" } ] } ``` ``` -------------------------------- ### TwitchChat Builder and Core Methods Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/chat/TwitchChatBuilder This section covers the methods for building and initializing a TwitchChat client, as well as retrieving core client information and managers. ```APIDOC ## Method Details ### builder public static TwitchChatBuilder builder() Initialize the builder Returns: Twitch Chat Builder ### build public TwitchChat build() Twitch API Client (Helix) Returns: TwitchHelix ### getWebsocketConnection public WebsocketConnection getWebsocketConnection() WebsocketConnection can be used to inject a mocked connection into the TwitchChat instance ### getClientId public String getClientId() Client Id ### getClientSecret public String getClientSecret() Client Secret ### getRequestQueueSize public Integer getRequestQueueSize() HTTP Request Queue Size ### getEventManager public com.github.philippheuer.events4j.core.EventManager getEventManager() Event Manager ### getDefaultEventHandler public Class getDefaultEventHandler() Event Manager ### getCredentialManager public com.github.philippheuer.credentialmanager.CredentialManager getCredentialManager() Credential Manager ### getChatAccount public com.github.philippheuer.credentialmanager.domain.OAuth2Credential getChatAccount() IRC User Id ### getBaseUrl public String getBaseUrl() A custom websocket url for `TwitchChat` to connect to. Must include the scheme (e.g. ws:// or wss://). ### isSendCredentialToThirdPartyHost public boolean isSendCredentialToThirdPartyHost() Whether the `OAuth2Credential` password should be sent when the baseUrl does not match the official twitch websocket server, thus bypassing a security check in the library. Do not depart from the default false value unless you understand the consequences. ``` -------------------------------- ### Set Poll Start Time (Java) Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/Poll Sets the UTC timestamp for when the poll started. The method returns a clone of the Poll object with the specified start time. ```java public Poll withStartedAt(Instant startedAt) ``` -------------------------------- ### Java: BanUsersList Constructor Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/helix/domain/BanUsersList Initializes a new instance of the BanUsersList class. This constructor does not take any arguments and sets up the default state for the list. ```java public BanUsersList() ``` -------------------------------- ### GET /clips/{slug} Source: https://twitch4j.github.io/javadoc/com/github/twitch4j/kraken/TwitchKraken Gets details about a specified clip. ```APIDOC ## GET /clips/{slug} ### Description Gets details about a specified clip. ### Method GET ### Endpoint /clips/{slug} ### Parameters #### Path Parameters - **slug** (string) - Required - The globally unique string to reference the clip. ### Response #### Success Response (200) - **clip** (KrakenClip) - Details about the clip. ### Response Example ```json { "id": "clip_id", "slug": "example_slug", "url": "clip_url", "embedUrl": "embed_url", "broadcaster": { "id": "broadcaster_id", "name": "broadcaster_name" }, "creator": { "id": "creator_id", "name": "creator_name" }, "videoId": "video_id", "game": "game_name", "language": "en", "title": "clip_title", "createdAt": "timestamp", "thumbnails": { "small": "url_small", "medium": "url_medium", "large": "url_large", "template": "url_template" }, "viewCount": 100, "duration": 30 } ``` ```