mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 16:59:39 -05:00
Update README.md
This commit is contained in:
33
README.md
33
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.
|
||||
|
||||
Reference in New Issue
Block a user