Merge remote-tracking branch 'origin/master'

This commit is contained in:
JW
2023-08-23 20:55:46 +02:00

View File

@@ -62,7 +62,7 @@ Do you prefer other programming languages?
public static void main(String[] args) public static void main(String[] args)
{ {
// Username of someone who is currently live // Username of someone who is currently live
var tiktokUsername = "officialgeilegisela"; var tiktokUsername = "jwdevtiktok";
TikTokLive.newClient(tiktokUsername) TikTokLive.newClient(tiktokUsername)
.onConnected(event -> .onConnected(event ->
@@ -84,6 +84,33 @@ Do you prefer other programming languages?
.buildAndRun(); .buildAndRun();
} }
``` ```
## Configuration
```java
public class ConfigurationExample
{
public static void main(String[] args) throws IOException {
TikTokLive.newClient("jwdevtiktok")
.configure(clientSettings ->
{
clientSettings.setHostName("jwdevtiktok"); //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 ## Methods
A `TikTokLive` object contains the following methods. A `TikTokLive` object contains the following methods.