mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 16:59:39 -05:00
Compare commits
6 Commits
develop-1-
...
1.0.9-Rele
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e37b6627b | ||
|
|
c4f0d63b43 | ||
|
|
15550ed703 | ||
|
|
c7d84218f2 | ||
|
|
1ecd192539 | ||
|
|
b4997da0a8 |
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>TikTokLiveJava</artifactId>
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<version>1.0.7-Release</version>
|
||||
<version>1.0.8-Release</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>API</artifactId>
|
||||
|
||||
@@ -33,7 +33,7 @@ import io.github.jwdeveloper.tiktok.messages.webcast.WebcastGiftMessage;
|
||||
import lombok.Getter;
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* Triggered when user sends gifts that has
|
||||
* no combo (most of expensive gifts)
|
||||
* or if combo has finished
|
||||
@@ -43,11 +43,13 @@ import lombok.Getter;
|
||||
public class TikTokGiftEvent extends TikTokHeaderEvent {
|
||||
private final Gift gift;
|
||||
private final User user;
|
||||
private final User toUser;
|
||||
private final int combo;
|
||||
public TikTokGiftEvent(Gift gift, WebcastGiftMessage msg) {
|
||||
super(msg.getCommon());
|
||||
this.gift = gift;
|
||||
user = User.map(msg.getUser(), msg.getUserIdentity());
|
||||
toUser = User.map(msg.getToUser());
|
||||
combo = msg.getComboCount();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>TikTokLiveJava</artifactId>
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<version>1.0.7-Release</version>
|
||||
<version>1.0.8-Release</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<parent>
|
||||
<artifactId>TikTokLiveJava</artifactId>
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<version>1.0.7-Release</version>
|
||||
<version>1.0.8-Release</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
18
README.md
18
README.md
@@ -1,7 +1,6 @@
|
||||
<div align="center" >
|
||||
<a target="blank" >
|
||||
<img src="https://raw.githubusercontent.com/jwdeveloper/TikTokLiveJava/develop-1_0_0/Tools-ReadmeGenerator/src/main/resources/logo.svg" width="15%" >
|
||||
</img>
|
||||
</a>
|
||||
</div>
|
||||
<div align="center" >
|
||||
@@ -12,18 +11,15 @@
|
||||
<div align="center" >
|
||||
<a href="https://jitpack.io/#jwdeveloper/TikTok-Live-Java" target="blank" >
|
||||
<img src="https://jitpack.io/v/jwdeveloper/TikTok-Live-Java.svg" width="20%" >
|
||||
</img>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="https://discord.gg/e2XwPNTBBr" target="blank" >
|
||||
<img src="https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white" >
|
||||
</img>
|
||||
</a>
|
||||
|
||||
<a target="blank" >
|
||||
<img src="https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white" >
|
||||
</img>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -33,7 +29,7 @@ A Java library inspired by [TikTokLive](https://github.com/isaackogan/TikTokLive
|
||||
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](#member), [Gifts](#gift), [Subscriptions](#subscribe), [Viewers](#roomuser), [Follows](#social), [Shares](#social), [Questions](#questionnew), [Likes](#like) and [Battles](#linkmicbattle) can be tracked.
|
||||
|
||||
# Contributors
|
||||
# Contributors
|
||||
[Library documentation for contributors](https://github.com/jwdeveloper/TikTokLiveJava/wiki)
|
||||
|
||||
<div align="center">
|
||||
@@ -58,7 +54,7 @@ Do you prefer other programming languages?
|
||||
|
||||
## Getting started
|
||||
|
||||
1. Install the package
|
||||
1. Install the package
|
||||
|
||||
Maven
|
||||
```xml
|
||||
@@ -73,7 +69,7 @@ Maven
|
||||
<dependency>
|
||||
<groupId>com.github.jwdeveloper.TikTok-Live-Java</groupId>
|
||||
<artifactId>Client</artifactId>
|
||||
<version>1.0.7-Release</version>
|
||||
<version>1.0.8-Release</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@@ -90,7 +86,7 @@ dependencyResolutionManagement {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.jwdeveloper.TikTok-Live-Java:Client:1.0.7-Release'
|
||||
implementation 'com.github.jwdeveloper.TikTok-Live-Java:Client:1.0.8-Release'
|
||||
}
|
||||
```
|
||||
|
||||
@@ -438,9 +434,9 @@ Triggered every time gift is sent
|
||||
<p>>Combo: 1 -> comboState = GiftSendType.Begin</p>
|
||||
<p>Combo: 4 -> comboState = GiftSendType.Active</p>
|
||||
<p>Combo: 8 -> comboState = GiftSendType.Active</p>
|
||||
<p>Combo: 12 -> comboState = GiftSendType.Finsihed</p>
|
||||
<p>Combo: 12 -> comboState = GiftSendType.Finished</p>
|
||||
|
||||
Remember if comboState is Finsihed both TikTokGiftComboEvent and TikTokGiftEvent event gets triggered
|
||||
Remember if comboState is Finished both TikTokGiftComboEvent and TikTokGiftEvent event gets triggered
|
||||
|
||||
|
||||
```java
|
||||
@@ -697,4 +693,4 @@ public static class CustomListener implements TikTokEventListener {
|
||||
|
||||
|
||||
## Contributing
|
||||
Your improvements are welcome! Feel free to open an <a href="https://github.com/jwdeveloper/TikTok-Live-Java/issues">issue</a> or <a href="https://github.com/jwdeveloper/TikTok-Live-Java/pulls">pull request</a>.
|
||||
Your improvements are welcome! Feel free to open an <a href="https://github.com/jwdeveloper/TikTok-Live-Java/issues">issue</a> or <a href="https://github.com/jwdeveloper/TikTok-Live-Java/pulls">pull request</a>.
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>TikTokLiveJava</artifactId>
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<version>1.0.7-Release</version>
|
||||
<version>1.0.8-Release</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>TikTokLiveJava</artifactId>
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<version>1.0.7-Release</version>
|
||||
<version>1.0.8-Release</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>Tools-EventsWebViewer</artifactId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>TikTokLiveJava</artifactId>
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<version>1.0.7-Release</version>
|
||||
<version>1.0.8-Release</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>TikTokLiveJava</artifactId>
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<version>1.0.7-Release</version>
|
||||
<version>1.0.8-Release</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ Are you willing to help or improve TikTokLiveJava?
|
||||
- Connecting to TikTok websocket (PushServer)
|
||||
|
||||
After successful connection to TikTok, `pushServer` starts to send `ProtocolBuffer`
|
||||
messages in binary format. This is very important to understand `ProtocolBuffer. Don't worry it is not complicated :).
|
||||
messages in binary format. This is very important to understand `ProtocolBuffer`. Don't worry it is not complicated :).
|
||||
All the proto files are included under `API/src/main/proto` After using `Maven compile` command on project, java classes are generated from
|
||||
those files. so then we can easily map incoming bytes to classes, for examples
|
||||
`WebcastGiftMessage message = WebcastGiftMessage.parseFrom(incomingBytesArray)`
|
||||
@@ -200,12 +200,4 @@ need to also include it to interface `EventsBuilder`
|
||||
|
||||
Finally we are good to go, our event has been included!
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||

|
||||
Reference in New Issue
Block a user