Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

54
LINES

< > BotCompany Repo | #1024422 // Test Twitch4J

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 3202K of libraries. Click here for Pure Java version (6756L/48K).

!7

lib 1400218 // twitch4j
lib 1400219 // credentialmanager
lib 1400220 // events4j
lib 1400221 // micrometer
lib 1400222 // reactor core
lib 1400223 // reactive streams
lib 1400224 // sentry
lib 1400225 // okhttp3
lib 1400226 // feign core
lib 1400227 // archaius core (co.netflix.config)
lib 1400228 // commons configuration
lib 1400229 // commons logging
lib 1400230 // jackson databind
lib 1400231 // jackson annotations 
lib 1400232 // jackson core
lib 1400233 // feign hystrix
lib 1400234 // feign jackson
lib 1400235 // hystrix core
lib 1400237 // bucket4j
lib 1400238 // websocket
lib 1400239 // commons collections4
lib 1400240 // kotlin
lib 1400241 // okio

lib 1011966 // slf4j
//lib 1013817 // jackson
lib 1003719 // commons-lang3-3.4.jar
lib 1003727 // commons-lang-2.6.jar

import com.github.twitch4j.*;
import com.github.philippheuer.credentialmanager.domain.OAuth2Credential;

sS clientID = "cij4uwn2reu3rmdvdekn0nqhxf08e9";

p-exp {
  S clientSecret = trimLoadTextFileMandatory(javaxSecretDir("twitch-client-secret.txt"));
  S chatToken = trimLoadTextFileMandatory(javaxSecretDir("twitch-oauth-token.txt"));
  
  TwitchClientBuilder clientBuilder = TwitchClientBuilder.builder();

  OAuth2Credential credential = new("twitch", chatToken);

  TwitchClient twitchClient = clientBuilder
    .withClientId(clientID)
    .withClientSecret(clientSecret)
    .withEnableHelix(true)
    .withChatAccount(credential)
    .withEnableChat(true)
    //.withEnableGraphQL(true)
    //.withEnableKraken(true)
    .build();
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024422
Snippet name: Test Twitch4J
Eternal ID of this version: #1024422/31
Text MD5: d1627f5b493f8a66e2c8bbf4f00ee517
Transpilation MD5: c829d31f465aac7b885ce9a9e3f13014
Author: stefan
Category: javax / twtitch
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-11 21:15:29
Source code size: 1581 bytes / 54 lines
Pitched / IR pitched: No / No
Views / Downloads: 221 / 868
Version history: 30 change(s)
Referenced in: [show references]