mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 16:59:39 -05:00
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:
@@ -23,12 +23,14 @@
|
||||
package io.github.jwdeveloper.tiktok;
|
||||
|
||||
|
||||
import io.github.jwdeveloper.tiktok.data.settings.LiveClientSettings;
|
||||
import io.github.jwdeveloper.tiktok.gifts.TikTokGiftsManager;
|
||||
import io.github.jwdeveloper.tiktok.http.LiveHttpClient;
|
||||
import io.github.jwdeveloper.tiktok.live.GiftsManager;
|
||||
import io.github.jwdeveloper.tiktok.live.builder.LiveClientBuilder;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class TikTokLive {
|
||||
|
||||
@@ -82,13 +84,22 @@ public class TikTokLive {
|
||||
return CompletableFuture.supplyAsync(() -> isHostNameValid(hostName));
|
||||
}
|
||||
|
||||
/**
|
||||
* Use to get some data from TikTok about users are lives
|
||||
*
|
||||
* @return LiveHttpClient
|
||||
*/
|
||||
public static LiveHttpClient requests(Consumer<LiveClientSettings> consumer) {
|
||||
return new TikTokLiveHttpClient(consumer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use to get some data from TikTok about users are lives
|
||||
*
|
||||
* @return LiveHttpClient
|
||||
*/
|
||||
public static LiveHttpClient requests() {
|
||||
return new TikTokLiveHttpClient();
|
||||
return requests(liveClientSettings -> {});
|
||||
}
|
||||
|
||||
private static GiftsManager giftsManager;
|
||||
|
||||
Reference in New Issue
Block a user