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).

1  
!7
2  
3  
lib 1400218 // twitch4j
4  
lib 1400219 // credentialmanager
5  
lib 1400220 // events4j
6  
lib 1400221 // micrometer
7  
lib 1400222 // reactor core
8  
lib 1400223 // reactive streams
9  
lib 1400224 // sentry
10  
lib 1400225 // okhttp3
11  
lib 1400226 // feign core
12  
lib 1400227 // archaius core (co.netflix.config)
13  
lib 1400228 // commons configuration
14  
lib 1400229 // commons logging
15  
lib 1400230 // jackson databind
16  
lib 1400231 // jackson annotations 
17  
lib 1400232 // jackson core
18  
lib 1400233 // feign hystrix
19  
lib 1400234 // feign jackson
20  
lib 1400235 // hystrix core
21  
lib 1400237 // bucket4j
22  
lib 1400238 // websocket
23  
lib 1400239 // commons collections4
24  
lib 1400240 // kotlin
25  
lib 1400241 // okio
26  
27  
lib 1011966 // slf4j
28  
//lib 1013817 // jackson
29  
lib 1003719 // commons-lang3-3.4.jar
30  
lib 1003727 // commons-lang-2.6.jar
31  
32  
import com.github.twitch4j.*;
33  
import com.github.philippheuer.credentialmanager.domain.OAuth2Credential;
34  
35  
sS clientID = "cij4uwn2reu3rmdvdekn0nqhxf08e9";
36  
37  
p-exp {
38  
  S clientSecret = trimLoadTextFileMandatory(javaxSecretDir("twitch-client-secret.txt"));
39  
  S chatToken = trimLoadTextFileMandatory(javaxSecretDir("twitch-oauth-token.txt"));
40  
  
41  
  TwitchClientBuilder clientBuilder = TwitchClientBuilder.builder();
42  
43  
  OAuth2Credential credential = new("twitch", chatToken);
44  
45  
  TwitchClient twitchClient = clientBuilder
46  
    .withClientId(clientID)
47  
    .withClientSecret(clientSecret)
48  
    .withEnableHelix(true)
49  
    .withChatAccount(credential)
50  
    .withEnableChat(true)
51  
    //.withEnableGraphQL(true)
52  
    //.withEnableKraken(true)
53  
    .build();
54  
}

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: 231 / 883
Version history: 30 change(s)
Referenced in: [show references]