mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-04-05 17:37:54 +08:00
feat(work): 新增会议高级功能账号相关接口
This commit is contained in:
parent
57fba8f55a
commit
19fc349131
@ -1630,6 +1630,108 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Vip
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/meeting/vip/submit_batch_add_job 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/99508 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinMeetingVipSubmitBatchAddJobResponse> ExecuteCgibinMeetingVipSubmitBatchAddJobAsync(this WechatWorkClient client, Models.CgibinMeetingVipSubmitBatchAddJobRequest 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, "cgi-bin", "meeting", "vip", "submit_batch_add_job")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinMeetingVipSubmitBatchAddJobResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/meeting/vip/batch_add_job_result 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/99508 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinMeetingVipBatchAddJobResultResponse> ExecuteCgibinMeetingVipBatchAddJobResultAsync(this WechatWorkClient client, Models.CgibinMeetingVipBatchAddJobResultRequest 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, "cgi-bin", "meeting", "vip", "batch_add_job_result")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinMeetingVipBatchAddJobResultResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/meeting/vip/submit_batch_del_job 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/99509 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinMeetingVipSubmitBatchDeleteJobResponse> ExecuteCgibinMeetingVipSubmitBatchDeleteJobAsync(this WechatWorkClient client, Models.CgibinMeetingVipSubmitBatchDeleteJobRequest 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, "cgi-bin", "meeting", "vip", "submit_batch_del_job")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinMeetingVipSubmitBatchDeleteJobResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/meeting/vip/batch_del_job_result 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/99509 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinMeetingVipBatchDeleteJobResultResponse> ExecuteCgibinMeetingVipBatchDeleteJobResultAsync(this WechatWorkClient client, Models.CgibinMeetingVipBatchDeleteJobResultRequest 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, "cgi-bin", "meeting", "vip", "batch_del_job_result")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinMeetingVipBatchDeleteJobResultResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/meeting/vip/list 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/99510 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinMeetingVipListResponse> ExecuteCgibinMeetingVipListAsync(this WechatWorkClient client, Models.CgibinMeetingVipListRequest 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, "cgi-bin", "meeting", "vip", "list")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinMeetingVipListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Webinar
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/meeting/webinar/create 接口。</para>
|
||||
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/meeting/vip/batch_add_job_result 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinMeetingVipBatchAddJobResultRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("jobid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("jobid")]
|
||||
public string JobId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/meeting/vip/batch_add_job_result 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinMeetingVipBatchAddJobResultResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class JobResult
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分配成功的成员账号列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("succ_userid_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("succ_userid_list")]
|
||||
public string[]? SuccessfulUserIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分配失败的成员账号列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fail_userid_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fail_userid_list")]
|
||||
public string[]? FailedUserIdList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务结果信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("job_result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("job_result")]
|
||||
public Types.JobResult JobResult { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/meeting/vip/batch_del_job_result 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinMeetingVipBatchDeleteJobResultRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("jobid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("jobid")]
|
||||
public string JobId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/meeting/vip/batch_del_job_result 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinMeetingVipBatchDeleteJobResultResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class JobResult
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置撤销分配成功的成员账号列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("succ_userid_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("succ_userid_list")]
|
||||
public string[]? SuccessfulUserIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置撤销分配失败的成员账号列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fail_userid_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fail_userid_list")]
|
||||
public string[]? FailedUserIdList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务结果信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("job_result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("job_result")]
|
||||
public Types.JobResult JobResult { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/meeting/vip/list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinMeetingVipListRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? Cursor { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/meeting/vip/list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinMeetingVipListResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置成员账号列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid_list")]
|
||||
public string[] UserIdList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否还有更多数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("has_more")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("has_more")]
|
||||
public bool HasMore { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/meeting/vip/submit_batch_add_job 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinMeetingVipSubmitBatchAddJobRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置成员账号列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid_list")]
|
||||
public IList<string> UserIdList { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/meeting/vip/submit_batch_add_job 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinMeetingVipSubmitBatchAddJobResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("jobid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("jobid")]
|
||||
public string JobId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置无效的成员账号列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("invalid_userid_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("invalid_userid_list")]
|
||||
public string[]? InvalidUserIdList { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/meeting/vip/submit_batch_del_job 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinMeetingVipSubmitBatchDeleteJobRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置成员账号列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid_list")]
|
||||
public IList<string> UserIdList { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/meeting/vip/submit_batch_del_job 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinMeetingVipSubmitBatchDeleteJobResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("jobid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("jobid")]
|
||||
public string JobId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置无效的成员账号列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("invalid_userid_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("invalid_userid_list")]
|
||||
public string[]? InvalidUserIdList { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"jobid": "xxx"
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"job_result": {
|
||||
"succ_userid_list": [ "zhangsan", "lisi" ],
|
||||
"fail_userid_list": [ "wangwu" ]
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"jobid": "xxx"
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"job_result": {
|
||||
"succ_userid_list": [ "zhangsan", "lisi" ],
|
||||
"fail_userid_list": [ "wangwu" ]
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"cursor": "CURSOR",
|
||||
"limit": 2
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"has_more": true,
|
||||
"next_cursor": "GNIJIGEO",
|
||||
"userid_list": [ "zhangsan", "lisi" ]
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"userid_list": [ "zhangsan", "lisi", "wangwu", "zhaoliu" ]
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"jobid": "xxx",
|
||||
"invalid_userid_list": [ "zhaoliu" ]
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"userid_list": [ "zhangsan", "lisi", "wangwu", "zhaoliu" ]
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"jobid": "xxx",
|
||||
"invalid_userid_list": [ "zhaoliu" ]
|
||||
}
|
Loading…
Reference in New Issue
Block a user