mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 16:59:39 -05:00
Gifts
This commit is contained in:
@@ -24,7 +24,7 @@ package io.github.jwdeveloper.tiktok.data.events.gift;
|
||||
|
||||
import io.github.jwdeveloper.tiktok.annotations.EventMeta;
|
||||
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
||||
import io.github.jwdeveloper.tiktok.data.models.gifts.Gift;
|
||||
import io.github.jwdeveloper.tiktok.data.models.gifts.GiftOld;
|
||||
import io.github.jwdeveloper.tiktok.data.models.gifts.GiftSendType;
|
||||
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
||||
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastGiftMessage;
|
||||
@@ -49,7 +49,7 @@ import lombok.Getter;
|
||||
public class TikTokGiftComboEvent extends TikTokGiftEvent {
|
||||
private final GiftSendType comboState;
|
||||
|
||||
public TikTokGiftComboEvent(Gift gift, User host, WebcastGiftMessage msg, GiftSendType comboState) {
|
||||
public TikTokGiftComboEvent(GiftOld gift, User host, WebcastGiftMessage msg, GiftSendType comboState) {
|
||||
super(gift, host, msg);
|
||||
this.comboState = comboState;
|
||||
}
|
||||
|
||||
@@ -26,15 +26,11 @@ package io.github.jwdeveloper.tiktok.data.events.gift;
|
||||
import io.github.jwdeveloper.tiktok.annotations.EventMeta;
|
||||
import io.github.jwdeveloper.tiktok.annotations.EventType;
|
||||
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.Gift;
|
||||
import io.github.jwdeveloper.tiktok.data.models.gifts.GiftSendType;
|
||||
import io.github.jwdeveloper.tiktok.data.models.gifts.GiftOld;
|
||||
import io.github.jwdeveloper.tiktok.data.models.users.User;
|
||||
import io.github.jwdeveloper.tiktok.messages.webcast.WebcastGiftMessage;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
/**
|
||||
* Triggered when user sends gifts that has
|
||||
@@ -44,12 +40,12 @@ import java.util.ArrayList;
|
||||
@EventMeta(eventType = EventType.Message)
|
||||
@Getter
|
||||
public class TikTokGiftEvent extends TikTokHeaderEvent {
|
||||
private final Gift gift;
|
||||
private final GiftOld gift;
|
||||
private final User user;
|
||||
private final User toUser;
|
||||
private final int combo;
|
||||
|
||||
public TikTokGiftEvent(Gift gift, User liveHost, WebcastGiftMessage msg) {
|
||||
public TikTokGiftEvent(GiftOld gift, User liveHost, WebcastGiftMessage msg) {
|
||||
super(msg.getCommon());
|
||||
this.gift = gift;
|
||||
user = User.map(msg.getUser(), msg.getUserIdentity());
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,6 @@
|
||||
*/
|
||||
package io.github.jwdeveloper.tiktok.data.requests;
|
||||
|
||||
import io.github.jwdeveloper.tiktok.data.models.gifts.Gift;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
package io.github.jwdeveloper.tiktok.live;
|
||||
|
||||
import io.github.jwdeveloper.tiktok.data.models.gifts.Gift;
|
||||
import io.github.jwdeveloper.tiktok.data.models.gifts.GiftOld;
|
||||
import io.github.jwdeveloper.tiktok.data.models.Picture;
|
||||
|
||||
import java.util.List;
|
||||
@@ -38,7 +38,7 @@ public interface GiftManager {
|
||||
* @param diamondCost diamond cost
|
||||
* @return
|
||||
*/
|
||||
Gift registerGift(int id, String name, int diamondCost, Picture picture);
|
||||
GiftOld registerGift(int id, String name, int diamondCost, Picture picture);
|
||||
|
||||
|
||||
/**
|
||||
@@ -46,18 +46,18 @@ public interface GiftManager {
|
||||
* @param giftId
|
||||
* @return
|
||||
*/
|
||||
Gift findById(int giftId);
|
||||
GiftOld findById(int giftId);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param giftName
|
||||
* @return
|
||||
*/
|
||||
Gift findByName(String giftName);
|
||||
GiftOld findByName(String giftName);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return all gifts
|
||||
*/
|
||||
List<Gift> getGifts();
|
||||
List<GiftOld> getGifts();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user