Generated new Gifts Json

   TikTokLive.isLiveOnline() check if live if online
   TikTokLive.isLiveOnlineAsync()

   TikTokLive.isHostNameValid() check if hostName is correct
   TikTokLive.isHostNameValidAsync()
This commit is contained in:
JW
2023-11-10 22:20:40 +01:00
parent 6d268c42f1
commit 519c22de8e
6 changed files with 87 additions and 13 deletions

View File

@@ -22,8 +22,7 @@
*/
package io.github.jwdeveloper.tiktok;
import io.github.jwdeveloper.tiktok.data.models.Picture;
import io.github.jwdeveloper.tiktok.data.models.gifts.Gift;
import io.github.jwdeveloper.tiktok.exceptions.TikTokLiveOfflineHostException;
import io.github.jwdeveloper.tiktok.utils.ConsoleColors;
import java.io.IOException;
@@ -39,6 +38,12 @@ public class SimpleExample
// set tiktok username
/*
Optional checking if host name is correct
if(TikTokLive.isHostNameValid(TIKTOK_HOSTNAME))
{
System.out.println("Live is online!");
}
Optional checking if live is online
if(TikTokLive.isLiveOnline(TIKTOK_HOSTNAME))
{
@@ -90,7 +95,7 @@ public class SimpleExample
{
print(ConsoleColors.RED,"[Disconnected]");
})
.onChestOpen((liveClient, event) ->
.onChest((liveClient, event) ->
{
print(ConsoleColors.GREEN,"Chest has been open by ",event.getUser().getName());
})