Skip to content

Commit 537cb5a

Browse files
committed
feat(douyinopen): 随官方更新视频评论相关接口
1 parent d153d10 commit 537cb5a

4 files changed

Lines changed: 51 additions & 3 deletions

File tree

src/SKIT.FlurlHttpClient.ByteDance.DouyinOpen/Extensions/DouyinOpenClientExecuteVideoExtensions.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,13 @@ public static class DouyinOpenClientExecuteVideoExtensions
240240
IFlurlRequest flurlReq = client
241241
.CreateFlurlRequest(request, HttpMethod.Post, "video", "search", "comment", "reply")
242242
.WithHeader("access-token", request.AccessToken)
243-
.SetQueryParam("open_id", request.OpenId);
243+
.SetQueryParam("open_id", request.OpenId)
244+
.SetQueryParam("device_brand", request.DeviceBrand)
245+
.SetQueryParam("device_platform", request.DevicePlatform)
246+
.SetQueryParam("device_type", request.DeviceType)
247+
.SetQueryParam("ip", request.ClientIp)
248+
.SetQueryParam("os_version", request.OSVersion)
249+
.SetQueryParam("shark_channel", request.SharkChannel);
244250

245251
return await client.SendFlurlRequestAsJsonAsync<Models.VideoSearchCommentReplyResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
246252
}

src/SKIT.FlurlHttpClient.ByteDance.DouyinOpen/Models/Video/Search/VideoSearchCommentListRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class VideoSearchCommentListRequest : DouyinOpenRequest
1010
/// </summary>
1111
[Newtonsoft.Json.JsonIgnore]
1212
[System.Text.Json.Serialization.JsonIgnore]
13-
public string OpenId { get; set; } = string.Empty;
13+
public string? OpenId { get; set; }
1414

1515
/// <summary>
1616
/// 获取或设置特殊加密的视频 ID。

src/SKIT.FlurlHttpClient.ByteDance.DouyinOpen/Models/Video/Search/VideoSearchCommentReplyListRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class VideoSearchCommentReplyListRequest : DouyinOpenRequest
1010
/// </summary>
1111
[Newtonsoft.Json.JsonIgnore]
1212
[System.Text.Json.Serialization.JsonIgnore]
13-
public string OpenId { get; set; } = string.Empty;
13+
public string? OpenId { get; set; }
1414

1515
/// <summary>
1616
/// 获取或设置特殊加密的视频 ID。

src/SKIT.FlurlHttpClient.ByteDance.DouyinOpen/Models/Video/Search/VideoSearchCommentReplyRequest.cs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,48 @@ public class VideoSearchCommentReplyRequest : DouyinOpenRequest
1212
[System.Text.Json.Serialization.JsonIgnore]
1313
public string OpenId { get; set; } = string.Empty;
1414

15+
/// <summary>
16+
/// 获取或设置设备品牌。
17+
/// </summary>
18+
[Newtonsoft.Json.JsonIgnore]
19+
[System.Text.Json.Serialization.JsonIgnore]
20+
public string? DeviceBrand { get; set; }
21+
22+
/// <summary>
23+
/// 获取或设置设备平台。
24+
/// </summary>
25+
[Newtonsoft.Json.JsonIgnore]
26+
[System.Text.Json.Serialization.JsonIgnore]
27+
public string? DevicePlatform { get; set; }
28+
29+
/// <summary>
30+
/// 获取或设置设备类型。
31+
/// </summary>
32+
[Newtonsoft.Json.JsonIgnore]
33+
[System.Text.Json.Serialization.JsonIgnore]
34+
public string? DeviceType { get; set; }
35+
36+
/// <summary>
37+
/// 获取或设置客户端 IP。
38+
/// </summary>
39+
[Newtonsoft.Json.JsonIgnore]
40+
[System.Text.Json.Serialization.JsonIgnore]
41+
public string? ClientIp { get; set; }
42+
43+
/// <summary>
44+
/// 获取或设置操作系统版本号。
45+
/// </summary>
46+
[Newtonsoft.Json.JsonIgnore]
47+
[System.Text.Json.Serialization.JsonIgnore]
48+
public string? OSVersion { get; set; }
49+
50+
/// <summary>
51+
/// 获取或设置接入渠道。
52+
/// </summary>
53+
[Newtonsoft.Json.JsonIgnore]
54+
[System.Text.Json.Serialization.JsonIgnore]
55+
public string? SharkChannel { get; set; }
56+
1557
/// <summary>
1658
/// 获取或设置特殊加密的视频 ID。
1759
/// </summary>

0 commit comments

Comments
 (0)