Package com.github.twitch4j.graphql
Class TwitchGraphQLBuilder
java.lang.Object
com.github.twitch4j.graphql.TwitchGraphQLBuilder
Twitch GraphQL Builder
This is an unofficial API that is not intended for third-party use. Use at your own risk. Methods could change or stop working at any time.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Twitch API Client (GraphQL)static TwitchGraphQLBuilder
builder()
Initialize the builderBaseUrlClient IdClient SecretClass<? extends com.github.philippheuer.events4j.api.service.IEventHandler>
EventManagercom.github.philippheuer.credentialmanager.domain.OAuth2Credential
Default First-Party OAuth Tokencom.github.philippheuer.events4j.core.EventManager
Event ManagerAdditional headers to be applied to each outbound requestProxy ConfigurationDefault TimeoutUser Agentboolean
Whether GraphQL Queries should be batchedwithClientId
(String clientId) Client IdwithClientSecret
(String clientSecret) Deprecated.withDefaultEventHandler
(Class<? extends com.github.philippheuer.events4j.api.service.IEventHandler> defaultEventHandler) EventManagerwithDefaultFirstPartyToken
(com.github.philippheuer.credentialmanager.domain.OAuth2Credential defaultFirstPartyToken) Default First-Party OAuth TokenwithEnableBatching
(boolean enableBatching) Whether GraphQL Queries should be batchedwithEventManager
(com.github.philippheuer.events4j.core.EventManager eventManager) Event ManagerwithHeaders
(Map<String, String> headers) Additional headers to be applied to each outbound requestwithProxyConfig
(ProxyConfig proxyConfig) Proxy ConfigurationwithTimeout
(Integer timeout) Default TimeoutwithUserAgent
(String userAgent) User Agent
-
Method Details
-
builder
Initialize the builder- Returns:
- Twitch GraphQL Builder
-
build
Twitch API Client (GraphQL)- Returns:
- TwitchGraphQL
-
getEventManager
public com.github.philippheuer.events4j.core.EventManager getEventManager()Event Manager -
getDefaultEventHandler
public Class<? extends com.github.philippheuer.events4j.api.service.IEventHandler> getDefaultEventHandler()EventManager -
getProxyConfig
Proxy Configuration -
getClientId
Client Id -
getClientSecret
Client Secret -
getDefaultFirstPartyToken
public com.github.philippheuer.credentialmanager.domain.OAuth2Credential getDefaultFirstPartyToken()Default First-Party OAuth Token -
isEnableBatching
public boolean isEnableBatching()Whether GraphQL Queries should be batched -
getTimeout
Default Timeout -
getUserAgent
User Agent -
getHeaders
Additional headers to be applied to each outbound request -
getBaseUrl
BaseUrl -
withEventManager
public TwitchGraphQLBuilder withEventManager(com.github.philippheuer.events4j.core.EventManager eventManager) Event Manager- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withDefaultEventHandler
public TwitchGraphQLBuilder withDefaultEventHandler(Class<? extends com.github.philippheuer.events4j.api.service.IEventHandler> defaultEventHandler) EventManager- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withProxyConfig
Proxy Configuration- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withClientId
Client Id- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withClientSecret
Deprecated.Client Secret- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withDefaultFirstPartyToken
public TwitchGraphQLBuilder withDefaultFirstPartyToken(com.github.philippheuer.credentialmanager.domain.OAuth2Credential defaultFirstPartyToken) Default First-Party OAuth Token- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withEnableBatching
Whether GraphQL Queries should be batched- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withTimeout
Default Timeout- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withUserAgent
User Agent- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withHeaders
Additional headers to be applied to each outbound request- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-