mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-03-10 00:13:36 +08:00
feat(wxapi): 新增小程序用工关系相关接口
This commit is contained in:
@@ -80,6 +80,7 @@
|
|||||||
| √ | 插件管理 | | |
|
| √ | 插件管理 | | |
|
||||||
| √ | 云开发 | | |
|
| √ | 云开发 | | |
|
||||||
| √ | 附近小程序 | | |
|
| √ | 附近小程序 | | |
|
||||||
|
| √ | 用工关系 | | |
|
||||||
| √ | 图像处理与文字识别 | | |
|
| √ | 图像处理与文字识别 | | |
|
||||||
| √ | 微信红包封面 | | |
|
| √ | 微信红包封面 | | |
|
||||||
| √ | 即时配送 | | |
|
| √ | 即时配送 | | |
|
||||||
|
|||||||
@@ -79,5 +79,28 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
|||||||
|
|
||||||
return await client.SendFlurlRequestAsJsonAsync<Models.CgibinMessageWxopenUpdatableMessageSendResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
return await client.SendFlurlRequestAsJsonAsync<Models.CgibinMessageWxopenUpdatableMessageSendResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /cgi-bin/message/wxopen/employeerelationmsg/send 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/laboruse/api_sendemployeerelationmsg.html ]]>
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.CgibinMessageWxopenEmployeeRelationMessageSendResponse> ExecuteCgibinMessageWxopenEmployeeRelationMessageSendAsync(this WechatApiClient client, Models.CgibinMessageWxopenEmployeeRelationMessageSendRequest 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
|
||||||
|
.CreateFlurlRequest(request, HttpMethod.Post, "cgi-bin", "message", "wxopen", "employeerelationmsg", "send")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken);
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.CgibinMessageWxopenEmployeeRelationMessageSendResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,6 +128,31 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region B2CAuth
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /wxa/business/unbinduserb2cauthinfo 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/laboruse/api_unbinduserb2cauthinfo.html ]]>
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.WxaBusinessUnbindUserB2CAuthInfoResponse> ExecuteWxaBusinessUnbindUserB2CAuthInfoAsync(this WechatApiClient client, Models.WxaBusinessUnbindUserB2CAuthInfoRequest 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
|
||||||
|
.CreateFlurlRequest(request, HttpMethod.Post, "wxa", "business", "unbinduserb2cauthinfo")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken);
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.WxaBusinessUnbindUserB2CAuthInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region GameMatch
|
#region GameMatch
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>异步调用 [POST] /wxa/business/gamematch/creatematchrule 接口。</para>
|
/// <para>异步调用 [POST] /wxa/business/gamematch/creatematchrule 接口。</para>
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /cgi-bin/message/wxopen/employeerelationmsg/send 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class CgibinMessageWxopenEmployeeRelationMessageSendRequest : WechatApiRequest, IInferable<CgibinMessageWxopenEmployeeRelationMessageSendRequest, CgibinMessageWxopenEmployeeRelationMessageSendResponse>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置模板 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("template_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("template_id")]
|
||||||
|
public string TemplateId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置接收消息的用户 OpenId。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("touser")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("touser")]
|
||||||
|
public string ToUserOpenId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置小程序页面路径。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("page")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("page")]
|
||||||
|
public string PagePath { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置推送数据 JSON 字符串。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("data")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||||
|
public string? DataJson { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /cgi-bin/message/wxopen/employeerelationmsg/send 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class CgibinMessageWxopenEmployeeRelationMessageSendResponse : WechatApiResponse
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /wxa/business/unbinduserb2cauthinfo 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class WxaBusinessUnbindUserB2CAuthInfoRequest : WechatApiRequest, IInferable<WxaBusinessUnbindUserB2CAuthInfoRequest, WxaBusinessUnbindUserB2CAuthInfoResponse>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置解绑用户的 OpenId 列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("openid_list")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("openid_list")]
|
||||||
|
public IList<string> OpenIdList { get; set; } = new List<string>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /wxa/business/unbinduserb2cauthinfo 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class WxaBusinessUnbindUserB2CAuthInfoResponse : WechatApiResponse
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"template_id": "bV8Jk-XXXXXX",
|
||||||
|
"page": "page/XXX",
|
||||||
|
"touser": "oL7T268t3zlOb64IvrN64-XXXXXX",
|
||||||
|
"data": "{\"data\":{\"character_string1\":{\"value\":\"aaa\"},\"amount1\":{\"value\":\"222\"}}}"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"openid_list": [
|
||||||
|
"oL7T268t3zlOb64IvrN64-XXXXXX"
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user