mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-02-11 18:26:20 +08:00
feat(wxapi): 新增小程序短剧媒资管理替换剧集相关接口
This commit is contained in:
@@ -427,6 +427,46 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WxaSecVodGetDramaResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /wxa/sec/vod/submitreplacedramamedias 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/mini-drama/mini_drama.html#_3-4-%E6%8F%90%E4%BA%A4%E6%9B%BF%E6%8D%A2%E5%89%A7%E9%9B%86%E5%AE%A1%E6%A0%B8 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.WxaSecVodSubmitReplaceDramaMediasResponse> ExecuteWxaSecVodSubmitReplaceDramaMediasAsync(this WechatApiClient client, Models.WxaSecVodSubmitReplaceDramaMediasRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "wxa", "sec", "vod", "submitreplacedramamedias")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WxaSecVodSubmitReplaceDramaMediasResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /wxa/sec/vod/replacedramamedia 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/mini-drama/mini_drama.html#_3-5-%E6%9B%BF%E6%8D%A2%E5%AE%A1%E6%A0%B8%E9%80%9A%E8%BF%87%E7%9A%84%E5%89%A7%E9%9B%86 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.WxaSecVodReplaceDramaMediaResponse> ExecuteWxaSecVodReplaceDramaMediaAsync(this WechatApiClient client, Models.WxaSecVodReplaceDramaMediaRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "wxa", "sec", "vod", "replacedramamedia")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WxaSecVodReplaceDramaMediaResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -126,9 +126,9 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("expedited")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))]
|
||||
public bool? IsExpedited { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用于重新提审时替换审核不通过的剧集信息列表。
|
||||
/// 获取或设置替换的剧集信息列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("replace_media_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("replace_media_list")]
|
||||
|
||||
@@ -111,12 +111,28 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("playwright")]
|
||||
public string? Playwright { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广播电视节目制作经营许可证 MediaId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("production_license")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("production_license")]
|
||||
public string? ProductionLicenseMaterialMediaId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置审核详细信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_detail")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_detail")]
|
||||
public Types.AuditDetail? AuditDetail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否加急审核。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("expedited")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanReadOnlyConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("expedited")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanReadOnlyConverter))]
|
||||
public bool? IsExpedited { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wxa/sec/vod/replacedramamedia 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WxaSecVodReplaceDramaMediaRequest : WechatApiRequest, IInferable<WxaSecVodReplaceDramaMediaRequest, WxaSecVodReplaceDramaMediaResponse>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class ReplaceMedia : WxaSecVodAuditDramaRequest.Types.ReplaceMedia
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置剧目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("drama_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("drama_id")]
|
||||
public long DramaId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置旧媒资文件 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("old_media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("old_media_id")]
|
||||
public long OldMediaId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置新媒资文件 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("new_media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("new_media_id")]
|
||||
public long NewMediaId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wxa/sec/vod/replacedramamedia 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WxaSecVodReplaceDramaMediaResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wxa/sec/vod/submitreplacedramamedias 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WxaSecVodSubmitReplaceDramaMediasRequest : WechatApiRequest, IInferable<WxaSecVodSubmitReplaceDramaMediasRequest, WxaSecVodSubmitReplaceDramaMediasResponse>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class ReplaceMedia : WxaSecVodAuditDramaRequest.Types.ReplaceMedia
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置剧目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("drama_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("drama_id")]
|
||||
public long DramaId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置替换的剧集信息列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("replace_media_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("replace_media_list")]
|
||||
public IList<Types.ReplaceMedia>? ReplaceMediaList { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wxa/sec/vod/submitreplacedramamedias 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WxaSecVodSubmitReplaceDramaMediasResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -7,5 +7,16 @@
|
||||
"description": "很有意思的一部剧",
|
||||
"cover_material_id": "1223",
|
||||
"production_license_material_id": "12233",
|
||||
"authorized_material_id": "122344"
|
||||
"registration_number": "012345678901234",
|
||||
"authorized_material_id": "122344",
|
||||
"replace_media_list": [
|
||||
{
|
||||
"old": 20001,
|
||||
"new": 20021
|
||||
},
|
||||
{
|
||||
"old": 20002,
|
||||
"new": 20022
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
"drama_info": {
|
||||
"drama_id": 28918028,
|
||||
"create_time": 1682214878,
|
||||
"name": "我的中国梦",
|
||||
"name": "我的演艺",
|
||||
"playwright": "编剧名",
|
||||
"producer": "制作方名",
|
||||
"production_license": "abd123",
|
||||
"cover_url": "https://developers.weixin.qq.com/test.jpg",
|
||||
"media_count": 2,
|
||||
"media_list": [
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"name": "我的中国梦",
|
||||
"playwright": "编剧名",
|
||||
"producer": "制作方名",
|
||||
"production_license": "abd123",
|
||||
"cover_url": "https://developers.weixin.qq.com/test.jpg",
|
||||
"media_count": 2,
|
||||
"media_list": [
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"drama_id": 10001,
|
||||
"old_media_id": 20001,
|
||||
"new_media_id": 20021
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"drama_id": 10001,
|
||||
"replace_media_list": [
|
||||
{
|
||||
"old": 20001,
|
||||
"new": 20021
|
||||
},
|
||||
{
|
||||
"old": 20002,
|
||||
"new": 20022
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user