mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-02-11 18:26:20 +08:00
feat(wxapi): 新增代商家管理小程序 We 分析相关接口
This commit is contained in:
@@ -0,0 +1,152 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
{
|
||||
public static class WechatApiClientExecuteWeDataExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /wedata/wedata_get_login_config 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/we-analysis/weDataGetLoginConfig.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.WeDataGetLoginConfigResponse> ExecuteWeDataGetLoginConfigAsync(this WechatApiClient client, Models.WeDataGetLoginConfigRequest 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, "wedata", "wedata_get_login_config")
|
||||
.SetQueryParam("access_token", request.ComponentAccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WeDataGetLoginConfigResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /wedata/wedata_set_login_config 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/we-analysis/weDataSetLoginConfig.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.WeDataSetLoginConfigResponse> ExecuteWeDataSetLoginConfigAsync(this WechatApiClient client, Models.WeDataSetLoginConfigRequest 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, "wedata", "wedata_set_login_config")
|
||||
.SetQueryParam("access_token", request.ComponentAccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WeDataSetLoginConfigResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /wedata/wedata_get_perm_list 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/we-analysis/weDataGetPermList.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.WeDataGetPermissionListResponse> ExecuteWeDataGetPermissionListAsync(this WechatApiClient client, Models.WeDataGetPermissionListRequest 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, "wedata", "wedata_get_perm_list")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WeDataGetPermissionListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /wedata/wedata_set_user_perm 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/we-analysis/weDataSetUserPerm.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.WeDataSetUserPermissionResponse> ExecuteWeDataSetUserPermissionAsync(this WechatApiClient client, Models.WeDataSetUserPermissionRequest 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, "wedata", "wedata_set_user_perm")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WeDataSetUserPermissionResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /wedata/wedata_query_bind_list 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/we-analysis/weDataQueryBindList.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.WeDataQueryBindListResponse> ExecuteWeDataQueryBindListAsync(this WechatApiClient client, Models.WeDataQueryBindListRequest 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, "wedata", "wedata_query_bind_list")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WeDataQueryBindListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /wedata/wedata_unbind_user 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/we-analysis/weDataUnbindUser.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.WeDataUnbindUserResponse> ExecuteWeDataUnbindUserAsync(this WechatApiClient client, Models.WeDataUnbindUserRequest 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, "wedata", "wedata_unbind_user")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WeDataUnbindUserResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /wedata/wedata_login 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/we-analysis/wedata_login.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.WeDataLoginResponse> ExecuteWeDataLoginAsync(this WechatApiClient client, Models.WeDataLoginRequest 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, "wedata", "wedata_login")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WeDataLoginResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wedata/wedata_get_login_config 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WeDataGetLoginConfigRequest : WechatApiRequest, IInferable<WeDataGetLoginConfigRequest, WeDataGetLoginConfigResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置第三方平台 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string ComponentAccessToken { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wedata/wedata_get_login_config 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WeDataGetLoginConfigResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class AppInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置小程序 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序昵称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("nickname")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("nickname")]
|
||||
public string Nickname { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("component_appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("component_appid")]
|
||||
public string ComponentAppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置服务商昵称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("component_nickname")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("component_nickname")]
|
||||
public string ComponentNickname { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置反查地址。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recheck_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recheck_url")]
|
||||
public string RecheckUrl { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置关联小程序列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appinfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appinfo")]
|
||||
public Types.AppInfo[] AssociatedAppList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wedata/wedata_get_perm_list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WeDataGetPermissionListRequest : WechatApiRequest, IInferable<WeDataGetPermissionListRequest, WeDataGetPermissionListResponse>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wedata/wedata_get_perm_list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WeDataGetPermissionListResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Permission
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置权限集 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("perm_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("perm_id")]
|
||||
public string PermissionId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置权限集名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置权限集描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc")]
|
||||
public string Description { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置权限集列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("perm")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("perm")]
|
||||
public Types.Permission[] PermissionList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wedata/wedata_login 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WeDataLoginRequest : WechatApiRequest, IInferable<WeDataLoginRequest, WeDataLoginResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户在服务商系统的唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("uid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("uid")]
|
||||
public string UserId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户在服务商系统的会话标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_session")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_session")]
|
||||
public string UserSession { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户 IP。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("client_ip")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("client_ip")]
|
||||
public string? ClientIp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户 UserAgent。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_agent")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_agent")]
|
||||
public string? UserAgent { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wedata/wedata_login 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WeDataLoginResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class BaseResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置错误码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ret")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ret")]
|
||||
public int ErrorCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置错误信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("err_msg")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("err_msg")]
|
||||
public string ErrorMessage { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置基本响应信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("base_resp")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("base_resp")]
|
||||
public Types.BaseResponse BaseResponse { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 We 分析登录链接。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("redirect_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("redirect_url")]
|
||||
public string? RedirectUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置过期时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("expire_at")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("expire_at")]
|
||||
public long? ExpireTimestamp { get; set; }
|
||||
|
||||
public override bool IsSuccessful()
|
||||
{
|
||||
return base.IsSuccessful() && BaseResponse != null && BaseResponse.ErrorCode == 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wedata/wedata_query_bind_list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WeDataQueryBindListRequest : WechatApiRequest, IInferable<WeDataQueryBindListRequest, WeDataQueryBindListResponse>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wedata/wedata_query_bind_list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WeDataQueryBindListResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class UserInfo
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Permission : WeDataGetPermissionListResponse.Types.Permission
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户在服务商系统的唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("uid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("uid")]
|
||||
public string UserId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否绑定了微信号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_bind")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_bind")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
|
||||
public bool IsBind { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户微信昵称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("nickname")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("nickname")]
|
||||
public string? Nickname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户微信头像 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("head_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("head_url")]
|
||||
public string? HeadImageUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置更新建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("update_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("update_time")]
|
||||
public long UpdateTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户权限集列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("perm")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("perm")]
|
||||
public Types.Permission[]? PermissionList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户绑定信息列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("info")]
|
||||
public Types.UserInfo[] UserList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wedata/wedata_set_login_config 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WeDataSetLoginConfigRequest : WechatApiRequest, IInferable<WeDataSetLoginConfigRequest, WeDataSetLoginConfigResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置第三方平台 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string ComponentAccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设置类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("set_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("set_type")]
|
||||
public int SetType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置反查地址。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recheck_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recheck_url")]
|
||||
public string? RecheckUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置关联小程序 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("associate_appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("associate_appid")]
|
||||
public IList<string>? AssociatedAppIdList { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wedata/wedata_set_login_config 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WeDataSetLoginConfigResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wedata/wedata_set_user_perm 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WeDataSetUserPermissionRequest : WechatApiRequest, IInferable<WeDataSetUserPermissionRequest, WeDataSetUserPermissionResponse>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Permission
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置权限集 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("perm_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("perm_id")]
|
||||
public string PermissionId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置权限集名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置权限集描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc")]
|
||||
public string? Description { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户在服务商系统的唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("uid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("uid")]
|
||||
public string UserId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置权限集列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("perm")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("perm")]
|
||||
public IList<Types.Permission> PermissionList { get; set; } = new List<Types.Permission>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wedata/wedata_set_user_perm 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WeDataSetUserPermissionResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wedata/wedata_unbind_user 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WeDataUnbindUserRequest : WechatApiRequest, IInferable<WeDataUnbindUserRequest, WeDataUnbindUserResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户在服务商系统的唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("uid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("uid")]
|
||||
public string UserId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wedata/wedata_unbind_user 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WeDataUnbindUserResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -15,8 +15,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
/// <summary>
|
||||
/// 获取或设置媒体文件标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("media_id")]
|
||||
[Newtonsoft.Json.JsonProperty("mediaid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mediaid")]
|
||||
public string MediaId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user