From 5b7dd19a6d824b21fe5171ef6b5fb71edb0ebc3b Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Thu, 7 Nov 2024 09:56:15 +0800 Subject: [PATCH] =?UTF-8?q?feat(tiktok):=20=E9=9A=8F=E5=AE=98=E6=96=B9?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=B0=83=E7=A0=94=EF=BC=88Research=EF=BC=89?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Research/User/ResearchUserInfoRequest.cs | 1 + .../Research/User/ResearchUserInfoResponse.cs | 9 ++- .../User/ResearchUserLikedVideosRequest.cs | 5 ++ .../User/ResearchUserLikedVideosResponse.cs | 80 +------------------ .../User/ResearchUserPinnedVideosRequest.cs | 5 ++ .../User/ResearchUserRepostedVideosRequest.cs | 5 ++ .../Video/ResearchVideoQueryRequest.cs | 5 ++ .../Video/ResearchVideoQueryResponse.cs | 55 +++++++++++++ 8 files changed, 85 insertions(+), 80 deletions(-) diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserInfoRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserInfoRequest.cs index 8e38e8e2..75de6e50 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserInfoRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserInfoRequest.cs @@ -33,6 +33,7 @@ public ResearchUserInfoRequest SetCompleteFields() FieldList.Add("following_count"); FieldList.Add("likes_count"); FieldList.Add("video_count"); + FieldList.Add("bio_url"); return this; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserInfoResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserInfoResponse.cs index 911b1162..7cf55c5f 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserInfoResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserInfoResponse.cs @@ -28,7 +28,14 @@ public class Data /// [Newtonsoft.Json.JsonProperty("bio_description")] [System.Text.Json.Serialization.JsonPropertyName("bio_description")] - public string BioDescription { get; set; } = default!; + public string? BioDescription { get; set; } + + /// + /// 获取或设置用户个人描述 URL。 + /// + [Newtonsoft.Json.JsonProperty("bio_url")] + [System.Text.Json.Serialization.JsonPropertyName("bio_url")] + public string? BioUrl { get; set; } /// /// 获取或设置是否已认证。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserLikedVideosRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserLikedVideosRequest.cs index 6d127596..53829f75 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserLikedVideosRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserLikedVideosRequest.cs @@ -50,6 +50,11 @@ public ResearchUserLikedVideosRequest SetCompleteFields() FieldList.Add("share_count"); FieldList.Add("view_count"); FieldList.Add("hashtag_names"); + FieldList.Add("is_stem_verified"); + FieldList.Add("favourites_count"); + FieldList.Add("video_duration"); + FieldList.Add("hashtag_info_list"); + FieldList.Add("video_mention_list"); return this; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserLikedVideosResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserLikedVideosResponse.cs index af1d81b1..93295704 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserLikedVideosResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserLikedVideosResponse.cs @@ -11,86 +11,8 @@ public class Data { public static class Types { - public class Video + public class Video : ResearchVideoQueryResponse.Types.Data.Types.Video { - /// - /// 获取或设置视频 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public long VideoId { get; set; } - - /// - /// 获取或设置作者用户名。 - /// - [Newtonsoft.Json.JsonProperty("username")] - [System.Text.Json.Serialization.JsonPropertyName("username")] - public string Username { get; set; } = default!; - - /// - /// 获取或设置地区代码。 - /// - [Newtonsoft.Json.JsonProperty("region_code")] - [System.Text.Json.Serialization.JsonPropertyName("region_code")] - public string RegionCode { get; set; } = default!; - - /// - /// 获取或设置视频描述。 - /// - [Newtonsoft.Json.JsonProperty("video_description")] - [System.Text.Json.Serialization.JsonPropertyName("video_description")] - public string Description { get; set; } = default!; - - /// - /// 获取或设置点赞次数。 - /// - [Newtonsoft.Json.JsonProperty("like_count")] - [System.Text.Json.Serialization.JsonPropertyName("like_count")] - public long LikeCount { get; set; } - - /// - /// 获取或设置评论次数。 - /// - [Newtonsoft.Json.JsonProperty("comment_count")] - [System.Text.Json.Serialization.JsonPropertyName("comment_count")] - public long CommentCount { get; set; } - - /// - /// 获取或设置分享次数。 - /// - [Newtonsoft.Json.JsonProperty("share_count")] - [System.Text.Json.Serialization.JsonPropertyName("share_count")] - public long ShareCount { get; set; } - - /// - /// 获取或设置观看次数。 - /// - [Newtonsoft.Json.JsonProperty("view_count")] - [System.Text.Json.Serialization.JsonPropertyName("view_count")] - public long ViewCount { get; set; } - - /// - /// 获取或设置创建时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_time")] - public long CreateTimestamp { get; set; } - - /// - /// 获取或设置音乐 ID。 - /// - [Newtonsoft.Json.JsonProperty("music_id")] - [System.Text.Json.Serialization.JsonPropertyName("music_id")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public long? MusicId { get; set; } - - /// - /// 获取或设置话题标签列表。 - /// - [Newtonsoft.Json.JsonProperty("hashtag_names")] - [System.Text.Json.Serialization.JsonPropertyName("hashtag_names")] - public string[]? HashtagNameList { get; set; } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserPinnedVideosRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserPinnedVideosRequest.cs index 8a896299..846ae48f 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserPinnedVideosRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserPinnedVideosRequest.cs @@ -50,6 +50,11 @@ public ResearchUserPinnedVideosRequest SetCompleteFields() FieldList.Add("share_count"); FieldList.Add("view_count"); FieldList.Add("hashtag_names"); + FieldList.Add("is_stem_verified"); + FieldList.Add("favourites_count"); + FieldList.Add("video_duration"); + FieldList.Add("hashtag_info_list"); + FieldList.Add("video_mention_list"); return this; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserRepostedVideosRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserRepostedVideosRequest.cs index 2a0a9f92..d889321d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserRepostedVideosRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/User/ResearchUserRepostedVideosRequest.cs @@ -50,6 +50,11 @@ public ResearchUserRepostedVideosRequest SetCompleteFields() FieldList.Add("share_count"); FieldList.Add("view_count"); FieldList.Add("hashtag_names"); + FieldList.Add("is_stem_verified"); + FieldList.Add("favourites_count"); + FieldList.Add("video_duration"); + FieldList.Add("hashtag_info_list"); + FieldList.Add("video_mention_list"); return this; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/Video/ResearchVideoQueryRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/Video/ResearchVideoQueryRequest.cs index ef5f2e98..22941d57 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/Video/ResearchVideoQueryRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/Video/ResearchVideoQueryRequest.cs @@ -135,6 +135,11 @@ public ResearchVideoQueryRequest SetCompleteFields() FieldList.Add("effect_ids"); FieldList.Add("playlist_id"); FieldList.Add("voice_to_text"); + FieldList.Add("is_stem_verified"); + FieldList.Add("favourites_count"); + FieldList.Add("video_duration"); + FieldList.Add("hashtag_info_list"); + FieldList.Add("video_mention_list"); return this; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/Video/ResearchVideoQueryResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/Video/ResearchVideoQueryResponse.cs index e52777c7..7b1383ee 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/Video/ResearchVideoQueryResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobal/Models/Research/Video/ResearchVideoQueryResponse.cs @@ -13,6 +13,26 @@ public static class Types { public class Video { + public static class Types + { + public class HashTagInfo + { + /// + /// 获取或设置话题标签 ID。 + /// + [Newtonsoft.Json.JsonProperty("hashtag_id")] + [System.Text.Json.Serialization.JsonPropertyName("hashtag_id")] + public string HashTagId { get; set; } = default!; + + /// + /// 获取或设置话题标签描述。 + /// + [Newtonsoft.Json.JsonProperty("hashtag_description")] + [System.Text.Json.Serialization.JsonPropertyName("hashtag_description")] + public string HashTagDescription { get; set; } = default!; + } + } + /// /// 获取或设置视频 ID。 /// @@ -70,6 +90,13 @@ public class Video [System.Text.Json.Serialization.JsonPropertyName("view_count")] public long ViewCount { get; set; } + /// + /// 获取或设置收藏次数。 + /// + [Newtonsoft.Json.JsonProperty("favourites_count")] + [System.Text.Json.Serialization.JsonPropertyName("favourites_count")] + public long FavouritesCount { get; set; } + /// /// 获取或设置创建时间戳。 /// @@ -77,6 +104,13 @@ public class Video [System.Text.Json.Serialization.JsonPropertyName("create_time")] public long CreateTimestamp { get; set; } + /// + /// 获取或设置视频时长(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("video_duration")] + [System.Text.Json.Serialization.JsonPropertyName("video_duration")] + public int VideoDuration { get; set; } + /// /// 获取或设置音乐 ID。 /// @@ -99,6 +133,20 @@ public class Video [System.Text.Json.Serialization.JsonPropertyName("hashtag_names")] public string[]? HashtagNameList { get; set; } + /// + /// 获取或设置话题标签信息列表。 + /// + [Newtonsoft.Json.JsonProperty("hashtag_info_list")] + [System.Text.Json.Serialization.JsonPropertyName("hashtag_info_list")] + public Types.HashTagInfo[]? HashTagInfoList { get; set; } + + /// + /// 获取或设置提及列表。 + /// + [Newtonsoft.Json.JsonProperty("video_mention_list")] + [System.Text.Json.Serialization.JsonPropertyName("video_mention_list")] + public string[]? VideoMentionList { get; set; } + /// /// 获取或设置播放列表 ID。 /// @@ -113,6 +161,13 @@ public class Video [Newtonsoft.Json.JsonProperty("voice_to_text")] [System.Text.Json.Serialization.JsonPropertyName("voice_to_text")] public string? VoiceToText { get; set; } + + /// + /// 获取或设置是否已通过 STEM 认证。 + /// + [Newtonsoft.Json.JsonProperty("is_stem_verified")] + [System.Text.Json.Serialization.JsonPropertyName("is_stem_verified")] + public bool? IsSTEMVerified { get; set; } } }