Skip to content

Commit

Permalink
feat(douyinopen): 随官方更新视频评论相关接口
Browse files Browse the repository at this point in the history
  • Loading branch information
fudiwei committed Nov 8, 2024
1 parent d153d10 commit 537cb5a
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,13 @@ public static class DouyinOpenClientExecuteVideoExtensions
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "video", "search", "comment", "reply")
.WithHeader("access-token", request.AccessToken)
.SetQueryParam("open_id", request.OpenId);
.SetQueryParam("open_id", request.OpenId)
.SetQueryParam("device_brand", request.DeviceBrand)
.SetQueryParam("device_platform", request.DevicePlatform)
.SetQueryParam("device_type", request.DeviceType)
.SetQueryParam("ip", request.ClientIp)
.SetQueryParam("os_version", request.OSVersion)
.SetQueryParam("shark_channel", request.SharkChannel);

return await client.SendFlurlRequestAsJsonAsync<Models.VideoSearchCommentReplyResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class VideoSearchCommentListRequest : DouyinOpenRequest
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string OpenId { get; set; } = string.Empty;
public string? OpenId { get; set; }

/// <summary>
/// 获取或设置特殊加密的视频 ID。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class VideoSearchCommentReplyListRequest : DouyinOpenRequest
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string OpenId { get; set; } = string.Empty;
public string? OpenId { get; set; }

/// <summary>
/// 获取或设置特殊加密的视频 ID。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,48 @@ public class VideoSearchCommentReplyRequest : DouyinOpenRequest
[System.Text.Json.Serialization.JsonIgnore]
public string OpenId { get; set; } = string.Empty;

/// <summary>
/// 获取或设置设备品牌。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? DeviceBrand { get; set; }

/// <summary>
/// 获取或设置设备平台。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? DevicePlatform { get; set; }

/// <summary>
/// 获取或设置设备类型。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? DeviceType { get; set; }

/// <summary>
/// 获取或设置客户端 IP。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? ClientIp { get; set; }

/// <summary>
/// 获取或设置操作系统版本号。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? OSVersion { get; set; }

/// <summary>
/// 获取或设置接入渠道。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? SharkChannel { get; set; }

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

0 comments on commit 537cb5a

Please sign in to comment.