Commit Graph

74 Commits

Author SHA1 Message Date
Jacek W
155b47977d Update README.md 2023-12-12 13:04:51 +01:00
Jacek W
3e262773a4 Update README.md 2023-12-11 23:37:30 +01:00
Jacek W
3f2c9083d5 Update README.md 2023-12-05 02:24:25 +01:00
Jacek W
dd5ccbfb7f Update README.md 2023-11-14 18:48:58 +01:00
JW
1977cbe8dc Changes:
New Events
     -  onLiveUnpaused()
     -  onRoomInfo() triggered when LiveRoomInfo got updated

  Removed:
      - clientSettings.setHandleExistingEvents
      - onRoom  Replaced with onRoomInfo event
      - onRoomUserInfo  Replaced with onRoomInfo event

  Gifts:
    - onGift event was not triggered for the more expensive gifts
    - onGiftCombo with more expensive gifts was stuck in the GiftSendType.Begin state

  Fixed:
     - setPrintToConsole(false) was not disabling logs
2023-11-14 00:07:14 +01:00
Jacek W
c3a48c4d70 Update README.md 2023-11-10 22:29:53 +01:00
Jacek W
788653484f Update README.md 2023-10-24 22:02:36 +02:00
Jacek W
6941107db8 Update README.md 2023-10-13 14:00:20 +02:00
Jacek W
82112f0140 Update README.md 2023-10-12 15:19:42 +02:00
Jacek W
5e77b3f57f Update README.md 2023-10-12 09:01:29 +02:00
Jacek W
690b9eb272 Update README.md 2023-10-12 06:19:43 +02:00
Jacek W
0f735a7876 Update README.md 2023-10-12 06:13:28 +02:00
JW
4d8d785dc7 1.0.0 MAJOR update
# 1.0.0 Update

Official version of Tiktok live Java. Code has been restructure, improve and renamed to make
using simpler and more intuitive, since that library is no longer compatable with longer versions.

# Breaking changes:

## Configuration

- `clientSettings.setHandleExistingMessagesOnConnect(true)` Renamed to `setHandleExistingEvents()`
- `clientSettings.setDownloadGiftInfo(true);`  Removed
- `clientSettings.setPrintMessageData(false);` Removed

## Events

### Added
  - `onGiftCombo`
              onGiftComboevent is invoked for all give events, it contains 3 combo stages
              I would suggest to use it for somekind of visualizations

                  * `GiftSendType.Begin`
                  * `GiftSendType.Active`
                  * `GiftSendType.Finished`

  - `onWebsocketResponse`
  - `onRoomUserInfo`
  - `onRoom`
  - `onQuestion`

### Changed
   - `onComment`
   - `onGiftMessage -> onGift`
          OnGift event is now invoked only when combo has been finished of gift is not strakeable (exprensive)

   - `onRoomMessage -> onRoom`

### Removed

I wasn't sure if those events are working, so I decided to remove them for now
but they will be gradually added again with next updates

- `onLinkMicFanTicket`
- `onEnvelope`
- `onShop`
- `onDetect`
- `onLinkLayer`
- `onCaption`
- `onRoomPin`
- `onBarrage`
- `onLinkMicArmies`
- `onUnauthorizedMember`
- `onInRoomBanner`
- `onLinkMicMethod`
- `onPoll`
- `onGoalUpdate`
- `onRankUpdate`
- `onIMDelete`
- `onRankText`
- `onUnhandledMember`
- `onSubNotify`
- `onLinkMicBattle`
- `onUnhandledControl`

## Gifts

`Gitf` has been changed from `class` to `enum` that allows to simple use by checking avaliable values
and using `switch expression`

### Example

```java

Gift gift = Gift.GIFT_BOX;
switch (gift) {
     case ROSE -> print(ConsoleColors.RED, "Rose!");
     case GG -> print(ConsoleColors.YELLOW, " GOOD GAME!");
     case TIKTOK -> print(ConsoleColors.CYAN,"Thanks for TikTok");
     default -> print(ConsoleColors.GREEN, "[Thanks for gift] ", ConsoleColors.YELLOW, event.getGift().getName(), "x", event.getCombo());
 }
```

## GiftManager

### New Methods
```java

    Gift registerGift(int id, String name, int diamondCost, Picture picture);

    Gift findById(int giftId);

    Gift findByName(String giftName);

    List<Gift> getGifts();
```

## LiveClient

###  New Methods

```java

  void connectAsync(Consumer<LiveClient> onConnection);

  CompletableFuture<LiveClient> connectAsync();

  Logger getLogger();
```

## LiveRoomInfo

### New Methods
```java

     int getViewersCount();

     int getLikesCount();

     boolean isAgeRestricted();
```
2023-10-12 06:07:05 +02:00
Jacek W
a01c175a61 Update README.md 2023-10-12 05:19:26 +02:00
Jacek W
331d1988d4 Update README.md 2023-10-12 05:16:10 +02:00
Jacek W
307f009154 Update README.md 2023-10-12 04:58:30 +02:00
Jacek W
3ed1055c16 Update README.md 2023-10-12 04:45:46 +02:00
Jacek W
78ea6b1ffb Update README.md 2023-10-11 01:44:20 +02:00
Jacek W
50d86f9b5d Update README.md 2023-10-11 01:40:59 +02:00
Jacek W
3e9da47a79 Update README.md 2023-10-11 01:37:40 +02:00
Jacek W
fe7b763d9a Update README.md 2023-10-11 01:24:20 +02:00
JW
07566efcff 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
2023-10-11 01:20:46 +02:00
JW
65a2d5cfff 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
2023-10-06 02:31:40 +02:00
JW
f0d7cb0cbc 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
2023-10-05 09:04:39 +02:00
Jacek W
4690a75f20 Update README.md 2023-09-27 03:23:55 +02:00
JW
5b91e7f4c9 Fixed bugs:
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: java.nio.ReadOnlyBufferException
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: 	at java.base/java.nio.ByteBuffer.array(ByteBuffer.java:1473)
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: 	at org.java_websocket.drafts.Draft_6455.createBinaryFrame(Draft_6455.java:473)
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: 	at org.java_websocket.WebSocketImpl.send(WebSocketImpl.java:682)
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: 	at org.java_websocket.WebSocketImpl.send(WebSocketImpl.java:664)
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: 	at org.java_websocket.client.WebSocketClient.send(WebSocketClient.java:928)
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: 	at io.github.jwdeveloper.tiktok.websocket.TikTokWebSocketListener.sendAckId(TikTokWebSocketListener.java:127)
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: 	at io.github.jwdeveloper.tiktok.websocket.TikTokWebSocketListener.handleBinary(TikTokWebSocketListener.java:86)
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: 	at io.github.jwdeveloper.tiktok.websocket.TikTokWebSocketListener.onMessage(TikTokWebSocketListener.java:56)
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: 	at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:641)
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: 	at org.java_websocket.drafts.Draft_6455.processFrameBinary(Draft_6455.java:959)
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: 	at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:912)
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: 	at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:402)
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: 	at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:234)
[20:28:38] [WebSocketConnectReadThread-34/INFO] (Minecraft) [STDERR]: 	at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:516)
2023-09-22 02:15:49 +02:00
Jacek W
0cf8edfefe Update README.md 2023-09-19 02:56:21 +02:00
JW
84bbfa97e9 Fixed bugs:
- addListeners() was throwing exception
  - 404 response code was return while connecting to tiktok for some users
  - configure.setRoomId() method for people that want to set roomId manually
  - client.roomInfo().isAgeRestricted() check if live has age restriction
2023-09-19 02:53:04 +02:00
Just wolololololololo
a2da5169db Update README.md 2023-09-19 02:39:53 +02:00
Just wolololololololo
bf8defbe3c Update README.md 2023-09-19 02:30:40 +02:00
Just wolololololololo
5ba935efaf Update README.md 2023-09-19 02:30:31 +02:00
Just wolololololololo
0a244a4a58 Update README.md 2023-09-19 02:29:58 +02:00
JW
05ce745dc8 Changes:
LiveRoomInfo
    + new method getConnectionState() getting current state of connection
   + ListenersManager
     getBindingModels() renamed to getListeners()

  + Introducing documentation, each public interface got small documentation

  + New property in config .setSessionId()

  + New event: onReconnecting()

Bugs:
   CommentEvent was throwing mapping exception
2023-09-13 06:32:51 +02:00
JW
d87506da88 Bugs:
TikTokEventListener method with parameter TikTokEvent was invalid
2023-09-07 15:58:25 +02:00
JW
ff9e75505d Bugs:
TikTokEventListener method with parameter TikTokEvent was invalid
2023-09-07 15:49:45 +02:00
JW
97f57912ad Bugs:
Method for listeners was throwing exception
  TikTokListenersManager.removeListener() was not working
2023-09-07 14:51:51 +02:00
JW
4a157143ec Changes:
`TikTokEventListener` new method of listening events
   see it at TestApplication/ListenerExample.java

Bugs:
 - Fixed bug: Websocket was sending ping after it was closed
2023-09-07 03:19:25 +02:00
JW
911e2b12a5 Merge remote-tracking branch 'origin/master' 2023-09-04 12:05:19 +02:00
JW
1aff710523 Changes:
`onWebsocketMessage()` TikTokWebsocketMessageEvent new event that is
   triggered when new ProtocolBuffer message come from TikTok server.
   Should be mainly use for debuging purpose

Bugs:
 - Fixed bug: WebcastSocialMessage was always triggering `TikTokShareEvent` events such as `TikTokLikeEvent`, `TikTokFollowEvent`, `TikTokShareEvent`, `TikTokJoinEvent` was ignored

 - Fixed bug: Websocket was disconnecting when there was no incoming events for the while. Fixed by implementing background loop that pinging TikTok server every few ms.

 - Fixed bug: Disconnect method was not working
2023-09-04 12:05:13 +02:00
JW
c0f8e6d904 Update README.md 2023-09-04 11:41:33 +02:00
JW
b059afd621 Update README.md 2023-08-31 00:22:45 +02:00
Isaac Kogan
761f3ab633 Update README.md 2023-08-30 15:58:50 -04:00
JW
483dceadcf Update README.md 2023-08-27 14:23:25 +02:00
JW
5f8cba5126 Update README.md 2023-08-26 03:42:09 +02:00
JW
f9966c9a5f Update README.md 2023-08-26 01:34:43 +02:00
JW
48a79736ad Update README.md 2023-08-26 01:34:19 +02:00
JW
eb82d0df78 Update README.md 2023-08-25 21:03:51 +02:00
JW
4273375eb9 Update README.md 2023-08-24 16:51:04 +02:00
JW
3daeee6316 Update README.md 2023-08-24 16:45:25 +02:00
JW
44ba999b83 Update README.md 2023-08-23 21:56:08 +02:00