Skip to content

Commit

Permalink
feat(tiktok): 随官方更新调研(Research)相关接口
Browse files Browse the repository at this point in the history
  • Loading branch information
fudiwei committed Nov 7, 2024
1 parent 52cc669 commit 5b7dd19
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ public class Data
/// </summary>
[Newtonsoft.Json.JsonProperty("bio_description")]
[System.Text.Json.Serialization.JsonPropertyName("bio_description")]
public string BioDescription { get; set; } = default!;
public string? BioDescription { get; set; }

/// <summary>
/// 获取或设置用户个人描述 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("bio_url")]
[System.Text.Json.Serialization.JsonPropertyName("bio_url")]
public string? BioUrl { get; set; }

/// <summary>
/// 获取或设置是否已认证。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,86 +11,8 @@ public class Data
{
public static class Types
{
public class Video
public class Video : ResearchVideoQueryResponse.Types.Data.Types.Video
{
/// <summary>
/// 获取或设置视频 ID。
/// </summary>
[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; }

/// <summary>
/// 获取或设置作者用户名。
/// </summary>
[Newtonsoft.Json.JsonProperty("username")]
[System.Text.Json.Serialization.JsonPropertyName("username")]
public string Username { get; set; } = default!;

/// <summary>
/// 获取或设置地区代码。
/// </summary>
[Newtonsoft.Json.JsonProperty("region_code")]
[System.Text.Json.Serialization.JsonPropertyName("region_code")]
public string RegionCode { get; set; } = default!;

/// <summary>
/// 获取或设置视频描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("video_description")]
[System.Text.Json.Serialization.JsonPropertyName("video_description")]
public string Description { get; set; } = default!;

/// <summary>
/// 获取或设置点赞次数。
/// </summary>
[Newtonsoft.Json.JsonProperty("like_count")]
[System.Text.Json.Serialization.JsonPropertyName("like_count")]
public long LikeCount { get; set; }

/// <summary>
/// 获取或设置评论次数。
/// </summary>
[Newtonsoft.Json.JsonProperty("comment_count")]
[System.Text.Json.Serialization.JsonPropertyName("comment_count")]
public long CommentCount { get; set; }

/// <summary>
/// 获取或设置分享次数。
/// </summary>
[Newtonsoft.Json.JsonProperty("share_count")]
[System.Text.Json.Serialization.JsonPropertyName("share_count")]
public long ShareCount { get; set; }

/// <summary>
/// 获取或设置观看次数。
/// </summary>
[Newtonsoft.Json.JsonProperty("view_count")]
[System.Text.Json.Serialization.JsonPropertyName("view_count")]
public long ViewCount { get; set; }

/// <summary>
/// 获取或设置创建时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("create_time")]
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
public long CreateTimestamp { get; set; }

/// <summary>
/// 获取或设置音乐 ID。
/// </summary>
[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; }

/// <summary>
/// 获取或设置话题标签列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("hashtag_names")]
[System.Text.Json.Serialization.JsonPropertyName("hashtag_names")]
public string[]? HashtagNameList { get; set; }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@ public static class Types
{
public class Video
{
public static class Types
{
public class HashTagInfo
{
/// <summary>
/// 获取或设置话题标签 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("hashtag_id")]
[System.Text.Json.Serialization.JsonPropertyName("hashtag_id")]
public string HashTagId { get; set; } = default!;

/// <summary>
/// 获取或设置话题标签描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("hashtag_description")]
[System.Text.Json.Serialization.JsonPropertyName("hashtag_description")]
public string HashTagDescription { get; set; } = default!;
}
}

/// <summary>
/// 获取或设置视频 ID。
/// </summary>
Expand Down Expand Up @@ -70,13 +90,27 @@ public class Video
[System.Text.Json.Serialization.JsonPropertyName("view_count")]
public long ViewCount { get; set; }

/// <summary>
/// 获取或设置收藏次数。
/// </summary>
[Newtonsoft.Json.JsonProperty("favourites_count")]
[System.Text.Json.Serialization.JsonPropertyName("favourites_count")]
public long FavouritesCount { get; set; }

/// <summary>
/// 获取或设置创建时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("create_time")]
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
public long CreateTimestamp { get; set; }

/// <summary>
/// 获取或设置视频时长(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("video_duration")]
[System.Text.Json.Serialization.JsonPropertyName("video_duration")]
public int VideoDuration { get; set; }

/// <summary>
/// 获取或设置音乐 ID。
/// </summary>
Expand All @@ -99,6 +133,20 @@ public class Video
[System.Text.Json.Serialization.JsonPropertyName("hashtag_names")]
public string[]? HashtagNameList { get; set; }

/// <summary>
/// 获取或设置话题标签信息列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("hashtag_info_list")]
[System.Text.Json.Serialization.JsonPropertyName("hashtag_info_list")]
public Types.HashTagInfo[]? HashTagInfoList { get; set; }

/// <summary>
/// 获取或设置提及列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("video_mention_list")]
[System.Text.Json.Serialization.JsonPropertyName("video_mention_list")]
public string[]? VideoMentionList { get; set; }

/// <summary>
/// 获取或设置播放列表 ID。
/// </summary>
Expand All @@ -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; }

/// <summary>
/// 获取或设置是否已通过 STEM 认证。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_stem_verified")]
[System.Text.Json.Serialization.JsonPropertyName("is_stem_verified")]
public bool? IsSTEMVerified { get; set; }
}
}

Expand Down

0 comments on commit 5b7dd19

Please sign in to comment.