-
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.
feat(microapp): 变更部分因新旧版接口入口点不同而变化的接口模型
- Loading branch information
Showing
497 changed files
with
4,085 additions
and
4,432 deletions.
There are no files selected for viewing
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
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
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
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
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
276 changes: 276 additions & 0 deletions
276
...Client.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsCapacityExtensions.cs
Large diffs are not rendered by default.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
...Client.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsCategoryExtensions.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 | ||
{ | ||
public static class DouyinMicroAppClientExecuteAppsCategoryExtensions | ||
{ | ||
/// <summary> | ||
/// <para>异步调用 [GET] /apps/v1/category/query_app_categories/ 接口。</para> | ||
/// <para> | ||
/// REF: <br/> | ||
/// <![CDATA[ https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/category/query-app-categories ]]> | ||
/// </para> | ||
/// </summary> | ||
/// <param name="client"></param> | ||
/// <param name="request"></param> | ||
/// <param name="cancellationToken"></param> | ||
/// <returns></returns> | ||
public static async Task<Models.AppsCategoryQueryAppCategoriesV1Response> ExecuteAppsCategoryQueryAppCategoriesV1Async(this DouyinMicroAppClient client, Models.AppsCategoryQueryAppCategoriesV1Request 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, "apps", "v1", "category", "query_app_categories", "") | ||
.WithHeader("access-token", request.AccessToken); | ||
|
||
return await client.SendFlurlRequestAsJsonAsync<Models.AppsCategoryQueryAppCategoriesV1Response>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...tpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsCensorExtensions.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,37 @@ | ||
using System; | ||
using System.Net.Http; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Flurl.Http; | ||
|
||
namespace SKIT.FlurlHttpClient.ByteDance.MicroApp | ||
{ | ||
public static class DouyinMicroAppClientExecuteAppsCensorExtensions | ||
{ | ||
/// <summary> | ||
/// <para>异步调用 [POST] /apps/v1/censor/image 接口。</para> | ||
/// <para> | ||
/// REF: <br/> | ||
/// <![CDATA[ https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/content-security/picture-detect-v3 ]]> | ||
/// </para> | ||
/// </summary> | ||
/// <param name="client"></param> | ||
/// <param name="request"></param> | ||
/// <param name="cancellationToken"></param> | ||
/// <returns></returns> | ||
public static async Task<Models.AppsCensorImageV1Response> ExecuteAppsCensorImageV1Async(this DouyinMicroAppClient client, Models.AppsCensorImageV1Request 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", "censor", "image") | ||
.WithHeader("access-token", request.AccessToken); | ||
|
||
return await client.SendFlurlRequestAsJsonAsync<Models.AppsCensorImageV1Response>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); | ||
} | ||
} | ||
} |
Oops, something went wrong.