Skip to content

Commit 2a9759e

Browse files
committed
feat(wxapi): 新增微信小店为推客获取小店关联账号直播预约的推广参数接口
1 parent ad381f4 commit 2a9759e

5 files changed

Lines changed: 93 additions & 0 deletions

File tree

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6119,6 +6119,29 @@ public static class WechatApiClientExecuteChannelsExtensions
61196119

61206120
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECPromoterGetShopLiveCommissionProductListResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
61216121
}
6122+
6123+
/// <summary>
6124+
/// <para>异步调用 [POST] /channels/ec/promoter/get_shop_live_notice_promoter_share_link 接口。</para>
6125+
/// <para>
6126+
/// REF: <br/>
6127+
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/leagueheadsupplier/api/sharer/live/api_GetShopLiveNoticePromoterShareLink.html ]]>
6128+
/// </para>
6129+
/// </summary>
6130+
/// <param name="client"></param>
6131+
/// <param name="request"></param>
6132+
/// <param name="cancellationToken"></param>
6133+
/// <returns></returns>
6134+
public static async Task<Models.ChannelsECPromoterGetShopLiveNoticePromoterShareLinkResponse> ExecuteChannelsECPromoterGetShopLiveNoticePromoterShareLinkAsync(this WechatApiClient client, Models.ChannelsECPromoterGetShopLiveNoticePromoterShareLinkRequest request, CancellationToken cancellationToken = default)
6135+
{
6136+
if (client is null) throw new ArgumentNullException(nameof(client));
6137+
if (request is null) throw new ArgumentNullException(nameof(request));
6138+
6139+
IFlurlRequest flurlReq = client
6140+
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "promoter", "get_shop_live_notice_promoter_share_link")
6141+
.SetQueryParam("access_token", request.AccessToken);
6142+
6143+
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECPromoterGetShopLiveNoticePromoterShareLinkResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
6144+
}
61226145
#endregion
61236146

61246147
#region ECPromoter/Product
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
2+
{
3+
/// <summary>
4+
/// <para>表示 [POST] /channels/ec/promoter/get_shop_live_notice_promoter_share_link 接口的请求。</para>
5+
/// </summary>
6+
public class ChannelsECPromoterGetShopLiveNoticePromoterShareLinkRequest : WechatApiRequest, IInferable<ChannelsECPromoterGetShopLiveNoticePromoterShareLinkRequest, ChannelsECPromoterGetShopLiveNoticePromoterShareLinkResponse>
7+
{
8+
/// <summary>
9+
/// 获取或设置小店 AppId。
10+
/// </summary>
11+
[Newtonsoft.Json.JsonProperty("shop_appid")]
12+
[System.Text.Json.Serialization.JsonPropertyName("shop_appid")]
13+
public string ShopId { get; set; } = string.Empty;
14+
15+
/// <summary>
16+
/// 获取或设置关联账号 ID。
17+
/// </summary>
18+
[Newtonsoft.Json.JsonProperty("promoter_id")]
19+
[System.Text.Json.Serialization.JsonPropertyName("promoter_id")]
20+
public string PromoterId { get; set; } = string.Empty;
21+
22+
/// <summary>
23+
/// 获取或设置关联账号类型。
24+
/// </summary>
25+
[Newtonsoft.Json.JsonProperty("promoter_type")]
26+
[System.Text.Json.Serialization.JsonPropertyName("promoter_type")]
27+
public int PromoterType { get; set; }
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+
/// <summary>
37+
/// 获取或设置推客 AppId。
38+
/// </summary>
39+
[Newtonsoft.Json.JsonProperty("sharer_appid")]
40+
[System.Text.Json.Serialization.JsonPropertyName("sharer_appid")]
41+
public string? SharerAppId { get; set; }
42+
}
43+
}
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_shop_live_notice_promoter_share_link 接口的响应。</para>
5+
/// </summary>
6+
public class ChannelsECPromoterGetShopLiveNoticePromoterShareLinkResponse : 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+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"shop_appid": "",
3+
"promoter_id": "",
4+
"promoter_type": 1,
5+
"notice_id": "",
6+
"sharer_appid": ""
7+
}
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)