mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-20 10:38:10 +08:00
feat(wxapi): 新增代商家管理小程序查询小程序版本信息接口
This commit is contained in:
@@ -975,6 +975,26 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
|||||||
|
|
||||||
return await client.SendRequestWithJsonAsync<Models.WxaSpeedupAuditResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
return await client.SendRequestWithJsonAsync<Models.WxaSpeedupAuditResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /wxa/getversioninfo 接口。</para>
|
||||||
|
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/code-management/getVersionInfo.html </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.WxaGetVersionInfoResponse> ExecuteWxaGetVersionInfoAsync(this WechatApiClient client, Models.WxaGetVersionInfoRequest 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", "getversioninfo")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken);
|
||||||
|
|
||||||
|
return await client.SendRequestWithJsonAsync<Models.WxaGetVersionInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Record
|
#region Record
|
||||||
|
@@ -0,0 +1,9 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /wxa/getversioninfo 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class WxaGetVersionInfoRequest : WechatApiRequest, IInferable<WxaGetVersionInfoRequest, WxaGetVersionInfoResponse>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,73 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /wxa/getversioninfo 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class WxaGetVersionInfoResponse : WechatApiResponse
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class ExperienceInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置提交时间戳。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("exp_time")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("exp_time")]
|
||||||
|
public long Timestamp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置版本信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("exp_version")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("exp_version")]
|
||||||
|
public string Version { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置版本描述。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("exp_desc")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("exp_desc")]
|
||||||
|
public string Description { get; set; } = default!;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ReleaseInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置发布时间戳。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("release_time")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("release_time")]
|
||||||
|
public long Timestamp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置版本信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("release_version")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("release_version")]
|
||||||
|
public string Version { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置版本描述。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("release_desc")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("release_desc")]
|
||||||
|
public string Description { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置体验版信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("exp_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("exp_info")]
|
||||||
|
public Types.ExperienceInfo? ExperienceInfo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置线上版信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("release_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("release_info")]
|
||||||
|
public Types.ReleaseInfo? ReleaseInfo { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"errcode": 0,
|
||||||
|
"errmsg": "ok",
|
||||||
|
"exp_info": {
|
||||||
|
"exp_time": 1640762988,
|
||||||
|
"exp_version": "V1.0",
|
||||||
|
"exp_desc": "test"
|
||||||
|
},
|
||||||
|
"release_info": {
|
||||||
|
"release_time": 1640763902,
|
||||||
|
"release_version": "V1.5",
|
||||||
|
"release_desc": "test"
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user