-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteTpAppDomainExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using System.Net.Http; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Flurl.Http; | ||
|
||
namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi | ||
{ | ||
public static class DouyinMicroAppOpenApiClientExecuteTpAppDomainExtensions | ||
{ | ||
/// <summary> | ||
/// <para>异步调用 [GET] /tpapp/v2/doamin/get_webview_check_file_info/ 接口。</para> | ||
/// <para> | ||
/// REF: <br/> | ||
/// <![CDATA[ https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/domain/get-webview-check-file-info ]]> | ||
/// </para> | ||
/// </summary> | ||
/// <param name="client"></param> | ||
/// <param name="request"></param> | ||
/// <param name="cancellationToken"></param> | ||
/// <returns></returns> | ||
public static async Task<Models.OpenTpAppDomainGetWebviewCheckFileInfoV2Response> ExecuteOpenTpAppDomainGetWebviewCheckFileInfoV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenTpAppDomainGetWebviewCheckFileInfoV2Request 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.Get, "tpapp", "v2", "doamin", "get_webview_check_file_info/") | ||
.WithHeader("access-token", request.ComponentAccessToken); | ||
|
||
return await client.SendFlurlRequestAsJsonAsync<Models.OpenTpAppDomainGetWebviewCheckFileInfoV2Response>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...ExtendedSDK/OpenApi/Models/TpAppDomain/OpenTpAppDomainGetWebviewCheckFileInfoV2Request.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models | ||
{ | ||
/// <summary> | ||
/// <para>表示 [GET] /tpapp/v2/doamin/get_webview_check_file_info/ 接口的请求。</para> | ||
/// </summary> | ||
public class OpenTpAppDomainGetWebviewCheckFileInfoV2Request : DouyinMicroAppOpenApiRequest | ||
{ | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...xtendedSDK/OpenApi/Models/TpAppDomain/OpenTpAppDomainGetWebviewCheckFileInfoV2Response.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models | ||
{ | ||
/// <summary> | ||
/// <para>表示 [GET] /tpapp/v2/doamin/get_webview_check_file_info/ 接口的响应。</para> | ||
/// </summary> | ||
public class OpenTpAppDomainGetWebviewCheckFileInfoV2Response : DouyinMicroAppOpenApiResponse | ||
{ | ||
public static class Types | ||
{ | ||
public class Data | ||
{ | ||
/// <summary> | ||
/// 获取或设置文件名。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("file_name")] | ||
[System.Text.Json.Serialization.JsonPropertyName("file_name")] | ||
public string FileName { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置文件内容。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("file_content")] | ||
[System.Text.Json.Serialization.JsonPropertyName("file_content")] | ||
public string FileContent { get; set; } = default!; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// 获取或设置返回数据。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("data")] | ||
[System.Text.Json.Serialization.JsonPropertyName("data")] | ||
public Types.Data Data { get; set; } = default!; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...ts/ModelSamples/OpenApi/TpAppDomain/OpenTpAppDomainGetWebviewCheckFileInfoV2Response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"err_no": 0, | ||
"log_id": "20240115162426455AC338E18B56745303", | ||
"data": { | ||
"file_content": "xxxxxx", | ||
"file_name": "xxxx.txt" | ||
}, | ||
"err_msg": "" | ||
} |