From af209fc2ca55f5561533a9ff16e9a09f9de36967 Mon Sep 17 00:00:00 2001 From: JW Date: Tue, 22 Aug 2023 21:00:16 +0200 Subject: [PATCH 1/4] Update README.md --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 69c1351..9eccfbc 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,39 @@ Do you prefer other programming languages? .buildAndRun(); } ``` +## Configuration + +```java +package io.github.jwdeveloper.tiktok; + +import java.io.IOException; +import java.time.Duration; +import java.util.logging.Level; + +public class ConfigurationExample +{ + public static void main(String[] args) throws IOException { + + TikTokLive.newClient(Main.TEST_TIKTOK_USER) + .configure(clientSettings -> + { + clientSettings.setHostName(Main.TEST_TIKTOK_USER); //tiktok user + clientSettings.setClientLanguage("en"); //language + clientSettings.setTimeout(Duration.ofSeconds(2)); //connection timeout + clientSettings.setLogLevel(Level.ALL); //log level + clientSettings.setDownloadGiftInfo(true); //TODO + clientSettings.setCheckForUnparsedData(true); //TODO + clientSettings.setPollingInterval(Duration.ofSeconds(1)); //TODO + clientSettings.setPrintMessageData(true); //TODO + clientSettings.setPrintToConsole(true); //TODO + clientSettings.setHandleExistingMessagesOnConnect(true); //TODO + clientSettings.setRetryOnConnectionFailure(true); //TODO + }) + .buildAndRun(); + } +} + +``` ## Methods A `TikTokLive` object contains the following methods. From b9a4fb193e0beca036c3af34e94f0ea65448133e Mon Sep 17 00:00:00 2001 From: JW Date: Tue, 22 Aug 2023 21:03:55 +0200 Subject: [PATCH 2/4] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9eccfbc..ebf6f49 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Do you prefer other programming languages? public static void main(String[] args) { // Username of someone who is currently live - var tiktokUsername = "officialgeilegisela"; + var tiktokUsername = "jwdevtiktok"; TikTokLive.newClient(tiktokUsername) .onConnected(event -> @@ -97,7 +97,7 @@ public class ConfigurationExample { public static void main(String[] args) throws IOException { - TikTokLive.newClient(Main.TEST_TIKTOK_USER) + TikTokLive.newClient("jwdevtiktok") .configure(clientSettings -> { clientSettings.setHostName(Main.TEST_TIKTOK_USER); //tiktok user From 230764ed6a9af8965587f80e3b03ff497e8be5c2 Mon Sep 17 00:00:00 2001 From: JW Date: Tue, 22 Aug 2023 21:08:38 +0200 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ebf6f49..c3f1e26 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ public class ConfigurationExample TikTokLive.newClient("jwdevtiktok") .configure(clientSettings -> { - clientSettings.setHostName(Main.TEST_TIKTOK_USER); //tiktok user + clientSettings.setHostName("jwdevtiktok"); //tiktok user clientSettings.setClientLanguage("en"); //language clientSettings.setTimeout(Duration.ofSeconds(2)); //connection timeout clientSettings.setLogLevel(Level.ALL); //log level From 6fb89e72d47e0b03e1effe4ca0d3f33e6f5089ec Mon Sep 17 00:00:00 2001 From: JW Date: Tue, 22 Aug 2023 21:10:34 +0200 Subject: [PATCH 4/4] Update README.md --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index c3f1e26..512bc9f 100644 --- a/README.md +++ b/README.md @@ -87,12 +87,6 @@ Do you prefer other programming languages? ## Configuration ```java -package io.github.jwdeveloper.tiktok; - -import java.io.IOException; -import java.time.Duration; -import java.util.logging.Level; - public class ConfigurationExample { public static void main(String[] args) throws IOException {