mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-04-05 17:37:54 +08:00
feat(wxapi): 新增代商家管理小程序获取隐私接口检测结果接口
This commit is contained in:
parent
fa15407170
commit
b77dd289fe
@ -560,6 +560,26 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WxaSecurityGetPrivacyInterfaceResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /wxa/security/get_code_privacy_info 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/code-management/getCodePrivacyInfo.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.WxaSecurityGetCodePrivacyInfoResponse> ExecuteWxaSecurityGetCodePrivacyInfoAsync(this WechatApiClient client, Models.WxaSecurityGetCodePrivacyInfoRequest 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.Get, "wxa", "security", "get_code_privacy_info")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WxaSecurityGetCodePrivacyInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Member
|
||||
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /wxa/security/get_code_privacy_info 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WxaSecurityGetCodePrivacyInfoRequest : WechatApiRequest, IInferable<WxaSecurityGetCodePrivacyInfoRequest, WxaSecurityGetCodePrivacyInfoResponse>
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /wxa/security/get_code_privacy_info 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WxaSecurityGetCodePrivacyInfoResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置没权限的隐私接口的 API 英文名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("without_auth_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("without_auth_list")]
|
||||
public string[] WithoutAuthApiNameList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置没配置的隐私接口的 API 英文名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("without_conf_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("without_conf_list")]
|
||||
public string[] WithoutConfigApiNameList { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"without_auth_list": [
|
||||
"wx.getLocation",
|
||||
"wx.onLocationChange"
|
||||
],
|
||||
"without_conf_list": [
|
||||
"wx.onLocationChange"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user