Class TwitchHelixBuilder

java.lang.Object
com.github.twitch4j.helix.TwitchHelixBuilder

public class TwitchHelixBuilder extends Object
Twitch API - Helix
  • Field Details

    • OFFICIAL_BASE_URL

      public static final String OFFICIAL_BASE_URL
      The official base URL used by production Twitch Helix API servers.
      See Also:
    • MOCK_BASE_URL

      public static final String MOCK_BASE_URL
      The default URL used by the Mock API server generated by the Twitch CLI.
      See Also:
    • DEFAULT_BANDWIDTH

      public static final io.github.bucket4j.Bandwidth DEFAULT_BANDWIDTH
      See Also:
  • Method Details

    • builder

      public static TwitchHelixBuilder builder()
      Initialize the builder
      Returns:
      Twitch Helix Builder
    • build

      public TwitchHelix build()
      Twitch API Client (Helix)
      Returns:
      TwitchHelix
    • getClientId

      public String getClientId()
      Client Id
    • getClientSecret

      public String getClientSecret()
      Client Secret
    • getRedirectUrl

      public String getRedirectUrl()
      Redirect Url
    • getCredentialManager

      public com.github.philippheuer.credentialmanager.CredentialManager getCredentialManager()
      Credential Manager
    • getUserAgent

      public String getUserAgent()
      User Agent
    • getDefaultAuthToken

      public com.github.philippheuer.credentialmanager.domain.OAuth2Credential getDefaultAuthToken()
      Default Auth Token for API Requests
    • getRequestQueueSize

      public Integer getRequestQueueSize()
      HTTP Request Queue Size
    • getBaseUrl

      public String getBaseUrl()
      BaseUrl
    • getTimeout

      public Integer getTimeout()
      Default Timeout
    • getLogLevel

      public feign.Logger.Level getLogLevel()
      you can overwrite the feign loglevel to print the full requests + responses if needed
    • getProxyConfig

      public ProxyConfig getProxyConfig()
      Proxy Configuration
    • getScheduledThreadPoolExecutor

      public ScheduledThreadPoolExecutor getScheduledThreadPoolExecutor()
      Scheduler Thread Pool Executor
    • getApiRateLimit

      public io.github.bucket4j.Bandwidth getApiRateLimit()
      Custom Rate Limit to use for Helix calls
    • withClientId

      public TwitchHelixBuilder withClientId(String clientId)
      Client Id
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withClientSecret

      public TwitchHelixBuilder withClientSecret(String clientSecret)
      Client Secret
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withRedirectUrl

      public TwitchHelixBuilder withRedirectUrl(String redirectUrl)
      Redirect Url
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withCredentialManager

      public TwitchHelixBuilder withCredentialManager(com.github.philippheuer.credentialmanager.CredentialManager credentialManager)
      Credential Manager
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withUserAgent

      public TwitchHelixBuilder withUserAgent(String userAgent)
      User Agent
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withDefaultAuthToken

      public TwitchHelixBuilder withDefaultAuthToken(com.github.philippheuer.credentialmanager.domain.OAuth2Credential defaultAuthToken)
      Default Auth Token for API Requests
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withRequestQueueSize

      public TwitchHelixBuilder withRequestQueueSize(Integer requestQueueSize)
      HTTP Request Queue Size
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withBaseUrl

      public TwitchHelixBuilder withBaseUrl(String baseUrl)
      BaseUrl
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withTimeout

      public TwitchHelixBuilder withTimeout(Integer timeout)
      Default Timeout
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withLogLevel

      public TwitchHelixBuilder withLogLevel(feign.Logger.Level logLevel)
      you can overwrite the feign loglevel to print the full requests + responses if needed
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withProxyConfig

      public TwitchHelixBuilder withProxyConfig(ProxyConfig proxyConfig)
      Proxy Configuration
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withScheduledThreadPoolExecutor

      public TwitchHelixBuilder withScheduledThreadPoolExecutor(ScheduledThreadPoolExecutor scheduledThreadPoolExecutor)
      Scheduler Thread Pool Executor
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withApiRateLimit

      public TwitchHelixBuilder withApiRateLimit(io.github.bucket4j.Bandwidth apiRateLimit)
      Custom Rate Limit to use for Helix calls
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).