feat(wxapi): 新增小程序短剧媒资剧目授权相关接口

This commit is contained in:
Fu Diwei
2024-01-15 21:49:29 +08:00
parent 3a3097a36a
commit bf4153e0c9
17 changed files with 458 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/vod/authorizedrama 接口的请求。</para>
/// </summary>
public class WxaSecVodAuthorizeDramaRequest : WechatApiRequest, IInferable<WxaSecVodAuthorizeDramaRequest, WxaSecVodAuthorizeDramaResponse>
{
/// <summary>
/// 获取或设置授权的剧目 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("drama_id")]
[System.Text.Json.Serialization.JsonPropertyName("drama_id")]
public IList<long> DramaIdList { get; set; } = new List<long>();
/// <summary>
/// 获取或设置被授权方小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("authorized_appid")]
[System.Text.Json.Serialization.JsonPropertyName("authorized_appid")]
public string AuthorizedAppId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置授权到期时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("authz_expire_time")]
[System.Text.Json.Serialization.JsonPropertyName("authz_expire_time")]
public long? ExpireTimestamp { get; set; }
}
}

View File

@@ -0,0 +1,43 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/vod/authorizedrama 接口的响应。</para>
/// </summary>
public class WxaSecVodAuthorizeDramaResponse : WechatApiResponse
{
public static class Types
{
public class Result
{
/// <summary>
/// 获取或设置剧目 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("drama_id")]
[System.Text.Json.Serialization.JsonPropertyName("drama_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long DramaId { get; set; }
/// <summary>
/// 获取或设置错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("errcode")]
[System.Text.Json.Serialization.JsonPropertyName("errcode")]
public int ErrorCode { get; set; }
/// <summary>
/// 获取或设置错误原因。
/// </summary>
[Newtonsoft.Json.JsonProperty("errmsg")]
[System.Text.Json.Serialization.JsonPropertyName("errmsg")]
public string ErrorMessage { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置结果列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("result")]
[System.Text.Json.Serialization.JsonPropertyName("result")]
public Types.Result[] ResultList { get; set; } = default!;
}
}

View File

@@ -0,0 +1,24 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/vod/deauthorizedrama 接口的请求。</para>
/// </summary>
public class WxaSecVodDeauthorizeDramaRequest : WechatApiRequest, IInferable<WxaSecVodDeauthorizeDramaRequest, WxaSecVodDeauthorizeDramaResponse>
{
/// <summary>
/// 获取或设置解除授权的剧目 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("drama_id")]
[System.Text.Json.Serialization.JsonPropertyName("drama_id")]
public IList<long> DramaIdList { get; set; } = new List<long>();
/// <summary>
/// 获取或设置被授权方小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("authorized_appid")]
[System.Text.Json.Serialization.JsonPropertyName("authorized_appid")]
public string AuthorizedAppId { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/vod/deauthorizedrama 接口的响应。</para>
/// </summary>
public class WxaSecVodDeauthorizeDramaResponse : WechatApiResponse
{
public static class Types
{
public class Result : WxaSecVodAuthorizeDramaResponse.Types.Result
{
}
}
/// <summary>
/// 获取或设置结果列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("result")]
[System.Text.Json.Serialization.JsonPropertyName("result")]
public Types.Result[] ResultList { get; set; } = default!;
}
}

View File

@@ -0,0 +1,36 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/vod/getauthorizeobjects 接口的请求。</para>
/// </summary>
public class WxaSecVodGetAuthorizeObjectsRequest : WechatApiRequest, IInferable<WxaSecVodGetAuthorizeObjectsRequest, WxaSecVodGetAuthorizeObjectsResponse>
{
/// <summary>
/// 获取或设置剧目 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("drama_id")]
[System.Text.Json.Serialization.JsonPropertyName("drama_id")]
public long? DramaId { get; set; }
/// <summary>
/// 获取或设置被授权方小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("authorized_appid")]
[System.Text.Json.Serialization.JsonPropertyName("authorized_appid")]
public string? AuthorizedAppId { get; set; }
/// <summary>
/// 获取或设置分页起始位置。
/// </summary>
[Newtonsoft.Json.JsonProperty("offset")]
[System.Text.Json.Serialization.JsonPropertyName("offset")]
public int? Offset { get; set; }
/// <summary>
/// 获取或设置分页每页数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("limit")]
[System.Text.Json.Serialization.JsonPropertyName("limit")]
public int? Limit { get; set; }
}
}

View File

@@ -0,0 +1,57 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/vod/getauthorizeobjects 接口的响应。</para>
/// </summary>
public class WxaSecVodGetAuthorizeObjectsResponse : WechatApiResponse
{
public static class Types
{
public class Object
{
/// <summary>
/// 获取或设置剧目 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("drama_id")]
[System.Text.Json.Serialization.JsonPropertyName("drama_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long DramaId { get; set; }
/// <summary>
/// 获取或设置被授权方小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("authorized_appid")]
[System.Text.Json.Serialization.JsonPropertyName("authorized_appid")]
public string AuthorizedAppId { get; set; } = default!;
/// <summary>
/// 获取或设置授权时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("authorized_time")]
[System.Text.Json.Serialization.JsonPropertyName("authorized_time")]
public long AuthorizeTimestamp { get; set; }
/// <summary>
/// 获取或设置授权到期时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("authz_expire_time")]
[System.Text.Json.Serialization.JsonPropertyName("authz_expire_time")]
public long? ExpireTimestamp { get; set; }
}
}
/// <summary>
/// 获取或设置授权列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("objects")]
[System.Text.Json.Serialization.JsonPropertyName("objects")]
public Types.Object[] ObjectList { get; set; } = default!;
/// <summary>
/// 获取或设置记录总数。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_count")]
[System.Text.Json.Serialization.JsonPropertyName("total_count")]
public int TotalCount { get; set; }
}
}

View File

@@ -0,0 +1,29 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/vod/getauthorizedobjects 接口的请求。</para>
/// </summary>
public class WxaSecVodGetAuthorizedObjectsRequest : WechatApiRequest, IInferable<WxaSecVodGetAuthorizedObjectsRequest, WxaSecVodGetAuthorizedObjectsResponse>
{
/// <summary>
/// 获取或设置授权方小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("authorizer_appid")]
[System.Text.Json.Serialization.JsonPropertyName("authorizer_appid")]
public string? AuthorizerAppId { get; set; }
/// <summary>
/// 获取或设置分页起始位置。
/// </summary>
[Newtonsoft.Json.JsonProperty("offset")]
[System.Text.Json.Serialization.JsonPropertyName("offset")]
public int? Offset { get; set; }
/// <summary>
/// 获取或设置分页每页数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("limit")]
[System.Text.Json.Serialization.JsonPropertyName("limit")]
public int? Limit { get; set; }
}
}

View File

@@ -0,0 +1,57 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/vod/getauthorizedobjects 接口的响应。</para>
/// </summary>
public class WxaSecVodGetAuthorizedObjectsResponse : WechatApiResponse
{
public static class Types
{
public class Object
{
/// <summary>
/// 获取或设置剧目 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("drama_id")]
[System.Text.Json.Serialization.JsonPropertyName("drama_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long DramaId { get; set; }
/// <summary>
/// 获取或设置授权方小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("authorizer_appid")]
[System.Text.Json.Serialization.JsonPropertyName("authorizer_appid")]
public string AuthorizerAppId { get; set; } = default!;
/// <summary>
/// 获取或设置授权时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("authorized_time")]
[System.Text.Json.Serialization.JsonPropertyName("authorized_time")]
public long AuthorizeTimestamp { get; set; }
/// <summary>
/// 获取或设置授权到期时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("authz_expire_time")]
[System.Text.Json.Serialization.JsonPropertyName("authz_expire_time")]
public long? ExpireTimestamp { get; set; }
}
}
/// <summary>
/// 获取或设置授权列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("objects")]
[System.Text.Json.Serialization.JsonPropertyName("objects")]
public Types.Object[] ObjectList { get; set; } = default!;
/// <summary>
/// 获取或设置记录总数。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_count")]
[System.Text.Json.Serialization.JsonPropertyName("total_count")]
public int TotalCount { get; set; }
}
}