mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 16:59:39 -05:00
Add signature to user class and remove no longer UUC param!
This commit is contained in:
@@ -219,7 +219,6 @@ public class TikTokLiveHttpClient implements LiveHttpClient
|
||||
protected ActionResult<HttpResponse<byte[]>> getByteResponse(String room_id) {
|
||||
HttpClientBuilder builder = httpFactory.client(TIKTOK_SIGN_API)
|
||||
.withParam("client", "ttlive-java")
|
||||
.withParam("uuc", "1") //MAGIC NUMBER!
|
||||
.withParam("room_id", room_id);
|
||||
|
||||
if (clientSettings.getApiKey() != null)
|
||||
|
||||
@@ -131,6 +131,7 @@ public class LiveDataMapper {
|
||||
var id = jsonElement.get("id").getAsLong();
|
||||
var name = jsonElement.get("display_id").getAsString();
|
||||
var profileName = jsonElement.get("nickname").getAsString();
|
||||
var signature = jsonElement.get("bio_description").getAsString();
|
||||
|
||||
|
||||
var followElement = jsonElement.getAsJsonObject("follow_info");
|
||||
@@ -142,7 +143,7 @@ public class LiveDataMapper {
|
||||
var link = pictureElement.getAsJsonArray("url_list").get(1).getAsString();
|
||||
var picture = new Picture(link);
|
||||
|
||||
var user = new User(id, name, profileName, picture, followingCount, followers, new ArrayList<>());
|
||||
var user = new User(id, name, profileName, signature, picture, followingCount, followers, new ArrayList<>());
|
||||
user.addAttribute(UserAttribute.LiveHost);
|
||||
return user;
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ public class LiveUserDataMapper
|
||||
Long.parseLong(user.get("id").getAsString()),
|
||||
user.get("uniqueId").getAsString(),
|
||||
user.get("nickname").getAsString(),
|
||||
user.get("signature").getAsString(),
|
||||
new Picture(user.get("avatarLarger").getAsString()),
|
||||
stats.get("followingCount").getAsLong(),
|
||||
stats.get("followerCount").getAsLong(),
|
||||
|
||||
Reference in New Issue
Block a user