mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-20 02:29:40 +08:00
feat(wxapi): 移除部分已标记为废弃的接口及模型
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -128,29 +128,5 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinDraftBatchGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/draft/switch 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/offiaccount/Draft_Box/Temporary_MP_Switch.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("相关接口或字段于 2022-02-25 下线。")]
|
||||
public static async Task<Models.CgibinDraftSwitchResponse> ExecuteCgibinDraftSwitchAsync(this WechatApiClient client, Models.CgibinDraftSwitchRequest 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", "draft", "switch")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
if (request.OnlyCheck != null)
|
||||
flurlReq.SetQueryParam("checkonly", request.OnlyCheck.Value ? 1 : 0);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinDraftSwitchResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -39,7 +39,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("相关接口或字段于 2022-02-25 下线。")]
|
||||
public static async Task<Models.CgibinMaterialAddMaterialResponse> ExecuteCgibinMaterialAddMaterialAsync(this WechatApiClient client, Models.CgibinMaterialAddMaterialRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
|
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/draft/switch 接口的请求。</para>
|
||||
/// </summary>
|
||||
[Obsolete("相关接口或字段于 2022-02-25 下线。")]
|
||||
public class CgibinDraftSwitchRequest : WechatApiRequest, IInferable<CgibinDraftSwitchRequest, CgibinDraftSwitchResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否只检查状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public bool? OnlyCheck { get; set; }
|
||||
}
|
||||
}
|
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/draft/switch 接口的响应。</para>
|
||||
/// </summary>
|
||||
[Obsolete("相关接口或字段于 2022-02-25 下线。")]
|
||||
public class CgibinDraftSwitchResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否开启草稿箱功能。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_open")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_open")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
|
||||
public bool IsOpen { get; set; }
|
||||
}
|
||||
}
|
@@ -1,11 +1,10 @@
|
||||
using System;
|
||||
using System;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/material/add_material 接口的请求。</para>
|
||||
/// </summary>
|
||||
[Obsolete("相关接口或字段于 2022-02-25 下线。")]
|
||||
public class CgibinMaterialAddMaterialRequest : WechatApiRequest, IInferable<CgibinMaterialAddMaterialRequest, CgibinMaterialAddMaterialResponse>
|
||||
{
|
||||
/// <summary>
|
||||
|
@@ -1,11 +1,10 @@
|
||||
using System;
|
||||
using System;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/material/add_material 接口的响应。</para>
|
||||
/// </summary>
|
||||
[Obsolete("相关接口或字段于 2022-02-25 下线。")]
|
||||
public class CgibinMaterialAddMaterialResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ERRMSG",
|
||||
"is_open": 0
|
||||
}
|
Reference in New Issue
Block a user