From 4ae273fb45ae74b31c083a4281f0ad7f47a020c0 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Tue, 5 Mar 2024 22:04:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(microapp):=20=E5=8C=BA=E5=88=86=E6=96=B0?= =?UTF-8?q?=E6=97=A7=E7=89=88=E6=8E=A5=E5=8F=A3=E5=85=A5=E5=8F=A3=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DouyinMicroAppClient.cs | 3 + .../DouyinMicroAppClientOptions.cs | 6 + .../DouyinMicroAppEndpoints.cs | 11 +- ...uyinMicroAppClientExecuteAppsExtensions.cs | 158 ++++++++++-------- ...croAppClientExecuteLegacyAppsExtensions.cs | 101 +++++++++++ .../Apps/AppsJsCode2SessionV2Request.cs | 0 .../Apps/AppsJsCode2SessionV2Response.cs | 0 .../{ => _Legacy}/Apps/AppsTokenV2Request.cs | 0 .../{ => _Legacy}/Apps/AppsTokenV2Response.cs | 0 .../Qrcode/AppsQrcodeRequest.cs | 0 .../Qrcode/AppsQrcodeResponse.cs | 0 .../Apps/AppsJsCode2SessionV2Request.json | 0 .../Apps/AppsJsCode2SessionV2Response.json | 2 +- .../Apps/AppsTokenV2Request.json | 0 .../Apps/AppsTokenV2Response.json | 0 .../Apps/Qrcode/AppsQrcodeRequest.json | 0 16 files changed, 209 insertions(+), 72 deletions(-) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsExtensions.cs rename src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/{ => _Legacy}/Apps/AppsJsCode2SessionV2Request.cs (100%) rename src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/{ => _Legacy}/Apps/AppsJsCode2SessionV2Response.cs (100%) rename src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/{ => _Legacy}/Apps/AppsTokenV2Request.cs (100%) rename src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/{ => _Legacy}/Apps/AppsTokenV2Response.cs (100%) rename src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/{Apps => _Legacy}/Qrcode/AppsQrcodeRequest.cs (100%) rename src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/{Apps => _Legacy}/Qrcode/AppsQrcodeResponse.cs (100%) rename test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/{ => _Legacy}/Apps/AppsJsCode2SessionV2Request.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/{ => _Legacy}/Apps/AppsJsCode2SessionV2Response.json (97%) rename test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/{ => _Legacy}/Apps/AppsTokenV2Request.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/{ => _Legacy}/Apps/AppsTokenV2Response.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/{ => _Legacy}/Apps/Qrcode/AppsQrcodeRequest.json (100%) diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClient.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClient.cs index bfd2856a..96ebdc18 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClient.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClient.cs @@ -11,6 +11,8 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp /// public class DouyinMicroAppClient : CommonClientBase, ICommonClient { + public readonly string _BASEURL_LEGACY; + /// /// 获取当前客户端使用的抖音小程序凭证。 /// @@ -37,6 +39,7 @@ internal protected DouyinMicroAppClient(DouyinMicroAppClientOptions options, Htt if (options is null) throw new ArgumentNullException(nameof(options)); Credentials = new Settings.Credentials(options); + _BASEURL_LEGACY = options.EndpointForLegacy ?? DouyinMicroAppEndpoints.LEGACY_DEFAULT; FlurlClient.BaseUrl = options.Endpoint ?? DouyinMicroAppEndpoints.DEFAULT; FlurlClient.WithTimeout(options.Timeout <= 0 ? Timeout.InfiniteTimeSpan : TimeSpan.FromMilliseconds(options.Timeout)); diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClientOptions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClientOptions.cs index dc576861..b9366aac 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClientOptions.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClientOptions.cs @@ -17,6 +17,12 @@ public class DouyinMicroAppClientOptions /// public string Endpoint { get; set; } = DouyinMicroAppEndpoints.DEFAULT; + /// + /// 获取或设置抖音小程序旧版 API 入口点。 + /// 默认值: + /// + public string EndpointForLegacy { get; set; } = DouyinMicroAppEndpoints.LEGACY_DEFAULT; + /// /// 获取或设置抖音小程序 AppId。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppEndpoints.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppEndpoints.cs index 6d7e0cad..49ae3e76 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppEndpoints.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppEndpoints.cs @@ -8,11 +8,16 @@ public static class DouyinMicroAppEndpoints /// /// 默认域名。 /// - public const string DEFAULT = "https://developer.toutiao.com/api"; + public const string DEFAULT = "https://open.douyin.com/api"; /// - /// 沙盒环境域名。 + /// 旧版接口默认域名。 /// - public const string SANGBOX = "https://open-sandbox.douyin.com/api"; + public const string LEGACY_DEFAULT = "https://developer.toutiao.com/api"; + + /// + /// 旧版接口沙盒环境域名。 + /// + public const string LEGACY_SANGBOX = "https://open-sandbox.douyin.com/api"; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsExtensions.cs index 96b2ce3a..513c6e9e 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsExtensions.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsExtensions.cs @@ -10,66 +10,6 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp { public static class DouyinMicroAppClientExecuteAppsExtensions { - /// - /// 异步调用 [POST] /apps/v2/token 接口。 - /// - /// REF:
- ///
- ///
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteAppsTokenV2Async(this DouyinMicroAppClient client, Models.AppsTokenV2Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId is null) - request.AppId = client.Credentials.AppId; - - if (request.AppSecret is null) - request.AppSecret = client.Credentials.AppSecret; - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v2", "token"); - - return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /apps/v2/jscode2session 接口。 - /// - /// REF:
- ///
- ///
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteAppsJsCode2SessionV2Async(this DouyinMicroAppClient client, Models.AppsJsCode2SessionV2Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId is null) - request.AppId = client.Credentials.AppId; - - if (request.AppSecret is null) - request.AppSecret = client.Credentials.AppSecret; - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v2", "jscode2session"); - - return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - #region Capacity /// /// 异步调用 [POST] /apps/v1/capacity/upload_material 接口。 @@ -1869,27 +1809,29 @@ public static class DouyinMicroAppClientExecuteAppsExtensions #region Qrcode /// - /// 异步调用 [POST] /apps/qrcode 接口。 + /// 异步调用 [POST] /apps/v1/qrcode/create 接口。 /// /// REF:
- ///
- ///
- /// + /// ///
///
/// /// /// /// - public static async Task ExecuteAppsQrcodeAsync(this DouyinMicroAppClient client, Models.AppsQrcodeRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteAppsQrcodeCreateV1Async(this DouyinMicroAppClient client, Models.AppsQrcodeCreateV1Request request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "apps", "qrcode"); + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "qrcode", "create") + .WithHeader("access-token", request.AccessToken); - return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); } #endregion @@ -2075,7 +2017,7 @@ public static class DouyinMicroAppClientExecuteAppsExtensions } #endregion - #region UrlLink + #region UrlSchema /// /// 异步调用 [POST] /apps/v1/url_link/generate 接口。 /// @@ -2155,6 +2097,86 @@ public static class DouyinMicroAppClientExecuteAppsExtensions } #endregion + #region UrlLink + /// + /// 异步调用 [POST] /apps/v1/url/generate_schema 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUrlGenerateSchemaV1Async(this DouyinMicroAppClient client, Models.AppsUrlGenerateSchemaV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "url", "generate_schema") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/url/query_schema 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUrlQuerySchemaV1Async(this DouyinMicroAppClient client, Models.AppsUrlQuerySchemaV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "url", "query_schema") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/url/query_schema_quota 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUrlQuerySchemaQuotaV1Async(this DouyinMicroAppClient client, Models.AppsUrlQuerySchemaQuotaV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "url", "query_schema_quota") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + #region Video /// /// 异步调用 [POST] /apps/convert_video_id/video_id_to_open_item_id 接口。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsExtensions.cs new file mode 100644 index 00000000..55d04adb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsExtensions.cs @@ -0,0 +1,101 @@ +using System; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteLegacyAppsExtensions + { + /// + /// 异步调用 [POST] /apps/v2/token 接口。 + /// + /// REF:
+ ///
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsTokenV2Async(this DouyinMicroAppClient client, Models.AppsTokenV2Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.AppSecret is null) + request.AppSecret = client.Credentials.AppSecret; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v2", "token") + .WithUrl($"{client._BASEURL_LEGACY}/apps/v2/token"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v2/jscode2session 接口。 + /// + /// REF:
+ ///
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsJsCode2SessionV2Async(this DouyinMicroAppClient client, Models.AppsJsCode2SessionV2Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.AppSecret is null) + request.AppSecret = client.Credentials.AppSecret; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v2", "jscode2session") + .WithUrl($"{client._BASEURL_LEGACY}/apps/v2/jscode2session"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + #region Qrcode + /// + /// 异步调用 [POST] /apps/qrcode 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsQrcodeAsync(this DouyinMicroAppClient client, Models.AppsQrcodeRequest 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, "apps", "qrcode") + .WithUrl($"{client._BASEURL_LEGACY}/apps/qrcode"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsJsCode2SessionV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsJsCode2SessionV2Request.cs similarity index 100% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsJsCode2SessionV2Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsJsCode2SessionV2Request.cs diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsJsCode2SessionV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsJsCode2SessionV2Response.cs similarity index 100% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsJsCode2SessionV2Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsJsCode2SessionV2Response.cs diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsTokenV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsTokenV2Request.cs similarity index 100% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsTokenV2Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsTokenV2Request.cs diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsTokenV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsTokenV2Response.cs similarity index 100% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsTokenV2Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsTokenV2Response.cs diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Qrcode/AppsQrcodeRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Qrcode/AppsQrcodeRequest.cs similarity index 100% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Qrcode/AppsQrcodeRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Qrcode/AppsQrcodeRequest.cs diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Qrcode/AppsQrcodeResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Qrcode/AppsQrcodeResponse.cs similarity index 100% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Qrcode/AppsQrcodeResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Qrcode/AppsQrcodeResponse.cs diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsJsCode2SessionV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsJsCode2SessionV2Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsJsCode2SessionV2Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsJsCode2SessionV2Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsJsCode2SessionV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsJsCode2SessionV2Response.json similarity index 97% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsJsCode2SessionV2Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsJsCode2SessionV2Response.json index 4cf9bea5..a92c3e4f 100644 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsJsCode2SessionV2Response.json +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsJsCode2SessionV2Response.json @@ -1,4 +1,4 @@ -{ +{ "err_no": 0, "err_tips": "success", "data": { diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsTokenV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsTokenV2Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsTokenV2Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsTokenV2Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsTokenV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsTokenV2Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsTokenV2Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsTokenV2Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Qrcode/AppsQrcodeRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Qrcode/AppsQrcodeRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Qrcode/AppsQrcodeRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Qrcode/AppsQrcodeRequest.json