made: settings.fetchGifts default to true

This commit is contained in:
JW
2024-02-28 15:11:03 +01:00
parent 8581df7f49
commit faa1185b97
7 changed files with 70 additions and 40 deletions

View File

@@ -78,6 +78,12 @@
<version>1.3.0-Release</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.github.jwdeveloper.worker</groupId>
<artifactId>extension-tester</artifactId>
<version>1.3.0-Release</version>
<scope>compile</scope>
</dependency>
</dependencies>
<properties>

View File

@@ -0,0 +1,45 @@
package io.github.jwdeveloper.tiktok;
import io.github.jwdeveloper.tiktok.data.events.gift.TikTokGiftEvent;
import io.github.jwdeveloper.tiktok.live.LiveClient;
public class GiftTestingExample {
public static void main(String[] args) throws Exception {
LiveClient client = TikTokLive.newClient(SimpleExample.TIKTOK_HOSTNAME)
.configure(liveClientSettings ->
{
// liveClientSettings.setOffline(true);
})
.onConnected((liveClient, event) ->
{
liveClient.getLogger().info("Connected");
})
.onGiftCombo((liveClient, event) ->
{
})
.onGift((liveClient, event) ->
{
liveClient.getLogger().info("New fakeGift: " + event.getGift());
})
.buildAndConnect();
var gifts = TikTokLive.gifts();
var fakeGift = TikTokGiftEvent.of(gifts.getByName("Rose"));
var fakeGift2 = TikTokGiftEvent.of("Rose", 1, 23);
client.publishEvent(fakeGift);
client.publishEvent(fakeGift2);
}
public void GetTesterBuilder() {
}
public void GetBuilder() {
}
}

View File

@@ -1,4 +1,4 @@
package io.github.jwdeveloper.tiktok;
public class testerExample {
public class TestingGiftsExample {
}