Compare commits

...

6 Commits

Author SHA1 Message Date
Jacek W
2e37b6627b Merge pull request #33 from kohlerpop1/kohlerpop1-fixes/updates
Updates to TikTokGiftEvent & grammar fixes!
2023-12-18 22:56:33 +01:00
kohlerpop1
c4f0d63b43 Add toUser to TikTokGiftEvent to determine the correct user receiving a gift!
Made grammar fix to collaboration.md and README.md!
2023-12-18 16:52:40 -05:00
Jacek W
15550ed703 Update README.md 2023-12-12 19:49:52 +01:00
GitHub Action
c7d84218f2 Update version in pom.xml 2023-12-12 18:49:13 +00:00
Jacek W
1ecd192539 Merge pull request #30 from jwdeveloper/develop-1-0-8
updated structure of WebcastLinkLayerMessage
in proto file
2023-12-12 19:47:35 +01:00
Jacek W
b4997da0a8 Merge pull request #29 from jwdeveloper/develop-1-0-8
updated structure of WebcastLinkLayerMessage
in proto file
2023-12-12 19:39:51 +01:00
11 changed files with 21 additions and 31 deletions

View File

@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>TikTokLiveJava</artifactId> <artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId> <groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.0.7-Release</version> <version>1.0.8-Release</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>API</artifactId> <artifactId>API</artifactId>

View File

@@ -33,7 +33,7 @@ import io.github.jwdeveloper.tiktok.messages.webcast.WebcastGiftMessage;
import lombok.Getter; import lombok.Getter;
/* /**
* Triggered when user sends gifts that has * Triggered when user sends gifts that has
* no combo (most of expensive gifts) * no combo (most of expensive gifts)
* or if combo has finished * or if combo has finished
@@ -43,11 +43,13 @@ import lombok.Getter;
public class TikTokGiftEvent extends TikTokHeaderEvent { public class TikTokGiftEvent extends TikTokHeaderEvent {
private final Gift gift; private final Gift gift;
private final User user; private final User user;
private final User toUser;
private final int combo; private final int combo;
public TikTokGiftEvent(Gift gift, WebcastGiftMessage msg) { public TikTokGiftEvent(Gift gift, WebcastGiftMessage msg) {
super(msg.getCommon()); super(msg.getCommon());
this.gift = gift; this.gift = gift;
user = User.map(msg.getUser(), msg.getUserIdentity()); user = User.map(msg.getUser(), msg.getUserIdentity());
toUser = User.map(msg.getToUser());
combo = msg.getComboCount(); combo = msg.getComboCount();
} }
} }

View File

@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>TikTokLiveJava</artifactId> <artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId> <groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.0.7-Release</version> <version>1.0.8-Release</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -41,7 +41,7 @@
<parent> <parent>
<artifactId>TikTokLiveJava</artifactId> <artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId> <groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.0.7-Release</version> <version>1.0.8-Release</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -1,7 +1,6 @@
<div align="center" > <div align="center" >
<a target="blank" > <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 src="https://raw.githubusercontent.com/jwdeveloper/TikTokLiveJava/develop-1_0_0/Tools-ReadmeGenerator/src/main/resources/logo.svg" width="15%" >
</img>
</a> </a>
</div> </div>
<div align="center" > <div align="center" >
@@ -12,18 +11,15 @@
<div align="center" > <div align="center" >
<a href="https://jitpack.io/#jwdeveloper/TikTok-Live-Java" target="blank" > <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 src="https://jitpack.io/v/jwdeveloper/TikTok-Live-Java.svg" width="20%" >
</img>
</a> </a>
<a href="https://discord.gg/e2XwPNTBBr" target="blank" > <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 src="https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white" >
</img>
</a> </a>
<a target="blank" > <a target="blank" >
<img src="https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white" > <img src="https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white" >
</img>
</a> </a>
</div> </div>
</div> </div>
@@ -73,7 +69,7 @@ Maven
<dependency> <dependency>
<groupId>com.github.jwdeveloper.TikTok-Live-Java</groupId> <groupId>com.github.jwdeveloper.TikTok-Live-Java</groupId>
<artifactId>Client</artifactId> <artifactId>Client</artifactId>
<version>1.0.7-Release</version> <version>1.0.8-Release</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>
@@ -90,7 +86,7 @@ dependencyResolutionManagement {
} }
dependencies { 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: 1 -> comboState = GiftSendType.Begin</p>
<p>Combo: 4 -> comboState = GiftSendType.Active</p> <p>Combo: 4 -> comboState = GiftSendType.Active</p>
<p>Combo: 8 -> 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 ```java

View File

@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>TikTokLiveJava</artifactId> <artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId> <groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.0.7-Release</version> <version>1.0.8-Release</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>TikTokLiveJava</artifactId> <artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId> <groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.0.7-Release</version> <version>1.0.8-Release</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>Tools-EventsWebViewer</artifactId> <artifactId>Tools-EventsWebViewer</artifactId>

View File

@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>TikTokLiveJava</artifactId> <artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId> <groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.0.7-Release</version> <version>1.0.8-Release</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>TikTokLiveJava</artifactId> <artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId> <groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.0.7-Release</version> <version>1.0.8-Release</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -27,7 +27,7 @@ Are you willing to help or improve TikTokLiveJava?
- Connecting to TikTok websocket (PushServer) - Connecting to TikTok websocket (PushServer)
After successful connection to TikTok, `pushServer` starts to send `ProtocolBuffer` 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 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 those files. so then we can easily map incoming bytes to classes, for examples
`WebcastGiftMessage message = WebcastGiftMessage.parseFrom(incomingBytesArray)` `WebcastGiftMessage message = WebcastGiftMessage.parseFrom(incomingBytesArray)`
@@ -201,11 +201,3 @@ need to also include it to interface `EventsBuilder`
Finally we are good to go, our event has been included! Finally we are good to go, our event has been included!
![image](https://github.com/jwdeveloper/TikTokLiveJava/assets/79764581/36ad6f1f-b38c-4cf7-93bd-b4cc0638cba0) ![image](https://github.com/jwdeveloper/TikTokLiveJava/assets/79764581/36ad6f1f-b38c-4cf7-93bd-b4cc0638cba0)

View File

@@ -7,7 +7,7 @@
<groupId>io.github.jwdeveloper.tiktok</groupId> <groupId>io.github.jwdeveloper.tiktok</groupId>
<artifactId>TikTokLiveJava</artifactId> <artifactId>TikTokLiveJava</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>1.0.7-Release</version> <version>1.0.8-Release</version>
<modules> <modules>
<module>API</module> <module>API</module>
<module>Client</module> <module>Client</module>