Skip to content

Commit dcfea90

Browse files
committed
feat(wxapi): 新增微信小店生成某个达人平台的用于直播预约的推广参数接口
1 parent 2a9759e commit dcfea90

6 files changed

Lines changed: 87 additions & 2 deletions

File tree

src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6005,6 +6005,29 @@ public static class WechatApiClientExecuteChannelsExtensions
60056005
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECPromoterGetLiveNoticeReservationInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
60066006
}
60076007

6008+
/// <summary>
6009+
/// <para>异步调用 [POST] /channels/ec/promoter/get_live_notice_promoter_share_link 接口。</para>
6010+
/// <para>
6011+
/// REF: <br/>
6012+
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/leagueheadsupplier/api/sharer/live/api_getlivenoticepromotersharelink.html ]]>
6013+
/// </para>
6014+
/// </summary>
6015+
/// <param name="client"></param>
6016+
/// <param name="request"></param>
6017+
/// <param name="cancellationToken"></param>
6018+
/// <returns></returns>
6019+
public static async Task<Models.ChannelsECPromoterGetLiveNoticePromoterShareLinkResponse> ExecuteChannelsECPromoterGetLiveNoticePromoterShareLinkAsync(this WechatApiClient client, Models.ChannelsECPromoterGetLiveNoticePromoterShareLinkRequest request, CancellationToken cancellationToken = default)
6020+
{
6021+
if (client is null) throw new ArgumentNullException(nameof(client));
6022+
if (request is null) throw new ArgumentNullException(nameof(request));
6023+
6024+
IFlurlRequest flurlReq = client
6025+
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "promoter", "get_live_notice_promoter_share_link")
6026+
.SetQueryParam("access_token", request.AccessToken);
6027+
6028+
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECPromoterGetLiveNoticePromoterShareLinkResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
6029+
}
6030+
60086031
/// <summary>
60096032
/// <para>异步调用 [POST] /channels/ec/promoter/get_shop_live_record_list 接口。</para>
60106033
/// <para>
@@ -6124,7 +6147,7 @@ public static class WechatApiClientExecuteChannelsExtensions
61246147
/// <para>异步调用 [POST] /channels/ec/promoter/get_shop_live_notice_promoter_share_link 接口。</para>
61256148
/// <para>
61266149
/// REF: <br/>
6127-
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/leagueheadsupplier/api/sharer/live/api_GetShopLiveNoticePromoterShareLink.html ]]>
6150+
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/leagueheadsupplier/api/sharer/live/api_getshoplivenoticepromotersharelink.html ]]>
61286151
/// </para>
61296152
/// </summary>
61306153
/// <param name="client"></param>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
2+
{
3+
/// <summary>
4+
/// <para>表示 [POST] /channels/ec/promoter/get_live_notice_promoter_share_link 接口的请求。</para>
5+
/// </summary>
6+
public class ChannelsECPromoterGetLiveNoticePromoterShareLinkRequest : WechatApiRequest, IInferable<ChannelsECPromoterGetLiveNoticePromoterShareLinkRequest, ChannelsECPromoterGetLiveNoticePromoterShareLinkResponse>
7+
{
8+
/// <summary>
9+
/// 获取或设置达人平台 AppId。
10+
/// </summary>
11+
[Newtonsoft.Json.JsonProperty("talent_appid")]
12+
[System.Text.Json.Serialization.JsonPropertyName("talent_appid")]
13+
public string TalentAppId { get; set; } = string.Empty;
14+
15+
/// <summary>
16+
/// 获取或设置推客 AppId。
17+
/// </summary>
18+
[Newtonsoft.Json.JsonProperty("sharer_appid")]
19+
[System.Text.Json.Serialization.JsonPropertyName("sharer_appid")]
20+
public string? SharerAppId { get; set; }
21+
22+
/// <summary>
23+
/// 获取或设置小程序 AppId。
24+
/// </summary>
25+
[Newtonsoft.Json.JsonProperty("mini_program_appid")]
26+
[System.Text.Json.Serialization.JsonPropertyName("mini_program_appid")]
27+
public string MiniProgramAppId { get; set; } = string.Empty;
28+
29+
/// <summary>
30+
/// 获取或设置预约 ID。
31+
/// </summary>
32+
[Newtonsoft.Json.JsonProperty("notice_id")]
33+
[System.Text.Json.Serialization.JsonPropertyName("notice_id")]
34+
public string NoticeId { get; set; } = string.Empty;
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
2+
{
3+
/// <summary>
4+
/// <para>表示 [POST] /channels/ec/promoter/get_live_notice_promoter_share_link 接口的响应。</para>
5+
/// </summary>
6+
public class ChannelsECPromoterGetLiveNoticePromoterShareLinkResponse : WechatApiResponse
7+
{
8+
/// <summary>
9+
/// 获取或设置内嵌微信小店优惠券的推广参数。
10+
/// </summary>
11+
[Newtonsoft.Json.JsonProperty("promoter_share_link")]
12+
[System.Text.Json.Serialization.JsonPropertyName("promoter_share_link")]
13+
public string PromoterShareLink { get; set; } = default!;
14+
}
15+
}

src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECPromoter/Live/ChannelsECPromoterGetLiveNoticeReservationInfoRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class ChannelsECPromoterGetLiveNoticeReservationInfoRequest : WechatApiRe
1010
/// </summary>
1111
[Newtonsoft.Json.JsonProperty("sharer_appid")]
1212
[System.Text.Json.Serialization.JsonPropertyName("sharer_appid")]
13-
public string SharerAppId { get; set; } = string.Empty;
13+
public string? SharerAppId { get; set; }
1414

1515
/// <summary>
1616
/// 获取或设置预约 ID。
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"notice_id": "",
3+
"mini_program_appid": "123",
4+
"talent_appid": "123",
5+
"sharer_appid": "123"
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"errcode": "0",
3+
"errmsg": "ok",
4+
"promoter_share_link": "xxx"
5+
}

0 commit comments

Comments
 (0)