diff --git a/README.md b/README.md index 69c1351..512bc9f 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 -> @@ -84,6 +84,33 @@ Do you prefer other programming languages? .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 A `TikTokLive` object contains the following methods.