Changes:
Http-client settings in configure method
```
TikTokLive.newClient("X")
.configure(liveClientSettings ->
{
var httpSetting = liveClientSettings.getHttpSettings();
httpSetting.setTimeout(Duration.ofSeconds(12));
});
```
`TikTokLive.requests()` Easy and quick way of making
http request to tiktok
```
var giftsResponse =TikTokLive.request.fetchGiftsData();
```
Removed:
TikTokLive.isLiveOnline(String hostName);
TikTokLive.isHostNameValidAsync(String hostName);
instead you can use
```
TikTokLive.requests().fetchLiveUserData("Mike").getUserStatus()
```
3.8 KiB
Introduction
A Java library inspired by TikTokLive and TikTokLiveSharp. Use it to receive live stream events such as comments and gifts in realtime from TikTok LIVE by connecting to TikTok's internal WebCast push service.
The library includes a wrapper that connects to the WebCast service using just the username (uniqueId). This allows you to connect to your own live chat as well as the live chat of other streamers.
No credentials are required. Events such as Members Joining, Gifts, Subscriptions, Viewers, Follows, Shares, Questions, Likes and Battles can be tracked.
Join the support discord and visit the #java-support channel for questions, contributions and ideas. Feel free to make pull requests with missing/new features, fixes, etc
Do you prefer other programming languages?
- Node orginal: TikTok-Live-Connector by @zerodytrash
- Python rewrite: TikTokLive by @isaackogan
- Go rewrite: GoTikTokLive by @Davincible
- C# rewrite: TikTokLiveSharp by @frankvHoof93
NOTE: This is not an official API. It's a reverse engineering project.
Overview
Getting started
- Install the package via Maven
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.jwdeveloper.TikTok-Live-Java</groupId>
<artifactId>Client</artifactId>
<version>{{version}}</version>
<scope>compile</scope>
</dependency>
</dependencies>
- Create your first chat connection
{{code-content}}
Events
{{events-content}}
{{for item of data }}
{{if item is 2}}
my name is {{item.name}}
{{else}}
{{end}}
{{end}}
Listeners
{{listener-content}}
Contributing
Your improvements are welcome! Feel free to open an issue or pull request.
