mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-28 09:19:40 -05:00
Breaking changes:
'Gift': changed from class to enum, so now you can handle
incoming gifts in switch
`Events`
- new:
onGiftComboFinished
- Removed:
onGiftBrodcast
- Rename:
onGiftMessage -> onGift
onRoomPinMessage -> onRoomPin
onRoomMessage -> onRoom
onLinkMessage -> onLink
onBarrageMessage -> onBarrage
onPollMessage -> onPoll
onShopMessage -> onShop
onDetectMessage -> onDetect
`GiftManager`
added:
registerGift
findById
findByName
getGifts
removed:
getActiveGifts
This commit is contained in:
@@ -46,7 +46,7 @@ public class ApiServiceMock extends TikTokApiService {
|
||||
public LiveRoomMeta fetchRoomInfo()
|
||||
{
|
||||
var meta = new LiveRoomMeta();
|
||||
meta.setStatus(1);
|
||||
meta.setStatus(LiveRoomMeta.LiveRoomStatus.HostOnline);
|
||||
return meta;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,13 +34,6 @@ public class TemplateUtility
|
||||
return template;
|
||||
}
|
||||
|
||||
public static String generateTemplate2(String template, Map<String, Object> values) {
|
||||
for(var entry : values.entrySet())
|
||||
{
|
||||
template = doReplacement2(template,entry.getKey(), entry.getValue().toString());
|
||||
}
|
||||
return template;
|
||||
}
|
||||
|
||||
private static String doReplacement(String template, String keyword, String value)
|
||||
{
|
||||
@@ -48,9 +41,5 @@ public class TemplateUtility
|
||||
return template.replaceAll(key, value);
|
||||
}
|
||||
|
||||
private static String doReplacement2(String template, String keyword, String value)
|
||||
{
|
||||
var key = "(\\$)("+keyword+")(\\$)";
|
||||
return template.replaceAll(key, value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user