mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 16:59:39 -05:00
Compare commits
177 Commits
develop-1.
...
1.8.10-Rel
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29a81f4cd6 | ||
|
|
70fd174a95 | ||
|
|
3e23e5b939 | ||
|
|
733e72f814 | ||
|
|
838728d47d | ||
|
|
fd6158410a | ||
|
|
6c56a96ba8 | ||
|
|
bb5659574c | ||
|
|
286da42e54 | ||
|
|
3d0b9ddcc0 | ||
|
|
354c072833 | ||
|
|
f85f24a5c8 | ||
|
|
2550a462f9 | ||
|
|
eb7b977d62 | ||
|
|
1c2c701be0 | ||
|
|
a2303f1fde | ||
|
|
a8ac0f6fff | ||
|
|
732eda3d22 | ||
|
|
358954984b | ||
|
|
acb13ea58a | ||
|
|
e8129862d1 | ||
|
|
88e36e7e90 | ||
|
|
eef9d43d01 | ||
|
|
75f3896a86 | ||
|
|
e679ff23b7 | ||
|
|
e6211e69c5 | ||
|
|
1b3ee24aea | ||
|
|
c9309ee2cf | ||
|
|
a28df44cee | ||
|
|
ee866762a3 | ||
|
|
3cb7c83ef4 | ||
|
|
bf755bcb89 | ||
|
|
20bb05e527 | ||
|
|
d5a3213ad8 | ||
|
|
7e496373ef | ||
|
|
1f3c1c7d41 | ||
|
|
c160259863 | ||
|
|
fb458e7e7d | ||
|
|
5f5ada312a | ||
|
|
cb20c3dd3a | ||
|
|
bf42f65b3d | ||
|
|
05e18ef8e0 | ||
|
|
0f6ee58d7f | ||
|
|
511759960d | ||
|
|
617d1c381a | ||
|
|
6f8b4698cd | ||
|
|
2bc1993ea5 | ||
|
|
3d4a517adb | ||
|
|
ee0b559758 | ||
|
|
1c9573dc39 | ||
|
|
5b17c33236 | ||
|
|
b59373254c | ||
|
|
5524d9f8c4 | ||
|
|
aa56f8eaea | ||
|
|
e40bde8e7c | ||
|
|
b769eb9c1f | ||
|
|
3e555a502a | ||
|
|
316868818b | ||
|
|
36475c2cf6 | ||
|
|
2dbe81278c | ||
|
|
91fc32b20b | ||
|
|
fa855fa3aa | ||
|
|
cfea12dacc | ||
|
|
16cd819aaf | ||
|
|
290a4970fd | ||
|
|
660cb287e9 | ||
|
|
f5de7720cd | ||
|
|
f986efd2d5 | ||
|
|
1054453451 | ||
|
|
7005f58edd | ||
|
|
63672fe9eb | ||
|
|
fed9de3fd0 | ||
|
|
b223651a8f | ||
|
|
8d715d4f50 | ||
|
|
1736236ccf | ||
|
|
85d99ce4f1 | ||
|
|
87727070e9 | ||
|
|
71f744cf49 | ||
|
|
046d5f1756 | ||
|
|
c36b0f1f62 | ||
|
|
a2082ebee3 | ||
|
|
412c72c119 | ||
|
|
6728fd9963 | ||
|
|
47493d4955 | ||
|
|
4d4317d96c | ||
|
|
b1954a708c | ||
|
|
14317337e9 | ||
|
|
947c9c49a2 | ||
|
|
f2bd07377b | ||
|
|
3f268f3a1a | ||
|
|
55fcf83870 | ||
|
|
8d3828cca8 | ||
|
|
1c88491b8c | ||
|
|
47b050d0ba | ||
|
|
cfef082d3b | ||
|
|
34ddc74189 | ||
|
|
9a66d240bc | ||
|
|
d825803187 | ||
|
|
77c9cd6b52 | ||
|
|
0329d3cfeb | ||
|
|
26659bb37d | ||
|
|
0b9852c4d4 | ||
|
|
31618a16ba | ||
|
|
243791f6b8 | ||
|
|
4f74a0f1b7 | ||
|
|
d1eec34fca | ||
|
|
82196ef8e3 | ||
|
|
8685d96ccf | ||
|
|
69f1d5b5c2 | ||
|
|
6f322b2a46 | ||
|
|
73c4c09ea1 | ||
|
|
95e357af92 | ||
|
|
6b31ec7d80 | ||
|
|
919554bbc8 | ||
|
|
bd0a1f0d01 | ||
|
|
f48479a92c | ||
|
|
68a86f3dbd | ||
|
|
c3a7a27948 | ||
|
|
af52e15a45 | ||
|
|
5577df7c9c | ||
|
|
2c68fe3421 | ||
|
|
5abfd95c89 | ||
|
|
5c715bfd52 | ||
|
|
b153afb332 | ||
|
|
d2ea00bcae | ||
|
|
4297af1349 | ||
|
|
d09c90ef54 | ||
|
|
9c96c8899a | ||
|
|
301df6392d | ||
|
|
fb9fc04ee5 | ||
|
|
43a8ba4225 | ||
|
|
dffccf1f0b | ||
|
|
6dcccccb78 | ||
|
|
0d467d79c3 | ||
|
|
33c98508c0 | ||
|
|
67948b14cc | ||
|
|
22e11a7822 | ||
|
|
4545503441 | ||
|
|
498d34a90b | ||
|
|
103ed7e3ed | ||
|
|
67e70c34bc | ||
|
|
786c24d267 | ||
|
|
966d2f65d8 | ||
|
|
7ba7143f5a | ||
|
|
92fde03f2b | ||
|
|
e058290118 | ||
|
|
d25741b229 | ||
|
|
560a8d7c3b | ||
|
|
6178bc25cf | ||
|
|
48d1138754 | ||
|
|
a5320db820 | ||
|
|
4e1ab35a60 | ||
|
|
cef4972f37 | ||
|
|
713c90a271 | ||
|
|
71853db5cc | ||
|
|
ef90d4cd58 | ||
|
|
dad4048bc0 | ||
|
|
9ba049d37a | ||
|
|
f7d657371b | ||
|
|
eea691a5aa | ||
|
|
a249ac0cdd | ||
|
|
b82c7184b3 | ||
|
|
29631ac468 | ||
|
|
15c642297c | ||
|
|
d3004d76c1 | ||
|
|
3ae73072ff | ||
|
|
9c5f97157a | ||
|
|
ea847bb883 | ||
|
|
45bac053b9 | ||
|
|
8cb647f27a | ||
|
|
ffbd67eef4 | ||
|
|
e923f3fad7 | ||
|
|
faa1185b97 | ||
|
|
ead954dd27 | ||
|
|
e37b30ff12 | ||
|
|
7a5c00d99a | ||
|
|
407f51fa73 |
2
.github/workflows/maven-publish.yml
vendored
2
.github/workflows/maven-publish.yml
vendored
@@ -53,7 +53,7 @@ jobs:
|
|||||||
restore-keys: ${{runner.os}}-m2
|
restore-keys: ${{runner.os}}-m2
|
||||||
|
|
||||||
- name: 7 Create Artifacts
|
- name: 7 Create Artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.version.outputs.version_tag }}
|
name: ${{ steps.version.outputs.version_tag }}
|
||||||
path: staging
|
path: staging
|
||||||
|
|||||||
@@ -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.3.0-Release</version>
|
<version>1.8.9-Release</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>API</artifactId>
|
<artifactId>API</artifactId>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.protobuf</groupId>
|
<groupId>com.google.protobuf</groupId>
|
||||||
<artifactId>protobuf-java</artifactId>
|
<artifactId>protobuf-java</artifactId>
|
||||||
<version>3.24.1</version>
|
<version>4.26.1</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -51,6 +51,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<includeMavenTypes>direct</includeMavenTypes>
|
<includeMavenTypes>direct</includeMavenTypes>
|
||||||
|
<protocVersion>4.26.1</protocVersion>
|
||||||
<inputDirectories>
|
<inputDirectories>
|
||||||
<include>src/main/proto</include>
|
<include>src/main/proto</include>
|
||||||
</inputDirectories>
|
</inputDirectories>
|
||||||
@@ -79,4 +80,4 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -20,18 +20,21 @@
|
|||||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package io.github.jwdeveloper.tiktok.data.models;
|
package io.github.jwdeveloper.tiktok.annotations;
|
||||||
|
|
||||||
import lombok.Value;
|
/**
|
||||||
|
* HIGHEST 1
|
||||||
|
* HIGH 2
|
||||||
|
* NORMAL 3
|
||||||
|
* LOW 4
|
||||||
|
* LOWEST 5
|
||||||
|
*/
|
||||||
|
public enum Priority {
|
||||||
|
LOWEST(2), LOW(1), NORMAL(0), HIGH(-1), HIGHEST(-2);
|
||||||
|
|
||||||
@Value
|
public final int value;
|
||||||
public class EnumValue
|
|
||||||
{
|
|
||||||
public int value;
|
|
||||||
public String name;
|
|
||||||
|
|
||||||
public static EnumValue Map(Enum<?> _enum)
|
Priority(int value) {
|
||||||
{
|
this.value = value;
|
||||||
return new EnumValue(_enum.ordinal() ,_enum.name());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -28,5 +28,14 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface TikTokEventObserver
|
public @interface TikTokEventObserver
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* When more than one method listen for certain Event, you can specify the method priority
|
||||||
|
* @see Priority
|
||||||
|
*/
|
||||||
|
Priority priority() default Priority.NORMAL;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When true, action is invoked on a thread, from the threads pool
|
||||||
|
*/
|
||||||
|
boolean async() default false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -50,16 +50,12 @@ public class ProxyData
|
|||||||
|
|
||||||
return new ProxyData(address, port);
|
return new ProxyData(address, port);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
throw new IllegalArgumentException("Port must be a valid integer!");
|
throw new IllegalArgumentException("Port must be a valid integer!", e);
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
throw new IllegalArgumentException("Address must be valid IPv4, IPv6, or domain name!");
|
throw new IllegalArgumentException("Address must be valid IPv4, IPv6, or domain name!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProxyData clone() {
|
|
||||||
return new ProxyData(address, port);
|
|
||||||
}
|
|
||||||
|
|
||||||
public InetSocketAddress toSocketAddress() {
|
public InetSocketAddress toSocketAddress() {
|
||||||
return new InetSocketAddress(address, port);
|
return new InetSocketAddress(address, port);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -38,8 +38,7 @@ public class TikTokBarrageEvent extends TikTokHeaderEvent {
|
|||||||
private final Picture rightIcon;
|
private final Picture rightIcon;
|
||||||
private final String eventName;
|
private final String eventName;
|
||||||
private final int duration;
|
private final int duration;
|
||||||
|
private final BarrageParam barrageParam;
|
||||||
private BarrageParam barrageParam;
|
|
||||||
|
|
||||||
public TikTokBarrageEvent(WebcastBarrageMessage msg) {
|
public TikTokBarrageEvent(WebcastBarrageMessage msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
@@ -49,6 +48,5 @@ public class TikTokBarrageEvent extends TikTokHeaderEvent {
|
|||||||
rightIcon = Picture.map(msg.getRightIcon());
|
rightIcon = Picture.map(msg.getRightIcon());
|
||||||
duration = msg.getDuration();
|
duration = msg.getDuration();
|
||||||
barrageParam = BarrageParam.map(msg);
|
barrageParam = BarrageParam.map(msg);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -38,9 +38,9 @@ public class TikTokCaptionEvent extends TikTokHeaderEvent {
|
|||||||
String text;
|
String text;
|
||||||
|
|
||||||
public TikTokCaptionEvent(WebcastCaptionMessage msg) {
|
public TikTokCaptionEvent(WebcastCaptionMessage msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
captionTimeStamp = msg.getTimeStamp();
|
captionTimeStamp = msg.getTimeStamp();
|
||||||
iSOLanguage = msg.getCaptionData().getLanguage();
|
iSOLanguage = msg.getCaptionData().getLanguage();
|
||||||
text = msg.getCaptionData().getText();
|
text = msg.getCaptionData().getText();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -32,26 +32,37 @@ import lombok.Getter;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
|
||||||
* Triggered every time a new chat comment arrives.
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokCommentEvent extends TikTokHeaderEvent {
|
public class TikTokCommentEvent extends TikTokHeaderEvent {
|
||||||
private final User user;
|
private final User user;
|
||||||
private final String text;
|
private final String text;
|
||||||
private final String getUserLanguage;
|
private final String userLanguage;
|
||||||
private final User mentionedUser;
|
private final User mentionedUser;
|
||||||
private final List<Picture> pictures;
|
private final List<Picture> pictures;
|
||||||
private final boolean visibleToSender;
|
private final boolean visibleToSender;
|
||||||
|
|
||||||
public TikTokCommentEvent(WebcastChatMessage msg) {
|
public TikTokCommentEvent(WebcastChatMessage msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
user = User.map(msg.getUser(),msg.getUserIdentity());
|
user = User.map(msg.getUser(), msg.getUserIdentity());
|
||||||
text = msg.getContent();
|
text = msg.getContent();
|
||||||
visibleToSender = msg.getVisibleToSender();
|
visibleToSender = msg.getVisibleToSender();
|
||||||
getUserLanguage = msg.getContentLanguage();
|
userLanguage = msg.getContentLanguage();
|
||||||
mentionedUser = User.map(msg.getAtUser());
|
mentionedUser = User.map(msg.getAtUser());
|
||||||
pictures = msg.getEmotesListList().stream().map(e -> Picture.map(e.getEmote().getImage())).toList();
|
pictures = msg.getEmotesListList().stream().map(e -> Picture.map(e.getEmote().getImage())).toList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
public static TikTokCommentEvent of(String userName, String message) {
|
||||||
|
var builder = WebcastChatMessage.newBuilder();
|
||||||
|
builder.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
|
||||||
|
.setNickname(userName)
|
||||||
|
.setDisplayId(userName)
|
||||||
|
.build());
|
||||||
|
builder.setContentLanguage("en");
|
||||||
|
builder.setVisibleToSender(true);
|
||||||
|
builder.setContent(message);
|
||||||
|
return new TikTokCommentEvent(builder.build());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -25,11 +25,13 @@ import io.github.jwdeveloper.tiktok.annotations.EventMeta;
|
|||||||
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
||||||
import io.github.jwdeveloper.tiktok.data.events.common.TikTokLiveClientEvent;
|
import io.github.jwdeveloper.tiktok.data.events.common.TikTokLiveClientEvent;
|
||||||
|
|
||||||
/**
|
|
||||||
* Triggered when the connection is successfully established.
|
|
||||||
*/
|
|
||||||
@EventMeta(eventType = EventType.Control)
|
@EventMeta(eventType = EventType.Control)
|
||||||
public class TikTokConnectedEvent extends TikTokLiveClientEvent
|
public class TikTokConnectedEvent extends TikTokLiveClientEvent
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public static TikTokConnectedEvent of()
|
||||||
|
{
|
||||||
|
return new TikTokConnectedEvent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -30,14 +30,10 @@ import lombok.Getter;
|
|||||||
@Getter
|
@Getter
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokDetectEvent extends TikTokHeaderEvent {
|
public class TikTokDetectEvent extends TikTokHeaderEvent {
|
||||||
String language;
|
private final String language;
|
||||||
|
|
||||||
|
public TikTokDetectEvent(WebcastMsgDetectMessage msg) {
|
||||||
public TikTokDetectEvent(WebcastMsgDetectMessage msg) {
|
super(msg.getCommon());
|
||||||
super(msg.getCommon());
|
language = msg.getFromRegion();
|
||||||
language = msg.getFromRegion();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -26,13 +26,12 @@ import io.github.jwdeveloper.tiktok.annotations.EventType;
|
|||||||
import io.github.jwdeveloper.tiktok.data.events.common.TikTokLiveClientEvent;
|
import io.github.jwdeveloper.tiktok.data.events.common.TikTokLiveClientEvent;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
|
||||||
* Triggered when the connection gets disconnected. In that case you can call connect() again to have a reconnect logic.
|
@Getter
|
||||||
* Note that you should wait a little bit before attempting a reconnect to to avoid being rate-limited.
|
|
||||||
*/
|
|
||||||
@EventMeta(eventType = EventType.Control)
|
@EventMeta(eventType = EventType.Control)
|
||||||
public class TikTokDisconnectedEvent extends TikTokLiveClientEvent {
|
public class TikTokDisconnectedEvent extends TikTokLiveClientEvent {
|
||||||
@Getter private final String reason;
|
private final String reason;
|
||||||
|
|
||||||
public TikTokDisconnectedEvent(String reason) {
|
public TikTokDisconnectedEvent(String reason) {
|
||||||
this.reason = reason.isBlank() ? "None" : reason;
|
this.reason = reason.isBlank() ? "None" : reason;
|
||||||
}
|
}
|
||||||
@@ -40,4 +39,10 @@ public class TikTokDisconnectedEvent extends TikTokLiveClientEvent {
|
|||||||
public TikTokDisconnectedEvent() {
|
public TikTokDisconnectedEvent() {
|
||||||
this("None");
|
this("None");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static TikTokDisconnectedEvent of(String reason)
|
||||||
|
{
|
||||||
|
return new TikTokDisconnectedEvent(reason);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -36,9 +36,9 @@ import lombok.Value;
|
|||||||
@Value
|
@Value
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokEnvelopeEvent extends TikTokHeaderEvent {
|
public class TikTokEnvelopeEvent extends TikTokHeaderEvent {
|
||||||
User user;
|
User user;
|
||||||
public TikTokEnvelopeEvent(WebcastEnvelopeMessage msg) {
|
public TikTokEnvelopeEvent(WebcastEnvelopeMessage msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
user = User.map(msg.getEnvelopeInfo());
|
user = User.map(msg.getEnvelopeInfo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -25,16 +25,18 @@ package io.github.jwdeveloper.tiktok.data.events;
|
|||||||
import io.github.jwdeveloper.tiktok.annotations.EventMeta;
|
import io.github.jwdeveloper.tiktok.annotations.EventMeta;
|
||||||
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
||||||
import io.github.jwdeveloper.tiktok.data.events.common.TikTokLiveClientEvent;
|
import io.github.jwdeveloper.tiktok.data.events.common.TikTokLiveClientEvent;
|
||||||
|
import io.github.jwdeveloper.tiktok.exceptions.TikTokLiveException;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
|
||||||
* General error event. You should handle this.
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@EventMeta(eventType = EventType.Control)
|
@EventMeta(eventType = EventType.Control)
|
||||||
public class TikTokErrorEvent extends TikTokLiveClientEvent
|
public class TikTokErrorEvent extends TikTokLiveClientEvent {
|
||||||
{
|
|
||||||
private final Throwable exception;
|
private final Throwable exception;
|
||||||
|
|
||||||
|
|
||||||
|
public static TikTokErrorEvent of(String message) {
|
||||||
|
return new TikTokErrorEvent(new TikTokLiveException(message));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -34,9 +34,10 @@ import java.util.List;
|
|||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokIMDeleteEvent extends TikTokHeaderEvent {
|
public class TikTokIMDeleteEvent extends TikTokHeaderEvent {
|
||||||
|
|
||||||
List<Long> userIds;
|
private final List<Long> msgIds, userIds;
|
||||||
public TikTokIMDeleteEvent(WebcastImDeleteMessage msg) {
|
public TikTokIMDeleteEvent(WebcastImDeleteMessage msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
|
this.msgIds = msg.getDeleteMsgIdsListList();
|
||||||
this.userIds = msg.getDeleteUserIdsListList();
|
this.userIds = msg.getDeleteUserIdsListList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -31,10 +31,10 @@ import lombok.Getter;
|
|||||||
@Getter
|
@Getter
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokInRoomBannerEvent extends TikTokHeaderEvent {
|
public class TikTokInRoomBannerEvent extends TikTokHeaderEvent {
|
||||||
private final String json;
|
private final String json;
|
||||||
|
|
||||||
public TikTokInRoomBannerEvent(WebcastInRoomBannerMessage msg) {
|
public TikTokInRoomBannerEvent(WebcastInRoomBannerMessage msg) {
|
||||||
super(msg.getHeader());
|
super(msg.getHeader());
|
||||||
json = msg.getJson();
|
json = msg.getJson();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -33,11 +33,7 @@ import lombok.Getter;
|
|||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokLinkLayerEvent extends TikTokHeaderEvent {
|
public class TikTokLinkLayerEvent extends TikTokHeaderEvent {
|
||||||
|
|
||||||
|
|
||||||
public TikTokLinkLayerEvent(WebcastLinkLayerMessage msg) {
|
public TikTokLinkLayerEvent(WebcastLinkLayerMessage msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -27,12 +27,12 @@ import io.github.jwdeveloper.tiktok.annotations.EventType;
|
|||||||
import io.github.jwdeveloper.tiktok.data.events.common.TikTokHeaderEvent;
|
import io.github.jwdeveloper.tiktok.data.events.common.TikTokHeaderEvent;
|
||||||
import io.github.jwdeveloper.tiktok.data.models.LinkMicArmy;
|
import io.github.jwdeveloper.tiktok.data.models.LinkMicArmy;
|
||||||
import io.github.jwdeveloper.tiktok.data.models.Picture;
|
import io.github.jwdeveloper.tiktok.data.models.Picture;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.enums.LinkMicBattleStatus;
|
||||||
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMicArmies;
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMicArmies;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Triggered every time a battle participant receives points. Contains the current status of the battle and the army that suported the group.
|
* Triggered every time a battle participant receives points. Contains the current status of the battle and the army that suported the group.
|
||||||
*/
|
*/
|
||||||
@@ -40,8 +40,10 @@ import java.util.List;
|
|||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokLinkMicArmiesEvent extends TikTokHeaderEvent {
|
public class TikTokLinkMicArmiesEvent extends TikTokHeaderEvent {
|
||||||
private final Long battleId;
|
private final Long battleId;
|
||||||
|
/**
|
||||||
private final Integer battleStatus;
|
true if battle is finished otherwise false
|
||||||
|
*/
|
||||||
|
private final boolean finished;
|
||||||
|
|
||||||
private final Picture picture;
|
private final Picture picture;
|
||||||
|
|
||||||
@@ -52,6 +54,6 @@ public class TikTokLinkMicArmiesEvent extends TikTokHeaderEvent {
|
|||||||
battleId = msg.getId();
|
battleId = msg.getId();
|
||||||
armies = msg.getBattleItemsList().stream().map(LinkMicArmy::new).toList();
|
armies = msg.getBattleItemsList().stream().map(LinkMicArmy::new).toList();
|
||||||
picture = Picture.map(msg.getImage());
|
picture = Picture.map(msg.getImage());
|
||||||
battleStatus = msg.getBattleStatus();
|
finished = msg.getBattleStatus() == LinkMicBattleStatus.ARMY_FINISHED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -22,29 +22,62 @@
|
|||||||
*/
|
*/
|
||||||
package io.github.jwdeveloper.tiktok.data.events;
|
package io.github.jwdeveloper.tiktok.data.events;
|
||||||
|
|
||||||
import io.github.jwdeveloper.tiktok.annotations.EventMeta;
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
|
||||||
import io.github.jwdeveloper.tiktok.data.events.common.TikTokHeaderEvent;
|
import io.github.jwdeveloper.tiktok.data.events.common.TikTokHeaderEvent;
|
||||||
import io.github.jwdeveloper.tiktok.data.models.LinkMicBattleTeam;
|
import io.github.jwdeveloper.tiktok.data.models.battles.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.enums.LinkMicBattleStatus;
|
||||||
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMicBattle;
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMicBattle;
|
||||||
import lombok.Getter;
|
import lombok.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Triggered every time a battle starts.
|
* Triggered every time a battle starts & ends
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokLinkMicBattleEvent extends TikTokHeaderEvent {
|
public class TikTokLinkMicBattleEvent extends TikTokHeaderEvent
|
||||||
private final Long battleId;
|
{
|
||||||
private final List<LinkMicBattleTeam> team1;
|
private final Long battleId;
|
||||||
private final List<LinkMicBattleTeam> team2;
|
/**
|
||||||
|
true if battle is finished otherwise false
|
||||||
|
*/
|
||||||
|
private final boolean finished;
|
||||||
|
private final List<Team> teams;
|
||||||
|
|
||||||
public TikTokLinkMicBattleEvent(WebcastLinkMicBattle msg) {
|
public TikTokLinkMicBattleEvent(WebcastLinkMicBattle msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
battleId = msg.getId();
|
battleId = msg.getId();
|
||||||
team1 = msg.getTeams1List().stream().map(LinkMicBattleTeam::new).toList();
|
finished = msg.getBattleStatus() == LinkMicBattleStatus.BATTLE_FINISHED;
|
||||||
team2 = msg.getTeams2List().stream().map(LinkMicBattleTeam::new).toList();
|
teams = new ArrayList<>();
|
||||||
}
|
if (msg.getHostTeamCount() == 2) { // 1v1 battle
|
||||||
}
|
teams.add(new Team1v1(msg.getHostTeam(0), msg));
|
||||||
|
teams.add(new Team1v1(msg.getHostTeam(1), msg));
|
||||||
|
} else { // 2v2 battle
|
||||||
|
if (isFinished()) {
|
||||||
|
teams.add(new Team2v2(msg.getHostData2V2List().stream().filter(data -> data.getTeamNumber() == 1).findFirst().orElse(null), msg));
|
||||||
|
teams.add(new Team2v2(msg.getHostData2V2List().stream().filter(data -> data.getTeamNumber() == 2).findFirst().orElse(null), msg));
|
||||||
|
} else {
|
||||||
|
teams.add(new Team2v2(msg.getHostTeam(0), msg.getHostTeam(1), msg));
|
||||||
|
teams.add(new Team2v2(msg.getHostTeam(2), msg.getHostTeam(3), msg));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Info:
|
||||||
|
// - msg.getDetailsList() & msg.getViewerTeamList() both only have content when battle is finished
|
||||||
|
// - msg.getDetailsCount() & msg.getViewerTeamCount() always is 2 only when battle is finished
|
||||||
|
// - msg.getHostTeamCount() always is 2 for 1v1 or 4 for 2v2
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean is1v1() {
|
||||||
|
return teams.get(0) instanceof Team1v1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean is2v2() {
|
||||||
|
return teams.get(0) instanceof Team2v2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTie() {
|
||||||
|
return isFinished() && teams.get(0).getTotalPoints() == teams.get(1).getTotalPoints();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -32,10 +32,8 @@ import lombok.Getter;
|
|||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokLinkMicMethodEvent extends TikTokHeaderEvent {
|
public class TikTokLinkMicMethodEvent extends TikTokHeaderEvent {
|
||||||
|
|
||||||
public TikTokLinkMicMethodEvent(WebcastLinkMicMethod msg) {
|
public TikTokLinkMicMethodEvent(WebcastLinkMicMethod msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -24,11 +24,14 @@ package io.github.jwdeveloper.tiktok.data.events;
|
|||||||
import io.github.jwdeveloper.tiktok.annotations.EventMeta;
|
import io.github.jwdeveloper.tiktok.annotations.EventMeta;
|
||||||
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
||||||
import io.github.jwdeveloper.tiktok.data.events.common.TikTokEvent;
|
import io.github.jwdeveloper.tiktok.data.events.common.TikTokEvent;
|
||||||
|
import io.github.jwdeveloper.tiktok.data.events.control.TikTokConnectingEvent;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Triggered when the live stream gets terminated by the host. Will also trigger the TikTokDisconnectedEvent event.
|
|
||||||
*/
|
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokLiveEndedEvent extends TikTokEvent {
|
public class TikTokLiveEndedEvent extends TikTokEvent {
|
||||||
|
|
||||||
|
|
||||||
|
public static TikTokLiveEndedEvent of() {
|
||||||
|
return new TikTokLiveEndedEvent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -29,9 +29,7 @@ import io.github.jwdeveloper.tiktok.data.models.users.User;
|
|||||||
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastQuestionNewMessage;
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastQuestionNewMessage;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/*
|
|
||||||
Triggered every time someone asks a new question via the question feature.
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokQuestionEvent extends TikTokHeaderEvent {
|
public class TikTokQuestionEvent extends TikTokHeaderEvent {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -32,15 +32,14 @@ import lombok.Getter;
|
|||||||
@Getter
|
@Getter
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokRankTextEvent extends TikTokHeaderEvent {
|
public class TikTokRankTextEvent extends TikTokHeaderEvent {
|
||||||
private final String eventType;
|
private final String eventType;
|
||||||
|
|
||||||
private final String label;
|
private final String label;
|
||||||
|
|
||||||
public TikTokRankTextEvent(WebcastRankTextMessage msg) {
|
public TikTokRankTextEvent(WebcastRankTextMessage msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
var text = Text.map(msg.getSelfGetBadgeMsg());
|
var text = Text.map(msg.getSelfGetBadgeMsg());
|
||||||
label = text.getPattern();
|
label = text.getPattern();
|
||||||
eventType = text.getKey();
|
eventType = text.getKey();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -33,13 +33,11 @@ import lombok.Getter;
|
|||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokRankUpdateEvent extends TikTokHeaderEvent {
|
public class TikTokRankUpdateEvent extends TikTokHeaderEvent {
|
||||||
|
|
||||||
public TikTokRankUpdateEvent(WebcastHourlyRankMessage msg) {
|
public TikTokRankUpdateEvent(WebcastHourlyRankMessage msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
public TikTokRankUpdateEvent(WebcastRankUpdateMessage msg) {
|
||||||
|
super(msg.getCommon());
|
||||||
public TikTokRankUpdateEvent(WebcastRankUpdateMessage msg) {
|
}
|
||||||
super(msg.getCommon());
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -32,25 +32,24 @@ import lombok.Getter;
|
|||||||
@Getter
|
@Getter
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokShopEvent extends TikTokHeaderEvent {
|
public class TikTokShopEvent extends TikTokHeaderEvent {
|
||||||
private final String title;
|
private final String title;
|
||||||
|
|
||||||
private final String price;
|
private final String price;
|
||||||
|
|
||||||
private final Picture picture;
|
private final Picture picture;
|
||||||
|
|
||||||
private final String shopUrl;
|
private final String shopUrl;
|
||||||
|
|
||||||
private final String shopName;
|
private final String shopName;
|
||||||
|
|
||||||
//Not working
|
//Not working
|
||||||
public TikTokShopEvent(WebcastOecLiveShoppingMessage msg) {
|
public TikTokShopEvent(WebcastOecLiveShoppingMessage msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
var data = msg.getShopData();
|
var data = msg.getShopData();
|
||||||
title = data.getTitle();
|
title = data.getTitle();
|
||||||
price = data.getPriceString();
|
price = data.getPriceString();
|
||||||
picture = new Picture(data.getImageUrl());
|
picture = new Picture(data.getImageUrl());
|
||||||
shopUrl = data.getShopUrl();
|
shopUrl = data.getShopUrl();
|
||||||
shopName = data.getShopName();
|
shopName = data.getShopName();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -31,15 +31,13 @@ import io.github.jwdeveloper.tiktok.messages.webcast.WebcastMemberMessage;
|
|||||||
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastSubNotifyMessage;
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastSubNotifyMessage;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
|
||||||
* Triggers when a user creates a subscription.
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokSubscribeEvent extends TikTokHeaderEvent
|
public class TikTokSubscribeEvent extends TikTokHeaderEvent {
|
||||||
{
|
|
||||||
private final User user;
|
private final User user;
|
||||||
|
|
||||||
|
|
||||||
public TikTokSubscribeEvent(WebcastMemberMessage msg) {
|
public TikTokSubscribeEvent(WebcastMemberMessage msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
user = User.map(msg.getUser());
|
user = User.map(msg.getUser());
|
||||||
@@ -52,4 +50,12 @@ public class TikTokSubscribeEvent extends TikTokHeaderEvent
|
|||||||
user.addAttribute(UserAttribute.Subscriber);
|
user.addAttribute(UserAttribute.Subscriber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static TikTokSubscribeEvent of(String userName) {
|
||||||
|
return new TikTokSubscribeEvent(WebcastMemberMessage.newBuilder()
|
||||||
|
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
|
||||||
|
.setDisplayId(userName)
|
||||||
|
.setNickname(userName)
|
||||||
|
.build())
|
||||||
|
.build());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -26,9 +26,6 @@ package io.github.jwdeveloper.tiktok.data.events.common;
|
|||||||
import io.github.jwdeveloper.tiktok.utils.JsonUtil;
|
import io.github.jwdeveloper.tiktok.utils.JsonUtil;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
|
||||||
* Base class for all events
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
public abstract class TikTokEvent {
|
public abstract class TikTokEvent {
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -31,7 +31,9 @@ import io.github.jwdeveloper.tiktok.data.events.common.TikTokLiveClientEvent;
|
|||||||
* Triggered when client is connecting to live is successfully established.
|
* Triggered when client is connecting to live is successfully established.
|
||||||
*/
|
*/
|
||||||
@EventMeta(eventType = EventType.Control)
|
@EventMeta(eventType = EventType.Control)
|
||||||
public class TikTokConnectingEvent extends TikTokLiveClientEvent
|
public class TikTokConnectingEvent extends TikTokLiveClientEvent {
|
||||||
{
|
|
||||||
|
|
||||||
|
public static TikTokConnectingEvent of() {
|
||||||
|
return new TikTokConnectingEvent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -27,15 +27,14 @@ import io.github.jwdeveloper.tiktok.data.events.common.TikTokLiveClientEvent;
|
|||||||
import io.github.jwdeveloper.tiktok.data.requests.*;
|
import io.github.jwdeveloper.tiktok.data.requests.*;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
/**
|
|
||||||
* Triggered before the connection is established.
|
@Getter
|
||||||
*/
|
|
||||||
@EventMeta(eventType = EventType.Control)
|
@EventMeta(eventType = EventType.Control)
|
||||||
public class TikTokPreConnectionEvent extends TikTokLiveClientEvent
|
public class TikTokPreConnectionEvent extends TikTokLiveClientEvent
|
||||||
{
|
{
|
||||||
@Getter private final LiveUserData.Response userData;
|
private final LiveUserData.Response userData;
|
||||||
@Getter private final LiveData.Response roomData;
|
private final LiveData.Response roomData;
|
||||||
@Getter @Setter boolean cancelConnection = false;
|
@Setter boolean cancelConnection = false;
|
||||||
|
|
||||||
public TikTokPreConnectionEvent(LiveUserData.Response userData, LiveData.Response liveData) {
|
public TikTokPreConnectionEvent(LiveUserData.Response userData, LiveData.Response liveData) {
|
||||||
this.userData = userData;
|
this.userData = userData;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -23,32 +23,27 @@
|
|||||||
package io.github.jwdeveloper.tiktok.data.events.gift;
|
package io.github.jwdeveloper.tiktok.data.events.gift;
|
||||||
|
|
||||||
import io.github.jwdeveloper.tiktok.annotations.*;
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.data.models.Picture;
|
||||||
import io.github.jwdeveloper.tiktok.data.models.gifts.*;
|
import io.github.jwdeveloper.tiktok.data.models.gifts.*;
|
||||||
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
||||||
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastGiftMessage;
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastGiftMessage;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Triggered every time gift is sent
|
|
||||||
*
|
|
||||||
* @see GiftSendType it has 3 states
|
|
||||||
*
|
|
||||||
* <p>Example when user sends gift with combo</p>
|
|
||||||
* <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>
|
|
||||||
* Remember if comboState is Finsihed both TikTokGiftComboEvent and TikTokGiftEvent event gets triggered
|
|
||||||
*/
|
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
@Getter
|
@Getter
|
||||||
public class TikTokGiftComboEvent extends TikTokGiftEvent {
|
public class TikTokGiftComboEvent extends TikTokGiftEvent {
|
||||||
private final GiftSendType comboState;
|
private final GiftComboStateType comboState;
|
||||||
|
|
||||||
public TikTokGiftComboEvent(Gift gift, User host, WebcastGiftMessage msg, GiftSendType comboState) {
|
public TikTokGiftComboEvent(Gift gift, User host, WebcastGiftMessage msg, GiftComboStateType comboState) {
|
||||||
super(gift, host, msg);
|
super(gift, host, msg);
|
||||||
this.comboState = comboState;
|
this.comboState = comboState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static TikTokGiftComboEvent of(Gift gift, int combo, GiftComboStateType comboState) {
|
||||||
|
return new TikTokGiftComboEvent(
|
||||||
|
gift,
|
||||||
|
new User(0L, "Test", new Picture("")),
|
||||||
|
WebcastGiftMessage.newBuilder().setComboCount(combo).build(),
|
||||||
|
comboState);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -22,20 +22,14 @@
|
|||||||
*/
|
*/
|
||||||
package io.github.jwdeveloper.tiktok.data.events.gift;
|
package io.github.jwdeveloper.tiktok.data.events.gift;
|
||||||
|
|
||||||
|
|
||||||
import io.github.jwdeveloper.tiktok.annotations.*;
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
import io.github.jwdeveloper.tiktok.data.events.common.TikTokHeaderEvent;
|
import io.github.jwdeveloper.tiktok.data.events.common.TikTokHeaderEvent;
|
||||||
|
import io.github.jwdeveloper.tiktok.data.models.Picture;
|
||||||
import io.github.jwdeveloper.tiktok.data.models.gifts.*;
|
import io.github.jwdeveloper.tiktok.data.models.gifts.*;
|
||||||
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
||||||
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastGiftMessage;
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastGiftMessage;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Triggered when user sends gifts that has
|
|
||||||
* no combo (most of expensive gifts)
|
|
||||||
* or if combo has finished
|
|
||||||
*/
|
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
@Getter
|
@Getter
|
||||||
public class TikTokGiftEvent extends TikTokHeaderEvent {
|
public class TikTokGiftEvent extends TikTokHeaderEvent {
|
||||||
@@ -55,4 +49,20 @@ public class TikTokGiftEvent extends TikTokHeaderEvent {
|
|||||||
}
|
}
|
||||||
combo = msg.getComboCount();
|
combo = msg.getComboCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TikTokGiftEvent(Gift gift) {
|
||||||
|
this.gift = gift;
|
||||||
|
user = new User(0L, "sender", new Picture(""));
|
||||||
|
toUser = new User(0L, "receiver", new Picture(""));
|
||||||
|
combo = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static TikTokGiftEvent of(Gift gift) {
|
||||||
|
return new TikTokGiftEvent(gift);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static TikTokGiftEvent of(String name, int id, int diamonds) {
|
||||||
|
return TikTokGiftEvent.of(new Gift(id, name, diamonds, ""));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -20,34 +20,26 @@
|
|||||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package io.github.jwdeveloper.tiktok.tools.db.tables;
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
import java.io.PrintWriter;
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
import java.io.StringWriter;
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
public class ExceptionInfoModel
|
@Getter
|
||||||
{
|
@EventMeta(eventType = EventType.Message)
|
||||||
private String message;
|
public class TikTokLinkAcceptNoticeEvent extends TikTokLinkEvent {
|
||||||
private String stackTrace;
|
|
||||||
|
|
||||||
public ExceptionInfoModel(Throwable throwable) {
|
private final long fromUserId, fromRoomId, toUserId;
|
||||||
this.message = throwable.getMessage();
|
|
||||||
this.stackTrace = getStackTraceAsString(throwable);
|
public TikTokLinkAcceptNoticeEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasAcceptNoticeContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with Accept Notice Content!");
|
||||||
|
|
||||||
|
var content = msg.getAcceptNoticeContent();
|
||||||
|
this.fromUserId = content.getFromUserId();
|
||||||
|
this.fromRoomId = content.getFromRoomId();
|
||||||
|
this.toUserId = content.getToUserId();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public static String getStackTraceAsString(Throwable throwable) {
|
|
||||||
StringWriter sw = new StringWriter();
|
|
||||||
PrintWriter pw = new PrintWriter(sw);
|
|
||||||
throwable.printStackTrace(pw);
|
|
||||||
return sw.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Getters for message and stackTrace
|
|
||||||
public String getMessage() {
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStackTrace() {
|
|
||||||
return stackTrace;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -20,17 +20,17 @@
|
|||||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package io.github.jwdeveloper.tiktok.tools.tester.mockClient;
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
public class TikTokLiveMock
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
{
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
public static TikTokMockBuilder create(String host)
|
import lombok.Getter;
|
||||||
{
|
|
||||||
return new TikTokMockBuilder(host);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static TikTokMockBuilder create()
|
@Getter
|
||||||
{
|
@EventMeta(eventType = EventType.Message)
|
||||||
return create("MockHostName");
|
public class TikTokLinkApplyEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
public TikTokLinkApplyEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkCancelEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
private final long fromUserId, toUserId, cancelType, actionId;
|
||||||
|
|
||||||
|
public TikTokLinkCancelEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasCancelContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with Cancel Content!");
|
||||||
|
|
||||||
|
var content = msg.getCancelContent();
|
||||||
|
this.fromUserId = content.getFromUserId();
|
||||||
|
this.toUserId = content.getToUserId();
|
||||||
|
this.cancelType = content.getCancelType();
|
||||||
|
this.actionId = content.getActionId();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -20,19 +20,20 @@
|
|||||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package io.github.jwdeveloper.tiktok.data.events.http;
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
import io.github.jwdeveloper.tiktok.annotations.EventMeta;
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
import io.github.jwdeveloper.tiktok.data.events.common.TikTokEvent;
|
|
||||||
import io.github.jwdeveloper.tiktok.data.requests.LiveData;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@EventMeta(eventType = EventType.Message)
|
||||||
@EventMeta(eventType = EventType.Debug)
|
public class TikTokLinkCloseEvent extends TikTokLinkEvent {
|
||||||
public class TikTokRoomDataResponseEvent extends TikTokEvent
|
|
||||||
{
|
public TikTokLinkCloseEvent(WebcastLinkMessage msg) {
|
||||||
private final LiveData.Response liveData;
|
super(msg);
|
||||||
}
|
// if (!msg.hasCloseContent())
|
||||||
|
// throw new IllegalArgumentException("Expected WebcastLinkMessage with Close Content!");
|
||||||
|
// Proto Empty
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkCohostListChangeEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
public TikTokLinkCohostListChangeEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
// if (!msg.hasCohostListChangeContent())
|
||||||
|
// throw new IllegalArgumentException("Expected WebcastLinkMessage with Cohost List Change Content!");
|
||||||
|
// Proto Empty
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkCreateEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
private final long hostId, roomId, linkType;
|
||||||
|
public TikTokLinkCreateEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasCreateContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with Create Content!");
|
||||||
|
|
||||||
|
var content = msg.getCreateContent();
|
||||||
|
this.hostId = content.getOwnerId();
|
||||||
|
this.roomId = content.getOwnerRoomId();
|
||||||
|
this.linkType = content.getLinkType();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.data.models.users.ListUser;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkEnterEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
private final List<ListUser> listUsers;
|
||||||
|
private final int anchorMultiLiveEnum;
|
||||||
|
|
||||||
|
public TikTokLinkEnterEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasEnterContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with Enter Content!");
|
||||||
|
|
||||||
|
var content = msg.getEnterContent();
|
||||||
|
this.listUsers = content.getLinkedUsersListList().stream().map(ListUser::map).toList();
|
||||||
|
this.anchorMultiLiveEnum = content.getAnchorMultiLiveEnum();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -20,24 +20,24 @@
|
|||||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package io.github.jwdeveloper.tiktok.data.events;
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
import io.github.jwdeveloper.tiktok.annotations.EventMeta;
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
|
||||||
import io.github.jwdeveloper.tiktok.data.events.common.TikTokHeaderEvent;
|
import io.github.jwdeveloper.tiktok.data.events.common.TikTokHeaderEvent;
|
||||||
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
|
||||||
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokLinkEvent extends TikTokHeaderEvent {
|
public class TikTokLinkEvent extends TikTokHeaderEvent {
|
||||||
|
|
||||||
|
private final String extra, transferExtra;
|
||||||
|
private final long expireTimestamp;
|
||||||
|
|
||||||
public TikTokLinkEvent(WebcastLinkMessage msg) {
|
public TikTokLinkEvent(WebcastLinkMessage msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
|
this.extra = msg.getExtra();
|
||||||
|
this.expireTimestamp = msg.getExpireTimestamp();
|
||||||
|
this.transferExtra = msg.getTransferExtra();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -20,24 +20,27 @@
|
|||||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package io.github.jwdeveloper.tiktok.gifts;
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
import io.github.jwdeveloper.tiktok.data.models.gifts.GiftOld;
|
|
||||||
import io.github.jwdeveloper.tiktok.data.models.Picture;
|
|
||||||
import org.junit.jupiter.api.Assertions;
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
|
||||||
import org.mockito.InjectMocks;
|
|
||||||
import org.mockito.junit.jupiter.MockitoExtension;
|
|
||||||
|
|
||||||
|
|
||||||
@ExtendWith(MockitoExtension.class)
|
|
||||||
|
|
||||||
public class TikTokGiftManagerTest {
|
|
||||||
|
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkInviteEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
private final long roomId;
|
||||||
|
private final User inviter;
|
||||||
|
|
||||||
|
public TikTokLinkInviteEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasInviteContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with Invite Content!");
|
||||||
|
|
||||||
|
var content = msg.getInviteContent();
|
||||||
|
this.roomId = content.getFromRoomId();
|
||||||
|
this.inviter = User.map(content.getFromUser());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkKickOutEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
private final long fromUserId;
|
||||||
|
private final KickOutReason kickOutReason;
|
||||||
|
|
||||||
|
public TikTokLinkKickOutEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasKickOutContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with Kick Out Content!");
|
||||||
|
|
||||||
|
var content = msg.getKickOutContent();
|
||||||
|
this.fromUserId = content.getFromUserId();
|
||||||
|
this.kickOutReason = KickOutReason.values()[content.getKickoutReasonValue()];
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum KickOutReason {
|
||||||
|
KICKOUT_REASON_UNKNOWN,
|
||||||
|
KICKOUT_REASON_FIRST_FRAME_TIMEOUT,
|
||||||
|
KICKOUT_REASON_BY_HOST,
|
||||||
|
KICKOUT_REASON_RTC_LOST_CONNECTION,
|
||||||
|
KICKOUT_REASON_BY_PUNISH,
|
||||||
|
KICKOUT_REASON_BY_ADMIN,
|
||||||
|
KICKOUT_REASON_HOST_REMOVE_ALL_GUESTS
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkLeaveEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
private final long userId, sendLeaveUid, leaveReason;
|
||||||
|
private final String linkmicIdStr;
|
||||||
|
|
||||||
|
public TikTokLinkLeaveEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasLeaveContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with Leave Content!");
|
||||||
|
|
||||||
|
var content = msg.getLeaveContent();
|
||||||
|
this.userId = content.getUserId();
|
||||||
|
this.linkmicIdStr = content.getLinkmicIdStr();
|
||||||
|
this.sendLeaveUid = content.getSendLeaveUid();
|
||||||
|
this.leaveReason = content.getLeaveReason();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkLinkedListChangeEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
public TikTokLinkLinkedListChangeEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
// if (!msg.hasLinkedListChangeContent())
|
||||||
|
// throw new IllegalArgumentException("Expected WebcastLinkMessage with Linked List Change Content!");
|
||||||
|
// Proto Empty
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.data.models.users.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkListChangeEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
private final List<ListUser> linkedUsers, appliedUsers, connectingUsers;
|
||||||
|
|
||||||
|
public TikTokLinkListChangeEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasListChangeContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with List Change Content!");
|
||||||
|
|
||||||
|
var content = msg.getListChangeContent();
|
||||||
|
this.linkedUsers = content.getLinkedUsersList().stream().map(ListUser::map).toList();
|
||||||
|
this.appliedUsers = content.getAppliedUsersList().stream().map(ListUser::map).toList();
|
||||||
|
this.connectingUsers = content.getConnectingUsersList().stream().map(ListUser::map).toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkMediaChangeEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
private final long op, toUserId, anchorId, roomId, changeScene;
|
||||||
|
|
||||||
|
public TikTokLinkMediaChangeEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasMediaChangeContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with Media Change Content!");
|
||||||
|
|
||||||
|
var content = msg.getMediaChangeContent();
|
||||||
|
this.op = content.getOp();
|
||||||
|
this.toUserId = content.getToUserId();
|
||||||
|
this.anchorId = content.getAnchorId();
|
||||||
|
this.roomId = content.getRoomId();
|
||||||
|
this.changeScene = content.getChangeScene();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -20,24 +20,20 @@
|
|||||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package io.github.jwdeveloper.tiktok.data.events;
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
import io.github.jwdeveloper.tiktok.annotations.EventMeta;
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
import io.github.jwdeveloper.tiktok.data.events.common.TikTokHeaderEvent;
|
import lombok.Getter;
|
||||||
|
|
||||||
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
@Getter
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class CustomEvent extends TikTokHeaderEvent {
|
public class TikTokLinkMicIdxUpdateEvent extends TikTokLinkEvent {
|
||||||
private final User user;
|
|
||||||
private final String title;
|
|
||||||
|
|
||||||
public CustomEvent(User user, String title) {
|
public TikTokLinkMicIdxUpdateEvent(WebcastLinkMessage msg) {
|
||||||
this.user = user;
|
super(msg);
|
||||||
this.title = title;
|
// if (!msg.hasMicIdxUpdateContent())
|
||||||
|
// throw new IllegalArgumentException("Expected WebcastLinkMessage with Mic Idx Update Content!");
|
||||||
|
// Proto Empty
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkMuteEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
private final long userId, status;
|
||||||
|
|
||||||
|
public TikTokLinkMuteEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasMuteContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with Mute Content!");
|
||||||
|
|
||||||
|
var content = msg.getMuteContent();
|
||||||
|
this.userId = content.getUserId();
|
||||||
|
this.status = content.getStatus();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkRandomMatchEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
private final User user;
|
||||||
|
private final long roomId, inviteType, innerChannelId;
|
||||||
|
private final String matchId;
|
||||||
|
|
||||||
|
public TikTokLinkRandomMatchEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasRandomMatchContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with Random Match Content!");
|
||||||
|
|
||||||
|
var content = msg.getRandomMatchContent();
|
||||||
|
this.user = User.map(content.getUser());
|
||||||
|
this.roomId = content.getRoomId();
|
||||||
|
this.inviteType = content.getInviteType();
|
||||||
|
this.matchId = content.getMatchId();
|
||||||
|
this.innerChannelId = content.getInnerChannelId();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkReplyEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
private final long roomId;
|
||||||
|
private final User fromUser, toUser;
|
||||||
|
|
||||||
|
public TikTokLinkReplyEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasReplyContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with Reply Content!");
|
||||||
|
|
||||||
|
var content = msg.getReplyContent();
|
||||||
|
this.roomId = content.getFromRoomId();
|
||||||
|
this.fromUser = User.map(content.getFromUser());
|
||||||
|
this.toUser = User.map(content.getToUser());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkSysKickOutEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
private final long userId;
|
||||||
|
private final String linkmicIdStr;
|
||||||
|
|
||||||
|
public TikTokLinkSysKickOutEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasSysKickOutContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with Sys Kick Out Content!");
|
||||||
|
|
||||||
|
var content = msg.getSysKickOutContent();
|
||||||
|
this.userId = content.getUserId();
|
||||||
|
this.linkmicIdStr = content.getLinkmicIdStr();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkUpdateUserEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
private final long fromUserId, toUserId;
|
||||||
|
|
||||||
|
public TikTokLinkUpdateUserEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasUpdateUserContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with Update User Content!");
|
||||||
|
|
||||||
|
var content = msg.getUpdateUserContent();
|
||||||
|
this.fromUserId = content.getFromUserId();
|
||||||
|
this.toUserId = content.getToUserId();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkUpdateUserSettingEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
public TikTokLinkUpdateUserSettingEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
// if (!msg.hasUpdateUserSettingContent())
|
||||||
|
// throw new IllegalArgumentException("Expected WebcastLinkMessage with Update User Setting Content!");
|
||||||
|
// Proto Empty
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.data.models.Text;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkUserToastEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
private final long userId, roomId;
|
||||||
|
private final Text displayText;
|
||||||
|
|
||||||
|
public TikTokLinkUserToastEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
if (!msg.hasUserToastContent())
|
||||||
|
throw new IllegalArgumentException("Expected WebcastLinkMessage with User Toast Content!");
|
||||||
|
|
||||||
|
var content = msg.getUserToastContent();
|
||||||
|
this.userId = content.getUserId();
|
||||||
|
this.roomId = content.getRoomId();
|
||||||
|
this.displayText = Text.map(content.getDisplayText());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
* a copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
package io.github.jwdeveloper.tiktok.data.events.link;
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.annotations.*;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLinkMessage;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@EventMeta(eventType = EventType.Message)
|
||||||
|
public class TikTokLinkWaitListChangeEvent extends TikTokLinkEvent {
|
||||||
|
|
||||||
|
public TikTokLinkWaitListChangeEvent(WebcastLinkMessage msg) {
|
||||||
|
super(msg);
|
||||||
|
// if (!msg.hasWaitingListChangeContent())
|
||||||
|
// throw new IllegalArgumentException("Expected WebcastLinkMessage with Waiting List Change Content!");
|
||||||
|
// Proto Empty
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -30,13 +30,11 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Triggered when LiveRoomInfo got updated such as likes, viewers, ranking ....
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokRoomInfoEvent extends TikTokEvent
|
public class TikTokRoomInfoEvent extends TikTokEvent
|
||||||
{
|
{
|
||||||
LiveRoomInfo roomInfo;
|
LiveRoomInfo roomInfo;
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -33,15 +33,13 @@ import lombok.Getter;
|
|||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokRoomPinEvent extends TikTokHeaderEvent
|
public class TikTokRoomPinEvent extends TikTokHeaderEvent
|
||||||
{
|
{
|
||||||
|
private final TikTokCommentEvent pinnedMessage;
|
||||||
|
private final long timestamp;
|
||||||
|
|
||||||
private TikTokCommentEvent pinnedMessage;
|
public TikTokRoomPinEvent(WebcastRoomPinMessage msg, TikTokCommentEvent commentEvent)
|
||||||
private long timestamp;
|
{
|
||||||
|
super(msg.getCommon());
|
||||||
public TikTokRoomPinEvent(WebcastRoomPinMessage msg, TikTokCommentEvent commentEvent)
|
this.timestamp = msg.getTimestamp();
|
||||||
{
|
this.pinnedMessage = commentEvent;
|
||||||
super(msg.getCommon());
|
}
|
||||||
this.timestamp = msg.getTimestamp();
|
}
|
||||||
this.pinnedMessage = commentEvent;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -29,20 +29,25 @@ import io.github.jwdeveloper.tiktok.data.models.users.User;
|
|||||||
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastSocialMessage;
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastSocialMessage;
|
||||||
import lombok.Value;
|
import lombok.Value;
|
||||||
|
|
||||||
/**
|
|
||||||
* Triggers when a user follows the streamer. Based on social event.
|
|
||||||
*/
|
|
||||||
@Value
|
@Value
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokFollowEvent extends TikTokHeaderEvent
|
public class TikTokFollowEvent extends TikTokHeaderEvent {
|
||||||
{
|
User user;
|
||||||
User user;
|
int totalFollowers;
|
||||||
int totalFollowers;
|
|
||||||
|
|
||||||
public TikTokFollowEvent(WebcastSocialMessage msg) {
|
public TikTokFollowEvent(WebcastSocialMessage msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
user = User.map(msg.getUser());
|
user = User.map(msg.getUser());
|
||||||
totalFollowers = msg.getFollowCount();
|
totalFollowers = msg.getFollowCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
public static TikTokFollowEvent of(String userName) {
|
||||||
|
return new TikTokFollowEvent(WebcastSocialMessage.newBuilder()
|
||||||
|
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
|
||||||
|
.setDisplayId(userName)
|
||||||
|
.setNickname(userName)
|
||||||
|
.build())
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -26,6 +26,7 @@ import io.github.jwdeveloper.tiktok.annotations.EventMeta;
|
|||||||
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
||||||
import io.github.jwdeveloper.tiktok.data.events.common.TikTokHeaderEvent;
|
import io.github.jwdeveloper.tiktok.data.events.common.TikTokHeaderEvent;
|
||||||
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLikeMessage;
|
||||||
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastMemberMessage;
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastMemberMessage;
|
||||||
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastSocialMessage;
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastSocialMessage;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@@ -47,4 +48,14 @@ public class TikTokJoinEvent extends TikTokHeaderEvent {
|
|||||||
user = User.map(msg.getUser());
|
user = User.map(msg.getUser());
|
||||||
totalUsers = msg.getMemberCount();
|
totalUsers = msg.getMemberCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static TikTokJoinEvent of(String userName)
|
||||||
|
{
|
||||||
|
return new TikTokJoinEvent(WebcastMemberMessage.newBuilder()
|
||||||
|
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
|
||||||
|
.setDisplayId(userName)
|
||||||
|
.setNickname(userName)
|
||||||
|
.build())
|
||||||
|
.build());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -31,9 +31,7 @@ import io.github.jwdeveloper.tiktok.messages.webcast.WebcastSocialMessage;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Triggered when a viewer sends likes to the streamer. For streams with many viewers, this event is not always triggered by TikTok.
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokLikeEvent extends TikTokHeaderEvent
|
public class TikTokLikeEvent extends TikTokHeaderEvent
|
||||||
@@ -57,4 +55,16 @@ public class TikTokLikeEvent extends TikTokHeaderEvent
|
|||||||
likes = msg.getCount();
|
likes = msg.getCount();
|
||||||
totalLikes = msg.getTotal();
|
totalLikes = msg.getTotal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static TikTokLikeEvent of(String userName, int likes)
|
||||||
|
{
|
||||||
|
return new TikTokLikeEvent(WebcastLikeMessage.newBuilder()
|
||||||
|
.setCount(likes)
|
||||||
|
.setTotal(likes)
|
||||||
|
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
|
||||||
|
.setDisplayId(userName)
|
||||||
|
.setNickname(userName)
|
||||||
|
.build())
|
||||||
|
.build());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -26,28 +26,35 @@ import io.github.jwdeveloper.tiktok.annotations.EventMeta;
|
|||||||
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
||||||
import io.github.jwdeveloper.tiktok.data.events.common.TikTokHeaderEvent;
|
import io.github.jwdeveloper.tiktok.data.events.common.TikTokHeaderEvent;
|
||||||
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
||||||
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastLikeMessage;
|
||||||
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastSocialMessage;
|
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastSocialMessage;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
|
||||||
* Triggers when a user shares the stream. Based on social event.
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@EventMeta(eventType = EventType.Message)
|
@EventMeta(eventType = EventType.Message)
|
||||||
public class TikTokShareEvent extends TikTokHeaderEvent {
|
public class TikTokShareEvent extends TikTokHeaderEvent {
|
||||||
private final User user;
|
private final User user;
|
||||||
private final int totalShares;
|
private final int totalShares;
|
||||||
|
|
||||||
public TikTokShareEvent(WebcastSocialMessage msg, Integer amount) {
|
public TikTokShareEvent(WebcastSocialMessage msg, Integer amount) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
user = User.map(msg.getUser());
|
user = User.map(msg.getUser());
|
||||||
this.totalShares = amount;
|
this.totalShares = amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TikTokShareEvent(WebcastSocialMessage msg) {
|
public TikTokShareEvent(WebcastSocialMessage msg) {
|
||||||
super(msg.getCommon());
|
super(msg.getCommon());
|
||||||
user = User.map(msg.getUser());
|
user = User.map(msg.getUser());
|
||||||
totalShares = 1;
|
totalShares = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
public static TikTokShareEvent of(String userName, int shaders) {
|
||||||
|
return new TikTokShareEvent(WebcastSocialMessage.newBuilder()
|
||||||
|
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
|
||||||
|
.setDisplayId(userName)
|
||||||
|
.setNickname(userName)
|
||||||
|
.build())
|
||||||
|
.build(), shaders);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -35,10 +35,7 @@ import lombok.Value;
|
|||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Triggered every time TikTok sends data. Data incoming as protobuf message.
|
|
||||||
* You can deserialize the binary object depending on the use case.
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@EventMeta(eventType = EventType.Debug)
|
@EventMeta(eventType = EventType.Debug)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -29,9 +29,7 @@ import io.github.jwdeveloper.tiktok.messages.webcast.WebcastResponse;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Triggered every time a protobuf encoded webcast message arrives. You can deserialize the binary object depending on the use case.
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@EventMeta(eventType = EventType.Debug)
|
@EventMeta(eventType = EventType.Debug)
|
||||||
public class TikTokWebsocketUnhandledMessageEvent extends TikTokUnhandledEvent<WebcastResponse.Message>
|
public class TikTokWebsocketUnhandledMessageEvent extends TikTokUnhandledEvent<WebcastResponse.Message>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -46,4 +46,4 @@ public class LinkMicArmy {
|
|||||||
List<User> Users;
|
List<User> Users;
|
||||||
Integer Points;
|
Integer Points;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@@ -44,11 +44,11 @@ public class Picture {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Picture map(io.github.jwdeveloper.tiktok.messages.data.Image profilePicture) {
|
public static Picture map(io.github.jwdeveloper.tiktok.messages.data.Image profilePicture) {
|
||||||
var index = profilePicture.getUrlListCount() - 1;
|
var index = profilePicture.getUrlCount() - 1;
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
return new Picture("");
|
return new Picture("");
|
||||||
}
|
}
|
||||||
var url = profilePicture.getUrlList(index);
|
var url = profilePicture.getUrl(index);
|
||||||
return new Picture(url);
|
return new Picture(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ public class Picture {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Picture Empty() {
|
public static Picture empty() {
|
||||||
return new Picture("");
|
return new Picture("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2023-2023 jwdeveloper jacekwoln@gmail.com
|
* Copyright (c) 2023-2024 jwdeveloper jacekwoln@gmail.com
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user