Updated ProxyData exceptions to include previous exception to finish stacktrace

Updated LiveUserData.Request to throw an IllegalArgumentException when a null or blank username is provided
Updated HttpClientSettings to use setProxyClientSettings instead of direct access
Fixed ProxyRotation bug starting at index 1 instead of 0 and made methods default to synchronized in case concurrency is used in implementors code
Changed HttpClient#toUrl to toUri
Added @Getter to HttpClientFactory for liveClientSettings
Added consumer to TikTokLive#requests so that way proxies can be used when calling the fetch methods
Changed LiveUserData.Response#startTime to clarify the variable name
This commit is contained in:
kohlerpop1
2024-06-28 23:07:10 -04:00
parent 34ddc74189
commit cfef082d3b
11 changed files with 71 additions and 50 deletions

View File

@@ -125,7 +125,7 @@ public class TikTokLiveClient implements LiveClient {
tikTokEventHandler.publish(this, new TikTokConnectingEvent());
var userDataRequest = new LiveUserData.Request(liveRoomInfo.getHostName());
var userData = httpClient.fetchLiveUserData(userDataRequest);
liveRoomInfo.setStartTime(userData.getStartedAtTimeStamp());
liveRoomInfo.setStartTime(userData.getStartTime());
liveRoomInfo.setRoomId(userData.getRoomId());
if (clientSettings.isFetchGifts())