feat(wxapi): 移除部分已标记为废弃的接口及模型

This commit is contained in:
Fu Diwei
2024-05-20 11:15:45 +08:00
parent fffb35209e
commit 2bd10cc533
14 changed files with 1 additions and 351 deletions

View File

@@ -1,26 +0,0 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/material/add_news 接口的请求。</para>
/// </summary>
[Obsolete("相关接口或字段于 2022-02-25 下线。")]
public class CgibinMaterialAddNewsRequest : WechatApiRequest, IInferable<CgibinMaterialAddNewsRequest, CgibinMaterialAddNewsResponse>
{
public static class Types
{
public class Article : CgibinMediaUploadNewsRequest.Types.Article
{
}
}
/// <summary>
/// 获取或设置图文消息列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("articles")]
[System.Text.Json.Serialization.JsonPropertyName("articles")]
public IList<Types.Article> ArticleList { get; set; } = new List<Types.Article>();
}
}

View File

@@ -1,18 +0,0 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/material/add_news 接口的响应。</para>
/// </summary>
[Obsolete("相关接口或字段于 2022-02-25 下线。")]
public class CgibinMaterialAddNewsResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置媒体文件标识。
/// </summary>
[Newtonsoft.Json.JsonProperty("media_id")]
[System.Text.Json.Serialization.JsonPropertyName("media_id")]
public string MediaId { get; set; } = default!;
}
}

View File

@@ -1,12 +0,0 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/material/get_material 接口的请求。</para>
/// </summary>
[Obsolete("相关接口或字段于 2022-02-25 下线。")]
public class CgibinMaterialGetMaterialAsNewsRequest : CgibinMaterialGetMaterialRequest, IInferable<CgibinMaterialGetMaterialAsNewsRequest, CgibinMaterialGetMaterialAsNewsResponse>
{
}
}

View File

@@ -1,107 +0,0 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/material/get_material 接口的响应。</para>
/// </summary>
[Obsolete("相关接口或字段于 2022-02-25 下线。")]
public class CgibinMaterialGetMaterialAsNewsResponse : CgibinMaterialGetMaterialResponse
{
public static class Types
{
public class Article
{
/// <summary>
/// 获取或设置图文消息缩略图媒体文件标识。
/// </summary>
[Newtonsoft.Json.JsonProperty("thumb_media_id")]
[System.Text.Json.Serialization.JsonPropertyName("thumb_media_id")]
public string ThumbnailMediaId { get; set; } = default!;
/// <summary>
/// 获取或设置图文消息缩略图 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("thumb_url")]
[System.Text.Json.Serialization.JsonPropertyName("thumb_url")]
public string ThumbnailUrl { get; set; } = default!;
/// <summary>
/// 获取或设置图文消息标题。
/// </summary>
[Newtonsoft.Json.JsonProperty("title")]
[System.Text.Json.Serialization.JsonPropertyName("title")]
public string Title { get; set; } = default!;
/// <summary>
/// 获取或设置图文消息作者。
/// </summary>
[Newtonsoft.Json.JsonProperty("author")]
[System.Text.Json.Serialization.JsonPropertyName("author")]
public string Author { get; set; } = default!;
/// <summary>
/// 获取或设置图文消息摘要。
/// </summary>
[Newtonsoft.Json.JsonProperty("digest")]
[System.Text.Json.Serialization.JsonPropertyName("digest")]
public string Digest { get; set; } = default!;
/// <summary>
/// 获取或设置图文消息阅读原文 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("content_source_url")]
[System.Text.Json.Serialization.JsonPropertyName("content_source_url")]
public string ContentSourceUrl { get; set; } = default!;
/// <summary>
/// 获取或设置图文消息页面的内容。
/// </summary>
[Newtonsoft.Json.JsonProperty("content")]
[System.Text.Json.Serialization.JsonPropertyName("content")]
public string Content { get; set; } = default!;
/// <summary>
/// 获取或设置图文消息页面的 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("url")]
[System.Text.Json.Serialization.JsonPropertyName("url")]
public string Url { get; set; } = default!;
/// <summary>
/// 获取或设置是否显示封面。
/// </summary>
[Newtonsoft.Json.JsonProperty("show_cover_pic")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("show_cover_pic")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool IsShowCover { get; set; }
/// <summary>
/// 获取或设置是否打开评论。
/// </summary>
[Newtonsoft.Json.JsonProperty("need_open_comment")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("need_open_comment")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool? IsOpenComment { get; set; }
/// <summary>
/// 获取或设置是否粉丝才可评论。
/// </summary>
[Newtonsoft.Json.JsonProperty("only_fans_can_comment")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("only_fans_can_comment")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool? IsOnlyFansCanComment { get; set; }
}
}
/// <summary>
/// 获取或设置图文消息素材列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("news_item")]
[System.Text.Json.Serialization.JsonPropertyName("news_item")]
public Types.Article[] ArticleList { get; set; } = default!;
}
}

View File

@@ -1,39 +0,0 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/material/update_news 接口的请求。</para>
/// </summary>
[Obsolete("相关接口或字段于 2022-02-25 下线。")]
public class CgibinMaterialUpdateNewsRequest : WechatApiRequest, IInferable<CgibinMaterialUpdateNewsRequest, CgibinMaterialUpdateNewsResponse>
{
public static class Types
{
public class Article : CgibinMaterialAddNewsRequest.Types.Article
{
}
}
/// <summary>
/// 获取或设置媒体文件标识。
/// </summary>
[Newtonsoft.Json.JsonProperty("media_id")]
[System.Text.Json.Serialization.JsonPropertyName("media_id")]
public string MediaId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置要更新的文章在图文消息中的位置(从 0 开始)。
/// </summary>
[Newtonsoft.Json.JsonProperty("index")]
[System.Text.Json.Serialization.JsonPropertyName("index")]
public int Index { get; set; }
/// <summary>
/// 获取或设置要更新的图文消息。
/// </summary>
[Newtonsoft.Json.JsonProperty("articles")]
[System.Text.Json.Serialization.JsonPropertyName("articles")]
public Types.Article Article { get; set; } = new Types.Article();
}
}

View File

@@ -1,12 +0,0 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/material/update_news 接口的响应。</para>
/// </summary>
[Obsolete("相关接口或字段于 2022-02-25 下线。")]
public class CgibinMaterialUpdateNewsResponse : WechatApiResponse
{
}
}

View File

@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
@@ -30,10 +29,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public string MediaId { get; set; } = string.Empty;
}
public class MpNewsMessage : ImageMessage
{
}
public class NewsMessage
{
public static class Types
@@ -302,14 +297,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("text")]
public Types.TextMessage? MessageContentForText { get; set; }
/// <summary>
/// 获取或设置图文消息内容。
/// </summary>
[Obsolete("相关接口或字段于 2021-12-31 下线。")]
[Newtonsoft.Json.JsonProperty("mpnews")]
[System.Text.Json.Serialization.JsonPropertyName("mpnews")]
public Types.MpNewsMessage? MessageContentForMpNews { get; set; }
/// <summary>
/// 获取或设置图文链接消息内容。
/// </summary>