From a2188d28b3855c0d8d365258039e2c885bfd5744 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Tue, 29 Apr 2025 17:23:25 +0800 Subject: [PATCH] =?UTF-8?q?feat(wxapi):=20=E6=96=B0=E5=A2=9E=E5=B0=8F?= =?UTF-8?q?=E8=AF=B4=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=BD=9C=E5=93=81=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...WechatApiClientExecuteWxaBookExtensions.cs | 406 ++++++++++++++++++ ...atApiClientExecuteWxaBusinessExtensions.cs | 71 +++ ...echatApiClientExecuteWxaDramaExtensions.cs | 2 +- .../WxaBook/Auth/WxaBookAddBookAuthRequest.cs | 44 ++ .../Auth/WxaBookAddBookAuthResponse.cs | 28 ++ .../Auth/WxaBookDeleteBookAuthRequest.cs | 22 + .../Auth/WxaBookDeleteBookAuthResponse.cs | 9 + .../Auth/WxaBookQueryBookAuthRequest.cs | 43 ++ .../Auth/WxaBookQueryBookAuthResponse.cs | 56 +++ .../Models/WxaBook/WxaBookAuditBookRequest.cs | 15 + .../WxaBook/WxaBookAuditBookResponse.cs | 9 + .../WxaBookBatchCreateChapterRequest.cs | 31 ++ .../WxaBookBatchCreateChapterResponse.cs | 22 + .../WxaBook/WxaBookCreateBookRequest.cs | 101 +++++ .../WxaBook/WxaBookCreateBookResponse.cs | 15 + .../WxaBook/WxaBookCreateChapterRequest.cs | 63 +++ .../WxaBook/WxaBookCreateChapterResponse.cs | 15 + .../WxaBook/WxaBookDeleteBookRequest.cs | 15 + .../WxaBook/WxaBookDeleteBookResponse.cs | 9 + .../WxaBook/WxaBookDeleteChapterRequest.cs | 22 + .../WxaBook/WxaBookDeleteChapterResponse.cs | 9 + .../Models/WxaBook/WxaBookGetBookRequest.cs | 29 ++ .../Models/WxaBook/WxaBookGetBookResponse.cs | 76 ++++ .../WxaBook/WxaBookGetChapterRequest.cs | 29 ++ .../WxaBook/WxaBookGetChapterResponse.cs | 35 ++ .../Models/WxaBook/WxaBookListBookRequest.cs | 36 ++ .../Models/WxaBook/WxaBookListBookResponse.cs | 202 +++++++++ .../WxaBook/WxaBookListChapterRequest.cs | 43 ++ .../WxaBook/WxaBookListChapterResponse.cs | 98 +++++ .../WxaBook/WxaBookReorderChapterRequest.cs | 36 ++ .../WxaBook/WxaBookReorderChapterResponse.cs | 9 + .../WxaBook/WxaBookReplaceChapterRequest.cs | 36 ++ .../WxaBook/WxaBookReplaceChapterResponse.cs | 15 + .../WxaBook/WxaBookUpdateBookRequest.cs | 163 +++++++ .../WxaBook/WxaBookUpdateBookResponse.cs | 9 + .../WxaBookUpdateChapterSequenceRequest.cs | 44 ++ .../WxaBookUpdateChapterSequenceResponse.cs | 9 + ...essNovelReaderGetPreviewSettingsRequest.cs | 15 + ...ssNovelReaderGetPreviewSettingsResponse.cs | 62 +++ ...essNovelReaderSetPreviewSettingsRequest.cs | 64 +++ ...ssNovelReaderSetPreviewSettingsResponse.cs | 9 + ...nessNovelReaderSetRecommendNovelRequest.cs | 24 ++ ...essNovelReaderSetRecommendNovelResponse.cs | 9 + ...amaSetPlayerDramaRecommendSwitchRequest.cs | 3 +- .../Auth/WxaBookAddBookAuthRequest.json | 14 + .../Auth/WxaBookAddBookAuthResponse.json | 8 + .../Auth/WxaBookDeleteBookAuthRequest.json | 4 + .../Auth/WxaBookQueryBookAuthRequest.json | 4 + .../Auth/WxaBookQueryBookAuthResponse.json | 17 + .../WxaBook/WxaBookAuditBookRequest.json | 3 + .../WxaBookBatchCreateChapterRequest.json | 13 + .../WxaBookBatchCreateChapterResponse.json | 5 + .../WxaBook/WxaBookCreateBookRequest.json | 10 + .../WxaBook/WxaBookCreateBookResponse.json | 5 + .../WxaBook/WxaBookCreateChapterRequest.json | 7 + .../WxaBook/WxaBookCreateChapterResponse.json | 5 + .../WxaBook/WxaBookDeleteBookRequest.json | 3 + .../WxaBook/WxaBookDeleteChapterRequest.json | 4 + .../WxaBook/WxaBookGetBookRequest.json | 3 + .../WxaBook/WxaBookGetBookResponse.json | 26 ++ .../WxaBook/WxaBookGetChapterRequest.json | 4 + .../WxaBook/WxaBookGetChapterResponse.json | 19 + .../WxaBook/WxaBookListBookRequest.json | 5 + .../WxaBook/WxaBookListBookResponse.json | 26 ++ .../WxaBook/WxaBookListChapterRequest.json | 6 + .../WxaBook/WxaBookListChapterResponse.json | 16 + .../WxaBook/WxaBookReorderChapterRequest.json | 6 + .../WxaBook/WxaBookReplaceChapterRequest.json | 6 + .../WxaBookReplaceChapterResponse.json | 5 + .../WxaBook/WxaBookUpdateBookRequest.json | 17 + .../WxaBookUpdateChapterSequenceRequest.json | 13 + ...sNovelReaderGetPreviewSettingsRequest.json | 3 + ...NovelReaderGetPreviewSettingsResponse.json | 14 + ...sNovelReaderSetPreviewSettingsRequest.json | 12 + ...ssNovelReaderSetRecommendNovelRequest.json | 7 + 75 files changed, 2350 insertions(+), 2 deletions(-) create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBookExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookAddBookAuthRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookAddBookAuthResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookDeleteBookAuthRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookDeleteBookAuthResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookQueryBookAuthRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookQueryBookAuthResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookAuditBookRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookAuditBookResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookBatchCreateChapterRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookBatchCreateChapterResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateBookRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateBookResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateChapterRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateChapterResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteBookRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteBookResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteChapterRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteChapterResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetBookRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetBookResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetChapterRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetChapterResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListBookRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListBookResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListChapterRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListChapterResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReorderChapterRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReorderChapterResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReplaceChapterRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReplaceChapterResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateBookRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateBookResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateChapterSequenceRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateChapterSequenceResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetPreviewSettingsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetPreviewSettingsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetRecommendNovelRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetRecommendNovelResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookAddBookAuthRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookAddBookAuthResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookDeleteBookAuthRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookQueryBookAuthRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookQueryBookAuthResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookAuditBookRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookBatchCreateChapterRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookBatchCreateChapterResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateBookRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateBookResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateChapterRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateChapterResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookDeleteBookRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookDeleteChapterRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetBookRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetBookResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetChapterRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetChapterResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListBookRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListBookResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListChapterRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListChapterResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookReorderChapterRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookReplaceChapterRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookReplaceChapterResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookUpdateBookRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookUpdateChapterSequenceRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetPreviewSettingsRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetRecommendNovelRequest.json diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBookExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBookExtensions.cs new file mode 100644 index 00000000..34a72144 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBookExtensions.cs @@ -0,0 +1,406 @@ +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 WechatApiClientExecuteWxaBookExtensions + { + /// + /// 异步调用 [POST] /wxa/book/createbook 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookCreateBookAsync(this WechatApiClient client, Models.WxaBookCreateBookRequest 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", "book", "createbook") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/updatebook 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookUpdateBookAsync(this WechatApiClient client, Models.WxaBookUpdateBookRequest 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", "book", "updatebook") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/deletebook 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookDeleteBookAsync(this WechatApiClient client, Models.WxaBookDeleteBookRequest 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", "book", "deletebook") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/listbook 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookListBookAsync(this WechatApiClient client, Models.WxaBookListBookRequest 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", "book", "listbook") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/getbook 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookGetBookAsync(this WechatApiClient client, Models.WxaBookGetBookRequest 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", "book", "getbook") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/createchapter 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookCreateChapterAsync(this WechatApiClient client, Models.WxaBookCreateChapterRequest 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", "book", "createchapter") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/batchcreatechapter 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookBatchCreateChapterAsync(this WechatApiClient client, Models.WxaBookBatchCreateChapterRequest 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", "book", "batchcreatechapter") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/deletechapter 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookDeleteChapterAsync(this WechatApiClient client, Models.WxaBookDeleteChapterRequest 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", "book", "deletechapter") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/replacechapter 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookReplaceChapterAsync(this WechatApiClient client, Models.WxaBookReplaceChapterRequest 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", "book", "replacechapter") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/listchapter 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookListChapterAsync(this WechatApiClient client, Models.WxaBookListChapterRequest 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", "book", "listchapter") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/getchapter 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookGetChapterAsync(this WechatApiClient client, Models.WxaBookGetChapterRequest 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", "book", "getchapter") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/reorderchapter 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookReorderChapterAsync(this WechatApiClient client, Models.WxaBookReorderChapterRequest 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", "book", "reorderchapter") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/updatechapterseq 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookUpdateChapterSequenceAsync(this WechatApiClient client, Models.WxaBookUpdateChapterSequenceRequest 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", "book", "updatechapterseq") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/auditbook 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookAuditBookAsync(this WechatApiClient client, Models.WxaBookAuditBookRequest 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", "book", "auditbook") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + #region Auth + /// + /// 异步调用 [POST] /wxa/book/addbookauth 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookAddBookAuthAsync(this WechatApiClient client, Models.WxaBookAddBookAuthRequest 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", "book", "addbookauth") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/querybookauth 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookQueryBookAuthAsync(this WechatApiClient client, Models.WxaBookQueryBookAuthRequest 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", "book", "querybookauth") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/book/delbookauth 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBookDeleteBookAuthAsync(this WechatApiClient client, Models.WxaBookDeleteBookAuthRequest 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", "book", "delbookauth") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBusinessExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBusinessExtensions.cs index 093ed47c..c29f6779 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBusinessExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBusinessExtensions.cs @@ -840,6 +840,77 @@ namespace SKIT.FlurlHttpClient.Wechat.Api } #endregion + #region NovelReader + /// + /// 异步调用 [POST] /wxa/business/novelreader/setpreviewsetting 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBusinessNovelReaderSetPreviewSettingsAsync(this WechatApiClient client, Models.WxaBusinessNovelReaderSetPreviewSettingsRequest 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", "novelreader", "setpreviewsetting") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/business/novelreader/getpreviewsetting 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBusinessNovelReaderGetPreviewSettingsAsync(this WechatApiClient client, Models.WxaBusinessNovelReaderGetPreviewSettingsRequest 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", "novelreader", "getpreviewsetting") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /wxa/business/novelreader/setrecmdnovel 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWxaBusinessNovelReaderSetRecommendNovelAsync(this WechatApiClient client, Models.WxaBusinessNovelReaderSetRecommendNovelRequest 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", "novelreader", "setrecmdnovel") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + #region Runtime /// /// 异步调用 [POST] /wxa/business/runtime/adddevice 接口。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaDramaExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaDramaExtensions.cs index c26ff5d5..e4ff5ba9 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaDramaExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaDramaExtensions.cs @@ -13,7 +13,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api /// 异步调用 [POST] /wxadrama/setplayerdramarecmdswitch 接口。 /// /// REF:
- /// + /// ///
///
/// diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookAddBookAuthRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookAddBookAuthRequest.cs new file mode 100644 index 00000000..e6aa77e0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookAddBookAuthRequest.cs @@ -0,0 +1,44 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/addbookauth 接口的请求。 + /// + public class WxaBookAddBookAuthRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class Book + { + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + + /// + /// 获取或设置被授权账号 AppId。 + /// + [Newtonsoft.Json.JsonProperty("grantee_appid")] + [System.Text.Json.Serialization.JsonPropertyName("grantee_appid")] + public string GranteeAppId { get; set; } = string.Empty; + + /// + /// 获取或设置授权到期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expire_time")] + [System.Text.Json.Serialization.JsonPropertyName("expire_time")] + public long? ExpireTimestamp { get; set; } + } + } + + /// + /// 获取或设置作品列表。 + /// + [Newtonsoft.Json.JsonProperty("books")] + [System.Text.Json.Serialization.JsonPropertyName("books")] + public IList BookList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookAddBookAuthResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookAddBookAuthResponse.cs new file mode 100644 index 00000000..06736dde --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookAddBookAuthResponse.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/addbookauth 接口的响应。 + /// + public class WxaBookAddBookAuthResponse : WechatApiResponse + { + public static class Types + { + public class Result + { + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("errcode")] + [System.Text.Json.Serialization.JsonPropertyName("errcode")] + public int ErrorCode { get; set; } + } + } + + /// + /// 获取或设置结果列表。 + /// + [Newtonsoft.Json.JsonProperty("results")] + [System.Text.Json.Serialization.JsonPropertyName("results")] + public Types.Result[] ResultList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookDeleteBookAuthRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookDeleteBookAuthRequest.cs new file mode 100644 index 00000000..5924f0f1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookDeleteBookAuthRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/delbookauth 接口的请求。 + /// + public class WxaBookDeleteBookAuthRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + + /// + /// 获取或设置被授权账号 AppId。 + /// + [Newtonsoft.Json.JsonProperty("grantee_appid")] + [System.Text.Json.Serialization.JsonPropertyName("grantee_appid")] + public string GranteeAppId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookDeleteBookAuthResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookDeleteBookAuthResponse.cs new file mode 100644 index 00000000..5352b017 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookDeleteBookAuthResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/delbookauth 接口的响应。 + /// + public class WxaBookDeleteBookAuthResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookQueryBookAuthRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookQueryBookAuthRequest.cs new file mode 100644 index 00000000..092aed5a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookQueryBookAuthRequest.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/querybookauth 接口的请求。 + /// + public class WxaBookQueryBookAuthRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string? BookId { get; set; } + + /// + /// 获取或设置是否返回总数量。 + /// + [Newtonsoft.Json.JsonProperty("is_sum")] + [System.Text.Json.Serialization.JsonPropertyName("is_sum")] + public bool? IsNeedTotalCount { get; set; } + + /// + /// 获取或设置查询类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int? Type { get; set; } + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("offset")] + [System.Text.Json.Serialization.JsonPropertyName("offset")] + public int? Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int? Limit { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookQueryBookAuthResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookQueryBookAuthResponse.cs new file mode 100644 index 00000000..0a9c1fc1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/Auth/WxaBookQueryBookAuthResponse.cs @@ -0,0 +1,56 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/querybookauth 接口的响应。 + /// + public class WxaBookQueryBookAuthResponse : WechatApiResponse + { + public static class Types + { + public class Result + { + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = default!; + + /// + /// 获取或设置主授权账号 AppId。 + /// + [Newtonsoft.Json.JsonProperty("grantor_appid")] + [System.Text.Json.Serialization.JsonPropertyName("grantor_appid")] + public string GrantorAppId { get; set; } = default!; + + /// + /// 获取或设置被授权账号 AppId。 + /// + [Newtonsoft.Json.JsonProperty("grantee_appid")] + [System.Text.Json.Serialization.JsonPropertyName("grantee_appid")] + public string GranteeAppId { get; set; } = default!; + + /// + /// 获取或设置授权到期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expire_time")] + [System.Text.Json.Serialization.JsonPropertyName("expire_time")] + public long? ExpireTimestamp { get; set; } + } + } + + /// + /// 获取或设置结果列表。 + /// + [Newtonsoft.Json.JsonProperty("results")] + [System.Text.Json.Serialization.JsonPropertyName("results")] + public Types.Result[] ResultList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("sum")] + [System.Text.Json.Serialization.JsonPropertyName("sum")] + public int? TotalCount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookAuditBookRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookAuditBookRequest.cs new file mode 100644 index 00000000..2b6ff912 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookAuditBookRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/auditbook 接口的请求。 + /// + public class WxaBookAuditBookRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookAuditBookResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookAuditBookResponse.cs new file mode 100644 index 00000000..c7cade4f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookAuditBookResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/auditbook 接口的响应。 + /// + public class WxaBookAuditBookResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookBatchCreateChapterRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookBatchCreateChapterRequest.cs new file mode 100644 index 00000000..fdbcf896 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookBatchCreateChapterRequest.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/batchcreatechapter 接口的请求。 + /// + public class WxaBookBatchCreateChapterRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class Chapter : WxaBookCreateChapterRequest.Types.Chapter + { + } + } + + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + + /// + /// 获取或设置章节列表。 + /// + [Newtonsoft.Json.JsonProperty("chapter_list")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_list")] + public IList ChapterList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookBatchCreateChapterResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookBatchCreateChapterResponse.cs new file mode 100644 index 00000000..7080fa18 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookBatchCreateChapterResponse.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/batchcreatechapter 接口的响应。 + /// + public class WxaBookBatchCreateChapterResponse : WechatApiResponse + { + /// + /// 获取或设置章节 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("chapter_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_id_list")] + public string[] ChapterIdList { get; set; } = default!; + + /// + /// 获取或设置冲突的提供方章节唯一标识列表。 + /// + [Newtonsoft.Json.JsonProperty("conflict_original_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("conflict_original_id_list")] + public string[]? ConflictOriginalIdList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateBookRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateBookRequest.cs new file mode 100644 index 00000000..068a264f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateBookRequest.cs @@ -0,0 +1,101 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/createbook 接口的请求。 + /// + public class WxaBookCreateBookRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置作品名。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置作品简介。 + /// + [Newtonsoft.Json.JsonProperty("intro")] + [System.Text.Json.Serialization.JsonPropertyName("intro")] + public string Introduction { get; set; } = string.Empty; + + /// + /// 获取或设置封面图 MediaId。 + /// + [Newtonsoft.Json.JsonProperty("cover_media_id")] + [System.Text.Json.Serialization.JsonPropertyName("cover_media_id")] + public string CoverMediaId { get; set; } = string.Empty; + + /// + /// 获取或设置作者名。 + /// + [Newtonsoft.Json.JsonProperty("author")] + [System.Text.Json.Serialization.JsonPropertyName("author")] + public string Author { get; set; } = string.Empty; + + /// + /// 获取或设置一级类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("first_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("first_category_id")] + public int FirstCategoryId { get; set; } + + /// + /// 获取或设置二级类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("second_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("second_category_id")] + public int SecondCategoryId { get; set; } + + /// + /// 获取或设置三级类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("third_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("third_category_id")] + public int ThirdCategoryId { get; set; } + + /// + /// 获取或设置完结状态。 + /// + [Newtonsoft.Json.JsonProperty("complete_status")] + [System.Text.Json.Serialization.JsonPropertyName("complete_status")] + public int CompleteStatus { get; set; } + + /// + /// 获取或设置提供方作品唯一标识。 + /// + [Newtonsoft.Json.JsonProperty("original_id")] + [System.Text.Json.Serialization.JsonPropertyName("original_id")] + public string? OriginalId { get; set; } + + /// + /// 获取或设置章节排序方式。 + /// + [Newtonsoft.Json.JsonProperty("chapter_order_method")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_order_method")] + public int? ChapterOrderMethod { get; set; } + + /// + /// 获取或设置自定义信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_info")] + [System.Text.Json.Serialization.JsonPropertyName("custom_info")] + public string? CustomInfo { get; set; } + + /// + /// 获取或设置题材关键词列表。 + /// + [Newtonsoft.Json.JsonProperty("keyword_list")] + [System.Text.Json.Serialization.JsonPropertyName("keyword_list")] + public IList? KeywordList { get; set; } + + /// + /// 获取或设置精彩片段。 + /// + [Newtonsoft.Json.JsonProperty("awesome_paragraph")] + [System.Text.Json.Serialization.JsonPropertyName("awesome_paragraph")] + public string? AwesomeParagraph { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateBookResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateBookResponse.cs new file mode 100644 index 00000000..4069bd94 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateBookResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/createbook 接口的响应。 + /// + public class WxaBookCreateBookResponse : WechatApiResponse + { + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateChapterRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateChapterRequest.cs new file mode 100644 index 00000000..98c29b26 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateChapterRequest.cs @@ -0,0 +1,63 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/createchapter 接口的请求。 + /// + public class WxaBookCreateChapterRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class Chapter + { + /// + /// 获取或设置章节标题。 + /// + [Newtonsoft.Json.JsonProperty("chapter_title")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置章节内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = string.Empty; + + /// + /// 获取或设置提供方章节唯一标识。 + /// + [Newtonsoft.Json.JsonProperty("original_id")] + [System.Text.Json.Serialization.JsonPropertyName("original_id")] + public string? OriginalId { get; set; } + + /// + /// 获取或设置章节相对顺序。 + /// + [Newtonsoft.Json.JsonProperty("seq")] + [System.Text.Json.Serialization.JsonPropertyName("seq")] + public int? Sequence { get; set; } + + /// + /// 获取或设置自定义信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_info")] + [System.Text.Json.Serialization.JsonPropertyName("custom_info")] + public string? CustomInfo { get; set; } + } + } + + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + + /// + /// 获取或设置章节信息。 + /// + [Newtonsoft.Json.JsonProperty("chapter")] + [System.Text.Json.Serialization.JsonPropertyName("chapter")] + public Types.Chapter Chapter { get; set; } = new Types.Chapter(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateChapterResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateChapterResponse.cs new file mode 100644 index 00000000..3c6aba7b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookCreateChapterResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/createchapter 接口的响应。 + /// + public class WxaBookCreateChapterResponse : WechatApiResponse + { + /// + /// 获取或设置章节 ID。 + /// + [Newtonsoft.Json.JsonProperty("chapter_id")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_id")] + public string ChapterId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteBookRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteBookRequest.cs new file mode 100644 index 00000000..5eab791f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteBookRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/deletebook 接口的请求。 + /// + public class WxaBookDeleteBookRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteBookResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteBookResponse.cs new file mode 100644 index 00000000..2a5b90cf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteBookResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/deletebook 接口的响应。 + /// + public class WxaBookDeleteBookResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteChapterRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteChapterRequest.cs new file mode 100644 index 00000000..4877f34f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteChapterRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/deletechapter 接口的请求。 + /// + public class WxaBookDeleteChapterRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + + /// + /// 获取或设置章节 ID。 + /// + [Newtonsoft.Json.JsonProperty("chapter_id")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_id")] + public string ChapterId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteChapterResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteChapterResponse.cs new file mode 100644 index 00000000..937c6f06 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookDeleteChapterResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/deletechapter 接口的响应。 + /// + public class WxaBookDeleteChapterResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetBookRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetBookRequest.cs new file mode 100644 index 00000000..7d4b66ea --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetBookRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/getbook 接口的请求。 + /// + public class WxaBookGetBookRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置是否返回编辑版信息。 + /// + [Newtonsoft.Json.JsonProperty("need_edited_data")] + [System.Text.Json.Serialization.JsonPropertyName("need_edited_data")] + public bool? IsNeedEditedData { get; set; } + + /// + /// 获取或设置作品 ID。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string? BookId { get; set; } + + /// + /// 获取或设置提供方作品唯一标识。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("original_id")] + [System.Text.Json.Serialization.JsonPropertyName("original_id")] + public string? OriginalId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetBookResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetBookResponse.cs new file mode 100644 index 00000000..30ad9925 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetBookResponse.cs @@ -0,0 +1,76 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/getbook 接口的响应。 + /// + public class WxaBookGetBookResponse : WechatApiResponse + { + public static class Types + { + public class Book : WxaBookListBookResponse.Types.Book + { + public static new class Types + { + public class Volumn + { + /// + /// 获取或设置分卷名。 + /// + [Newtonsoft.Json.JsonProperty("volume_title")] + [System.Text.Json.Serialization.JsonPropertyName("volume_title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置分卷起始章节下标。 + /// + [Newtonsoft.Json.JsonProperty("start_index")] + [System.Text.Json.Serialization.JsonPropertyName("start_index")] + public int StartIndex { get; set; } + + /// + /// 获取或设置分卷截止章节下标。 + /// + [Newtonsoft.Json.JsonProperty("end_index")] + [System.Text.Json.Serialization.JsonPropertyName("end_index")] + public int EndIndex { get; set; } + } + } + + /// + /// 获取或设置一级类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("first_category_name")] + [System.Text.Json.Serialization.JsonPropertyName("first_category_name")] + public string FirstCategoryName { get; set; } = default!; + + /// + /// 获取或设置二级类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("second_category_name")] + [System.Text.Json.Serialization.JsonPropertyName("second_category_name")] + public string SecondCategoryName { get; set; } = default!; + + /// + /// 获取或设置三级类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("third_category_name")] + [System.Text.Json.Serialization.JsonPropertyName("third_category_name")] + public string ThirdCategoryName { get; set; } = default!; + + /// + /// 获取或设置分卷列表。 + /// + [Newtonsoft.Json.JsonProperty("volume_list")] + [System.Text.Json.Serialization.JsonPropertyName("volume_list")] + public Types.Volumn[] VolumnList { get; set; } = default!; + } + } + + /// + /// 获取或设置作品信息。 + /// + [Newtonsoft.Json.JsonProperty("book")] + [System.Text.Json.Serialization.JsonPropertyName("book")] + public Types.Book Book { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetChapterRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetChapterRequest.cs new file mode 100644 index 00000000..bff95d77 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetChapterRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/getchapter 接口的请求。 + /// + public class WxaBookGetChapterRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + + /// + /// 获取或设置章节 ID。 + /// + [Newtonsoft.Json.JsonProperty("chapter_id")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_id")] + public string ChapterId { get; set; } = string.Empty; + + /// + /// 获取或设置是否返回编辑版信息。 + /// + [Newtonsoft.Json.JsonProperty("need_edited_data")] + [System.Text.Json.Serialization.JsonPropertyName("need_edited_data")] + public bool? IsNeedEditedData { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetChapterResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetChapterResponse.cs new file mode 100644 index 00000000..a5931d05 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookGetChapterResponse.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/getchapter 接口的响应。 + /// + public class WxaBookGetChapterResponse : WechatApiResponse + { + public static class Types + { + public class Chapter : WxaBookListChapterResponse.Types.Chapter + { + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = default!; + + /// + /// 获取或设置章节内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = default!; + } + } + + /// + /// 获取或设置章节信息。 + /// + [Newtonsoft.Json.JsonProperty("chapter")] + [System.Text.Json.Serialization.JsonPropertyName("chapter")] + public Types.Chapter Chapter { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListBookRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListBookRequest.cs new file mode 100644 index 00000000..5be22e76 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListBookRequest.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/listbook 接口的请求。 + /// + public class WxaBookListBookRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置是否返回编辑版信息。 + /// + [Newtonsoft.Json.JsonProperty("need_edited_data")] + [System.Text.Json.Serialization.JsonPropertyName("need_edited_data")] + public bool? IsNeedEditedData { get; set; } + + /// + /// 获取或设置分页起始 ID。 + /// + [Newtonsoft.Json.JsonProperty("last_id")] + [System.Text.Json.Serialization.JsonPropertyName("last_id")] + public long? LastId { get; set; } + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("offset")] + [System.Text.Json.Serialization.JsonPropertyName("offset")] + public int? Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("limit")] + [System.Text.Json.Serialization.JsonPropertyName("limit")] + public int? Limit { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListBookResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListBookResponse.cs new file mode 100644 index 00000000..42dc7535 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListBookResponse.cs @@ -0,0 +1,202 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/listbook 接口的响应。 + /// + public class WxaBookListBookResponse : WechatApiResponse + { + public static class Types + { + public class Book + { + public static class Types + { + public class AuditInfo + { + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("audit_status")] + [System.Text.Json.Serialization.JsonPropertyName("audit_status")] + public int AuditStatus { get; set; } + + /// + /// 获取或设置提审时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置审核原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string? Reason { get; set; } + + /// + /// 获取或设置修改建议。 + /// + [Newtonsoft.Json.JsonProperty("suggestion")] + [System.Text.Json.Serialization.JsonPropertyName("suggestion")] + public string? Suggestion { get; set; } + + /// + /// 获取或设置审核时间戳。 + /// + [Newtonsoft.Json.JsonProperty("audit_time")] + [System.Text.Json.Serialization.JsonPropertyName("audit_time")] + public long? AuditTimestamp { get; set; } + } + } + + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = default!; + + /// + /// 获取或设置作品名。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置作品简介。 + /// + [Newtonsoft.Json.JsonProperty("intro")] + [System.Text.Json.Serialization.JsonPropertyName("intro")] + public string Introduction { get; set; } = default!; + + /// + /// 获取或设置封面图 URL。 + /// + [Newtonsoft.Json.JsonProperty("cover_url")] + [System.Text.Json.Serialization.JsonPropertyName("cover_url")] + public string CoverUrl { get; set; } = default!; + + /// + /// 获取或设置作者名。 + /// + [Newtonsoft.Json.JsonProperty("author")] + [System.Text.Json.Serialization.JsonPropertyName("author")] + public string Author { get; set; } = default!; + + /// + /// 获取或设置一级类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("first_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("first_category_id")] + public int FirstCategoryId { get; set; } + + /// + /// 获取或设置二级类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("second_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("second_category_id")] + public int SecondCategoryId { get; set; } + + /// + /// 获取或设置三级类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("third_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("third_category_id")] + public int ThirdCategoryId { get; set; } + + /// + /// 获取或设置完结状态。 + /// + [Newtonsoft.Json.JsonProperty("complete_status")] + [System.Text.Json.Serialization.JsonPropertyName("complete_status")] + public int CompleteStatus { get; set; } + + /// + /// 获取或设置提供方作品唯一标识。 + /// + [Newtonsoft.Json.JsonProperty("original_id")] + [System.Text.Json.Serialization.JsonPropertyName("original_id")] + public string? OriginalId { get; set; } + + /// + /// 获取或设置上传场景。 + /// + [Newtonsoft.Json.JsonProperty("upload_scene")] + [System.Text.Json.Serialization.JsonPropertyName("upload_scene")] + public int UploadScene { get; set; } + + /// + /// 获取或设置章节数量。 + /// + [Newtonsoft.Json.JsonProperty("chapter_cnt")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_cnt")] + public int ChapterCount { get; set; } + + /// + /// 获取或设置分卷数量。 + /// + [Newtonsoft.Json.JsonProperty("volume_cnt")] + [System.Text.Json.Serialization.JsonPropertyName("volume_cnt")] + public int VolumeCount { get; set; } + + /// + /// 获取或设置作品总字数。 + /// + [Newtonsoft.Json.JsonProperty("total_word_cnt")] + [System.Text.Json.Serialization.JsonPropertyName("total_word_cnt")] + public int TotalWordCount { get; set; } + + /// + /// 获取或设置章节排序方式。 + /// + [Newtonsoft.Json.JsonProperty("chapter_order_method")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_order_method")] + public int ChapterOrderMethod { get; set; } + + /// + /// 获取或设置自定义信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_info")] + [System.Text.Json.Serialization.JsonPropertyName("custom_info")] + public string? CustomInfo { get; set; } + + /// + /// 获取或设置审核信息。 + /// + [Newtonsoft.Json.JsonProperty("audit_info")] + [System.Text.Json.Serialization.JsonPropertyName("audit_info")] + public Types.AuditInfo? AuditInfo { get; set; } + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置作品列表。 + /// + [Newtonsoft.Json.JsonProperty("book_list")] + [System.Text.Json.Serialization.JsonPropertyName("book_list")] + public Types.Book[] BookList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_cnt")] + [System.Text.Json.Serialization.JsonPropertyName("total_cnt")] + public int TotalCount { get; set; } + + /// + /// 获取或设置分页 ID。 + /// + [Newtonsoft.Json.JsonProperty("last_id")] + [System.Text.Json.Serialization.JsonPropertyName("last_id")] + public long? LastId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListChapterRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListChapterRequest.cs new file mode 100644 index 00000000..4ab72313 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListChapterRequest.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/listchapter 接口的请求。 + /// + public class WxaBookListChapterRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + + /// + /// 获取或设置是否返回编辑版信息。 + /// + [Newtonsoft.Json.JsonProperty("need_edited_data")] + [System.Text.Json.Serialization.JsonPropertyName("need_edited_data")] + public bool? IsNeedEditedData { get; set; } + + /// + /// 获取或设置分卷下标。 + /// + [Newtonsoft.Json.JsonProperty("volume_index")] + [System.Text.Json.Serialization.JsonPropertyName("volume_index")] + public int? VolumeIndex { get; set; } + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("offset")] + [System.Text.Json.Serialization.JsonPropertyName("offset")] + public int? Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("limit")] + [System.Text.Json.Serialization.JsonPropertyName("limit")] + public int? Limit { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListChapterResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListChapterResponse.cs new file mode 100644 index 00000000..fca7bbd8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookListChapterResponse.cs @@ -0,0 +1,98 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/listchapter 接口的响应。 + /// + public class WxaBookListChapterResponse : WechatApiResponse + { + public static class Types + { + public class Chapter + { + public static class Types + { + public class AuditInfo : WxaBookListBookResponse.Types.Book.Types.AuditInfo + { + } + } + + /// + /// 获取或设置章节 ID。 + /// + [Newtonsoft.Json.JsonProperty("chapter_id")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_id")] + public string ChapterId { get; set; } = default!; + + /// + /// 获取或设置章节标题。 + /// + [Newtonsoft.Json.JsonProperty("chapter_title")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置所属分卷下标。 + /// + [Newtonsoft.Json.JsonProperty("volume_index")] + [System.Text.Json.Serialization.JsonPropertyName("volume_index")] + public int VolumeIndex { get; set; } + + /// + /// 获取或设置提供方章节唯一标识。 + /// + [Newtonsoft.Json.JsonProperty("original_id")] + [System.Text.Json.Serialization.JsonPropertyName("original_id")] + public string? OriginalId { get; set; } + + /// + /// 获取或设置字数。 + /// + [Newtonsoft.Json.JsonProperty("word_cnt")] + [System.Text.Json.Serialization.JsonPropertyName("word_cnt")] + public int WordCount { get; set; } + + /// + /// 获取或设置章节相对顺序。 + /// + [Newtonsoft.Json.JsonProperty("seq")] + [System.Text.Json.Serialization.JsonPropertyName("seq")] + public int? Sequence { get; set; } + + /// + /// 获取或设置自定义信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_info")] + [System.Text.Json.Serialization.JsonPropertyName("custom_info")] + public string? CustomInfo { get; set; } + + /// + /// 获取或设置审核信息。 + /// + [Newtonsoft.Json.JsonProperty("audit_info")] + [System.Text.Json.Serialization.JsonPropertyName("audit_info")] + public Types.AuditInfo? AuditInfo { get; set; } + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置章节列表。 + /// + [Newtonsoft.Json.JsonProperty("chapter_list")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_list")] + public Types.Chapter[] ChapterList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_cnt")] + [System.Text.Json.Serialization.JsonPropertyName("total_cnt")] + public int TotalCount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReorderChapterRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReorderChapterRequest.cs new file mode 100644 index 00000000..8e63dc67 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReorderChapterRequest.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/reorderchapter 接口的请求。 + /// + public class WxaBookReorderChapterRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + + /// + /// 获取或设置章节 ID。 + /// + [Newtonsoft.Json.JsonProperty("chapter_id")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_id")] + public string ChapterId { get; set; } = string.Empty; + + /// + /// 获取或设置目标章节 ID。 + /// + [Newtonsoft.Json.JsonProperty("target_chapter_id")] + [System.Text.Json.Serialization.JsonPropertyName("target_chapter_id")] + public string TargetChapterId { get; set; } = string.Empty; + + /// + /// 获取或设置排序操作类型。 + /// + [Newtonsoft.Json.JsonProperty("operation")] + [System.Text.Json.Serialization.JsonPropertyName("operation")] + public int Operation { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReorderChapterResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReorderChapterResponse.cs new file mode 100644 index 00000000..4e752798 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReorderChapterResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/reorderchapter 接口的响应。 + /// + public class WxaBookReorderChapterResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReplaceChapterRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReplaceChapterRequest.cs new file mode 100644 index 00000000..69d3a9ff --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReplaceChapterRequest.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/replacechapter 接口的请求。 + /// + public class WxaBookReplaceChapterRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + + /// + /// 获取或设置章节 ID。 + /// + [Newtonsoft.Json.JsonProperty("chapter_id")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_id")] + public string ChapterId { get; set; } = string.Empty; + + /// + /// 获取或设置章节标题。 + /// + [Newtonsoft.Json.JsonProperty("new_chapter_title")] + [System.Text.Json.Serialization.JsonPropertyName("new_chapter_title")] + public string ChapterTitle { get; set; } = string.Empty; + + /// + /// 获取或设置章节内容。 + /// + [Newtonsoft.Json.JsonProperty("new_content")] + [System.Text.Json.Serialization.JsonPropertyName("new_content")] + public string ChapterContent { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReplaceChapterResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReplaceChapterResponse.cs new file mode 100644 index 00000000..7eaa59b0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookReplaceChapterResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/replacechapter 接口的响应。 + /// + public class WxaBookReplaceChapterResponse : WechatApiResponse + { + /// + /// 获取或设置新章节 ID。 + /// + [Newtonsoft.Json.JsonProperty("new_chapter_id")] + [System.Text.Json.Serialization.JsonPropertyName("new_chapter_id")] + public string ChapterId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateBookRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateBookRequest.cs new file mode 100644 index 00000000..45e51b60 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateBookRequest.cs @@ -0,0 +1,163 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/updatebook 接口的请求。 + /// + public class WxaBookUpdateBookRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class Volume + { + /// + /// 获取或设置分卷名。 + /// + [Newtonsoft.Json.JsonProperty("volume_title")] + [System.Text.Json.Serialization.JsonPropertyName("volume_title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置分卷起始章节下标。 + /// + [Newtonsoft.Json.JsonProperty("start_index")] + [System.Text.Json.Serialization.JsonPropertyName("start_index")] + public int StartIndex { get; set; } + + /// + /// 获取或设置分卷截止章节下标。 + /// + [Newtonsoft.Json.JsonProperty("end_index")] + [System.Text.Json.Serialization.JsonPropertyName("end_index")] + public int EndIndex { get; set; } + } + } + + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + + /// + /// 获取或设置作品名。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// 获取或设置作品简介。 + /// + [Newtonsoft.Json.JsonProperty("intro")] + [System.Text.Json.Serialization.JsonPropertyName("intro")] + public string? Introduction { get; set; } + + /// + /// 获取或设置封面图 MediaId。 + /// + [Newtonsoft.Json.JsonProperty("cover_media_id")] + [System.Text.Json.Serialization.JsonPropertyName("cover_media_id")] + public string? CoverMediaId { get; set; } + + /// + /// 获取或设置作者名。 + /// + [Newtonsoft.Json.JsonProperty("author")] + [System.Text.Json.Serialization.JsonPropertyName("author")] + public string? Author { get; set; } + + /// + /// 获取或设置一级类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("first_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("first_category_id")] + public int? FirstCategoryId { get; set; } + + /// + /// 获取或设置二级类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("second_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("second_category_id")] + public int? SecondCategoryId { get; set; } + + /// + /// 获取或设置三级类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("third_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("third_category_id")] + public int? ThirdCategoryId { get; set; } + + /// + /// 获取或设置完结状态。 + /// + [Newtonsoft.Json.JsonProperty("complete_status")] + [System.Text.Json.Serialization.JsonPropertyName("complete_status")] + public int? CompleteStatus { get; set; } + + /// + /// 获取或设置提供方作品唯一标识。 + /// + [Newtonsoft.Json.JsonProperty("original_id")] + [System.Text.Json.Serialization.JsonPropertyName("original_id")] + public string? OriginalId { get; set; } + + /// + /// 获取或设置章节 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("chapter_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_id_list")] + public IList? ChapterIdList { get; set; } + + /// + /// 获取或设置是否需要分卷。 + /// + [Newtonsoft.Json.JsonProperty("need_volume")] + [System.Text.Json.Serialization.JsonPropertyName("need_volume")] + public bool? IsNeedVolume { get; set; } + + /// + /// 获取或设置分卷列表。 + /// + [Newtonsoft.Json.JsonProperty("volume_list")] + [System.Text.Json.Serialization.JsonPropertyName("volume_list")] + public IList? VolumeList { get; set; } + + /// + /// 获取或设置章节排序方式。 + /// + [Newtonsoft.Json.JsonProperty("chapter_order_method")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_order_method")] + public int? ChapterOrderMethod { get; set; } + + /// + /// 获取或设置自定义信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_info")] + [System.Text.Json.Serialization.JsonPropertyName("custom_info")] + public string? CustomInfo { get; set; } + + /// + /// 获取或设置是否更新题材关键词。 + /// + [Newtonsoft.Json.JsonProperty("update_keyword")] + [System.Text.Json.Serialization.JsonPropertyName("update_keyword")] + public bool? IsUpdateKeyword { get; set; } + + /// + /// 获取或设置题材关键词列表。 + /// + [Newtonsoft.Json.JsonProperty("keyword_list")] + [System.Text.Json.Serialization.JsonPropertyName("keyword_list")] + public IList? KeywordList { get; set; } + + /// + /// 获取或设置精彩片段。 + /// + [Newtonsoft.Json.JsonProperty("awesome_paragraph")] + [System.Text.Json.Serialization.JsonPropertyName("awesome_paragraph")] + public string? AwesomeParagraph { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateBookResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateBookResponse.cs new file mode 100644 index 00000000..75413396 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateBookResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/updatebook 接口的响应。 + /// + public class WxaBookUpdateBookResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateChapterSequenceRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateChapterSequenceRequest.cs new file mode 100644 index 00000000..f42c763b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateChapterSequenceRequest.cs @@ -0,0 +1,44 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/updatechapterseq 接口的请求。 + /// + public class WxaBookUpdateChapterSequenceRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class Chapter + { + /// + /// 获取或设置章节 ID。 + /// + [Newtonsoft.Json.JsonProperty("chapter_id")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_id")] + public string ChapterId { get; set; } = string.Empty; + + /// + /// 获取或设置章节相对顺序。 + /// + [Newtonsoft.Json.JsonProperty("seq")] + [System.Text.Json.Serialization.JsonPropertyName("seq")] + public int Sequence { get; set; } + } + } + + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + + /// + /// 获取或设置章节列表。 + /// + [Newtonsoft.Json.JsonProperty("chapter_seq_list")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_seq_list")] + public IList ChapterIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateChapterSequenceResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateChapterSequenceResponse.cs new file mode 100644 index 00000000..a8cd8275 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBook/WxaBookUpdateChapterSequenceResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/book/updatechapterseq 接口的响应。 + /// + public class WxaBookUpdateChapterSequenceResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsRequest.cs new file mode 100644 index 00000000..97b074c6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/business/novelreader/getpreviewsetting 接口的请求。 + /// + public class WxaBusinessNovelReaderGetPreviewSettingsRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsResponse.cs new file mode 100644 index 00000000..0340f17e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsResponse.cs @@ -0,0 +1,62 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/business/novelreader/getpreviewsetting 接口的响应。 + /// + public class WxaBusinessNovelReaderGetPreviewSettingsResponse : WechatApiResponse + { + public static class Types + { + public class Settings + { + public static class Types + { + public class Chapter + { + /// + /// 获取或设置章节索引。 + /// + [Newtonsoft.Json.JsonProperty("chapter_index")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_index")] + public int ChapterIndex { get; set; } + + /// + /// 获取或设置章节字数。 + /// + [Newtonsoft.Json.JsonProperty("words")] + [System.Text.Json.Serialization.JsonPropertyName("words")] + public int? WordCount { get; set; } + } + } + + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + + /// + /// 获取或设置默认预览字数。 + /// + [Newtonsoft.Json.JsonProperty("default_words")] + [System.Text.Json.Serialization.JsonPropertyName("default_words")] + public int DefaultWordCount { get; set; } + + /// + /// 获取或设置章节列表。 + /// + [Newtonsoft.Json.JsonProperty("chapter_setting")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_setting")] + public Types.Chapter[]? ChapterList { get; set; } + } + } + + /// + /// 获取或设置预览设置信息。 + /// + [Newtonsoft.Json.JsonProperty("setting")] + [System.Text.Json.Serialization.JsonPropertyName("setting")] + public Types.Settings Settings { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetPreviewSettingsRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetPreviewSettingsRequest.cs new file mode 100644 index 00000000..6a807600 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetPreviewSettingsRequest.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/business/novelreader/setpreviewsetting 接口的请求。 + /// + public class WxaBusinessNovelReaderSetPreviewSettingsRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class Settings + { + public static class Types + { + public class Chapter + { + /// + /// 获取或设置章节索引。 + /// + [Newtonsoft.Json.JsonProperty("chapter_index")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_index")] + public int ChapterIndex { get; set; } + + /// + /// 获取或设置章节字数。 + /// + [Newtonsoft.Json.JsonProperty("words")] + [System.Text.Json.Serialization.JsonPropertyName("words")] + public int? WordCount { get; set; } + } + } + + /// + /// 获取或设置作品 ID。 + /// + [Newtonsoft.Json.JsonProperty("book_id")] + [System.Text.Json.Serialization.JsonPropertyName("book_id")] + public string BookId { get; set; } = string.Empty; + + /// + /// 获取或设置默认预览字数。 + /// + [Newtonsoft.Json.JsonProperty("default_words")] + [System.Text.Json.Serialization.JsonPropertyName("default_words")] + public int DefaultWordCount { get; set; } + + /// + /// 获取或设置章节列表。 + /// + [Newtonsoft.Json.JsonProperty("chapter_setting")] + [System.Text.Json.Serialization.JsonPropertyName("chapter_setting")] + public IList? ChapterList { get; set; } + } + } + + /// + /// 获取或设置预览设置信息。 + /// + [Newtonsoft.Json.JsonProperty("setting")] + [System.Text.Json.Serialization.JsonPropertyName("setting")] + public Types.Settings Settings { get; set; } = new Types.Settings(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetPreviewSettingsResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetPreviewSettingsResponse.cs new file mode 100644 index 00000000..c6be3abf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetPreviewSettingsResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/business/novelreader/setpreviewsetting 接口的响应。 + /// + public class WxaBusinessNovelReaderSetPreviewSettingsResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetRecommendNovelRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetRecommendNovelRequest.cs new file mode 100644 index 00000000..be2383ff --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetRecommendNovelRequest.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/business/novelreader/setrecmdnovel 接口的请求。 + /// + public class WxaBusinessNovelReaderSetRecommendNovelRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置推荐小说的类型。 + /// + [Newtonsoft.Json.JsonProperty("recmd_type")] + [System.Text.Json.Serialization.JsonPropertyName("recmd_type")] + public int RecommendType { get; set; } + + /// + /// 获取或设置作品 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("book_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("book_id_list")] + public IList ChapterList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetRecommendNovelResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetRecommendNovelResponse.cs new file mode 100644 index 00000000..d3915f3d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetRecommendNovelResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/business/novelreader/setrecmdnovel 接口的响应。 + /// + public class WxaBusinessNovelReaderSetRecommendNovelResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaDrama/WxaDramaSetPlayerDramaRecommendSwitchRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaDrama/WxaDramaSetPlayerDramaRecommendSwitchRequest.cs index b0d14ed8..7b71c04d 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaDrama/WxaDramaSetPlayerDramaRecommendSwitchRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaDrama/WxaDramaSetPlayerDramaRecommendSwitchRequest.cs @@ -7,10 +7,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models { /// /// 获取或设置推荐位类型。 + /// 默认值:2002 /// [Newtonsoft.Json.JsonProperty("entry_type")] [System.Text.Json.Serialization.JsonPropertyName("entry_type")] - public int EntryType { get; set; } + public int EntryType { get; set; } = 2002; /// /// 获取或设置是否打开。 diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookAddBookAuthRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookAddBookAuthRequest.json new file mode 100644 index 00000000..f03d23a9 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookAddBookAuthRequest.json @@ -0,0 +1,14 @@ +{ + "books": [ + { + "book_id": "A1Hcfuuv", + "expire_time": 1704970161, + "grantee_appid": "wx002" + }, + { + "book_id": "KqNdTu", + "expire_time": 1705460123, + "grantee_appid": "wx003" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookAddBookAuthResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookAddBookAuthResponse.json new file mode 100644 index 00000000..8e29ebfe --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookAddBookAuthResponse.json @@ -0,0 +1,8 @@ +{ + "errcode": 0, + "results": [ + { + "errcode": 0 + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookDeleteBookAuthRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookDeleteBookAuthRequest.json new file mode 100644 index 00000000..f8d2cb33 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookDeleteBookAuthRequest.json @@ -0,0 +1,4 @@ +{ + "book_id": "A1Hcfu", + "grantee_appid": "wx001" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookQueryBookAuthRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookQueryBookAuthRequest.json new file mode 100644 index 00000000..ae30fe1e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookQueryBookAuthRequest.json @@ -0,0 +1,4 @@ +{ + "count": 20, + "offset": 0 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookQueryBookAuthResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookQueryBookAuthResponse.json new file mode 100644 index 00000000..052199d6 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/Auth/WxaBookQueryBookAuthResponse.json @@ -0,0 +1,17 @@ +{ + "errcode": 0, + "results": [ + { + "book_id": "A1Hcfu", + "grantor_appid": "wx001", + "grantee_appid": "wx004", + "expire_time": 1801698644 + }, + { + "book_id": "uvKqNd", + "grantor_appid": "wx001", + "grantee_appid": "wx005", + "expire_time": 1704259146 + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookAuditBookRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookAuditBookRequest.json new file mode 100644 index 00000000..6a1b67c3 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookAuditBookRequest.json @@ -0,0 +1,3 @@ +{ + "book_id": "A1b2C3d4" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookBatchCreateChapterRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookBatchCreateChapterRequest.json new file mode 100644 index 00000000..c89003c2 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookBatchCreateChapterRequest.json @@ -0,0 +1,13 @@ +{ + "book_id": "A1b2C3d4", + "chapter_list": [ + { + "chapter_title": "第一章 香蕉的诞生", + "content": "从前,有一座山……" + }, + { + "chapter_title": "第二章 牛奶的诞生", + "content": "一望无际的草原,有一群快乐的奶牛……" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookBatchCreateChapterResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookBatchCreateChapterResponse.json new file mode 100644 index 00000000..b1954d1a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookBatchCreateChapterResponse.json @@ -0,0 +1,5 @@ +{ + "errcode": 0, + "errmsg": "ok", + "chapter_id_list": [ "abc1234", "abc2345" ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateBookRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateBookRequest.json new file mode 100644 index 00000000..85cc9859 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateBookRequest.json @@ -0,0 +1,10 @@ +{ + "title": "香蕉牛奶", + "intro": "香蕉牛奶的奇幻之旅。", + "cover_media_id": "xxx", + "author": "香蕉和牛奶", + "first_category_id": 10001, + "second_category_id": 10002, + "third_category_id": 10003, + "complete_status": 1 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateBookResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateBookResponse.json new file mode 100644 index 00000000..bbe621b1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateBookResponse.json @@ -0,0 +1,5 @@ +{ + "errcode": 0, + "errmsg": "ok", + "book_id": "A1b2C3d4" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateChapterRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateChapterRequest.json new file mode 100644 index 00000000..f161ccd4 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateChapterRequest.json @@ -0,0 +1,7 @@ +{ + "book_id": "A1b2C3d4", + "chapter": { + "chapter_title": "第一章 香蕉的诞生", + "content": "从前,有一座山……" + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateChapterResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateChapterResponse.json new file mode 100644 index 00000000..596b8be6 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookCreateChapterResponse.json @@ -0,0 +1,5 @@ +{ + "errcode": 0, + "errmsg": "ok", + "chapter_id": "abc1234" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookDeleteBookRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookDeleteBookRequest.json new file mode 100644 index 00000000..6a1b67c3 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookDeleteBookRequest.json @@ -0,0 +1,3 @@ +{ + "book_id": "A1b2C3d4" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookDeleteChapterRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookDeleteChapterRequest.json new file mode 100644 index 00000000..4a716a62 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookDeleteChapterRequest.json @@ -0,0 +1,4 @@ +{ + "book_id": "A1b2C3d4", + "chapter_id": "abc123" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetBookRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetBookRequest.json new file mode 100644 index 00000000..6a1b67c3 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetBookRequest.json @@ -0,0 +1,3 @@ +{ + "book_id": "A1b2C3d4" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetBookResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetBookResponse.json new file mode 100644 index 00000000..624896ed --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetBookResponse.json @@ -0,0 +1,26 @@ +{ + "errcode": 0, + "errmsg": "ok", + "book": { + "book_id": "A1b2C3d4", + "title": "香蕉牛奶", + "intro": "香蕉牛奶的奇幻之旅。", + "cover_url": "https://xxx.jpg", + "author": "香蕉和牛奶", + "first_category_id": 10001, + "first_category_name": "男频", + "second_category_id": 10002, + "second_category_name": "都市", + "third_category_id": 10003, + "third_category_name": "娱乐明星", + "complete_status": 2, + "upload_scene": 1, + "chapter_cnt": 5, + "volume_cnt": 0, + "volume_list": [], + "total_word_cnt": 15234, + "create_time": 1704715412, + "original_id": "", + "chapter_order_method": 0 + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetChapterRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetChapterRequest.json new file mode 100644 index 00000000..4a716a62 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetChapterRequest.json @@ -0,0 +1,4 @@ +{ + "book_id": "A1b2C3d4", + "chapter_id": "abc123" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetChapterResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetChapterResponse.json new file mode 100644 index 00000000..965e28b6 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookGetChapterResponse.json @@ -0,0 +1,19 @@ +{ + "errcode": 0, + "errmsg": "ok", + "chapter": { + "book_id": "A1b2C3d4", + "chapter_id": "abc1234", + "chapter_title": "第一章 香蕉的诞生", + "content": "从前,有一座山……", + "word_cnt": 1234, + "create_time": 1704793640, + "audit_info": { + "audit_status": 3, + "create_time": 1705062255, + "audit_time": 1705063255 + }, + "volume_index": -1, + "original_id": "1234" + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListBookRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListBookRequest.json new file mode 100644 index 00000000..5324fa24 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListBookRequest.json @@ -0,0 +1,5 @@ +{ + "last_id": 0, + "offset": 0, + "limit": 1 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListBookResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListBookResponse.json new file mode 100644 index 00000000..e5011920 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListBookResponse.json @@ -0,0 +1,26 @@ +{ + "errcode": 0, + "errmsg": "ok", + "book_list": [ + { + "book_id": "A1b2C3d4", + "title": "香蕉牛奶", + "intro": "香蕉牛奶的奇幻之旅。", + "cover_url": "https://xxx.jpg", + "author": "香蕉和牛奶", + "first_category_id": 10001, + "second_category_id": 10002, + "third_category_id": 10003, + "complete_status": 2, + "upload_scene": 1, + "chapter_cnt": 6, + "volume_cnt": 3, + "total_word_cnt": 15234, + "create_time": 1704715412, + "original_id": "", + "chapter_order_method": 0 + } + ], + "total_cnt": 1, + "last_id": 1 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListChapterRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListChapterRequest.json new file mode 100644 index 00000000..4f2ab18b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListChapterRequest.json @@ -0,0 +1,6 @@ +{ + "book_id": "A1b2C3d4", + "need_edited_data": true, + "limit": 10, + "offset": 0 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListChapterResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListChapterResponse.json new file mode 100644 index 00000000..635ff204 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookListChapterResponse.json @@ -0,0 +1,16 @@ +{ + "errcode": 0, + "errmsg": "ok", + "chapter_list": [ + { + "chapter_id": "abc1234", + "chapter_title": "第一章 x", + "word_cnt": 1234, + "create_time": 1704793640, + "volume_index": -1, + "original_id": "1234", + "seq": 100 + } + ], + "total_cnt": 1 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookReorderChapterRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookReorderChapterRequest.json new file mode 100644 index 00000000..648ad6b3 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookReorderChapterRequest.json @@ -0,0 +1,6 @@ +{ + "book_id": "A1b2C3d4", + "chapter_id": "abc123", + "target_chapter_id": "qwe456", + "operation": 1 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookReplaceChapterRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookReplaceChapterRequest.json new file mode 100644 index 00000000..4e4815e1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookReplaceChapterRequest.json @@ -0,0 +1,6 @@ +{ + "book_id": "A1b2C3d4", + "chapter_id": "x1y2z3", + "new_chapter_title": "第一章 香蕉的诞生", + "new_content": "从前,有一座山……" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookReplaceChapterResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookReplaceChapterResponse.json new file mode 100644 index 00000000..c1ee04d7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookReplaceChapterResponse.json @@ -0,0 +1,5 @@ +{ + "errcode": 0, + "errmsg": "ok", + "new_chapter_id": "abc1234" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookUpdateBookRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookUpdateBookRequest.json new file mode 100644 index 00000000..b6bfb07d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookUpdateBookRequest.json @@ -0,0 +1,17 @@ +{ + "book_id": "A1b2C3d4", + "complete_status": 2, + "need_volume": true, + "volume_list": [ + { + "volume_title": "第一卷", + "start_index": 0, + "end_index": 2 + }, + { + "volume_title": "第二卷", + "start_index": 2, + "end_index": 5 + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookUpdateChapterSequenceRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookUpdateChapterSequenceRequest.json new file mode 100644 index 00000000..2827b1c2 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBook/WxaBookUpdateChapterSequenceRequest.json @@ -0,0 +1,13 @@ +{ + "book_id": "A1b2C3d4", + "chapter_seq_list": [ + { + "chapter_id": "chapter10", + "seq": 100 + }, + { + "chapter_id": "chapter20", + "seq": 200 + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsRequest.json new file mode 100644 index 00000000..66b8c0ff --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsRequest.json @@ -0,0 +1,3 @@ +{ + "book_id": "test" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsResponse.json new file mode 100644 index 00000000..0e2c1ad8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderGetPreviewSettingsResponse.json @@ -0,0 +1,14 @@ +{ + "errcode": 0, + "errmsg": "ok", + "setting": { + "book_id": "test", + "default_words": 240, + "chapter_setting": [ + { + "chapter_index": 1, + "words": 123 + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetPreviewSettingsRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetPreviewSettingsRequest.json new file mode 100644 index 00000000..081c08b5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetPreviewSettingsRequest.json @@ -0,0 +1,12 @@ +{ + "setting": { + "book_id": "test", + "default_words": 240, + "chapter_setting": [ + { + "chapter_index": 1, + "words": 123 + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetRecommendNovelRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetRecommendNovelRequest.json new file mode 100644 index 00000000..259d53c8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/NovelReader/WxaBusinessNovelReaderSetRecommendNovelRequest.json @@ -0,0 +1,7 @@ +{ + "recmd_type": 1, + "book_id_list": [ + "321321", + "abcdef" + ] +}