- refactor of the Http client

Changes:

Http-client settings in configure method

```
    TikTokLive.newClient("X")
                .configure(liveClientSettings ->
                {
                   var httpSetting = liveClientSettings.getHttpSettings();
                    httpSetting.setTimeout(Duration.ofSeconds(12));
                });
```

`TikTokLive.requests()` Easy and quick way of making
http request to tiktok
```
    var giftsResponse =TikTokLive.request.fetchGiftsData();
 ```

 Removed:
     TikTokLive.isLiveOnline(String hostName);
     TikTokLive.isHostNameValidAsync(String hostName);

     instead you can use
     ```
     TikTokLive.requests().fetchLiveUserData("Mike").getUserStatus()
     ```
This commit is contained in:
JW
2024-01-05 17:12:37 +01:00
committed by Jacek W
parent c23faffcde
commit b0593ba95c
3 changed files with 5 additions and 5 deletions

View File

@@ -159,7 +159,7 @@ public class TikTokLiveHttpClient implements LiveHttpClient {
}
}
SingServerResponse getSignedUrl(String roomId) {
SignServerResponse getSignedUrl(String roomId) {
var urlToSign = httpFactory
.client(TikTokLiveHttpClient.TIKTOK_URL_WEBCAST + "im/fetch")
.withParam("room_id", roomId)