feat(wxapi): 新增微信小店生成某个达人平台的用于直播预约的推广参数接口

This commit is contained in:
Fu Diwei
2025-09-29 21:35:17 +08:00
parent 2a9759ee8a
commit dcfea90d8c
6 changed files with 87 additions and 2 deletions

View File

@@ -6005,6 +6005,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECPromoterGetLiveNoticeReservationInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECPromoterGetLiveNoticeReservationInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
} }
/// <summary>
/// <para>异步调用 [POST] /channels/ec/promoter/get_live_notice_promoter_share_link 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/leagueheadsupplier/api/sharer/live/api_getlivenoticepromotersharelink.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECPromoterGetLiveNoticePromoterShareLinkResponse> ExecuteChannelsECPromoterGetLiveNoticePromoterShareLinkAsync(this WechatApiClient client, Models.ChannelsECPromoterGetLiveNoticePromoterShareLinkRequest 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, "channels", "ec", "promoter", "get_live_notice_promoter_share_link")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECPromoterGetLiveNoticePromoterShareLinkResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary> /// <summary>
/// <para>异步调用 [POST] /channels/ec/promoter/get_shop_live_record_list 接口。</para> /// <para>异步调用 [POST] /channels/ec/promoter/get_shop_live_record_list 接口。</para>
/// <para> /// <para>
@@ -6124,7 +6147,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
/// <para>异步调用 [POST] /channels/ec/promoter/get_shop_live_notice_promoter_share_link 接口。</para> /// <para>异步调用 [POST] /channels/ec/promoter/get_shop_live_notice_promoter_share_link 接口。</para>
/// <para> /// <para>
/// REF: <br/> /// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/leagueheadsupplier/api/sharer/live/api_GetShopLiveNoticePromoterShareLink.html ]]> /// <![CDATA[ https://developers.weixin.qq.com/doc/store/leagueheadsupplier/api/sharer/live/api_getshoplivenoticepromotersharelink.html ]]>
/// </para> /// </para>
/// </summary> /// </summary>
/// <param name="client"></param> /// <param name="client"></param>

View File

@@ -0,0 +1,36 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/promoter/get_live_notice_promoter_share_link 接口的请求。</para>
/// </summary>
public class ChannelsECPromoterGetLiveNoticePromoterShareLinkRequest : WechatApiRequest, IInferable<ChannelsECPromoterGetLiveNoticePromoterShareLinkRequest, ChannelsECPromoterGetLiveNoticePromoterShareLinkResponse>
{
/// <summary>
/// 获取或设置达人平台 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("talent_appid")]
[System.Text.Json.Serialization.JsonPropertyName("talent_appid")]
public string TalentAppId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置推客 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("sharer_appid")]
[System.Text.Json.Serialization.JsonPropertyName("sharer_appid")]
public string? SharerAppId { get; set; }
/// <summary>
/// 获取或设置小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("mini_program_appid")]
[System.Text.Json.Serialization.JsonPropertyName("mini_program_appid")]
public string MiniProgramAppId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置预约 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("notice_id")]
[System.Text.Json.Serialization.JsonPropertyName("notice_id")]
public string NoticeId { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/promoter/get_live_notice_promoter_share_link 接口的响应。</para>
/// </summary>
public class ChannelsECPromoterGetLiveNoticePromoterShareLinkResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置内嵌微信小店优惠券的推广参数。
/// </summary>
[Newtonsoft.Json.JsonProperty("promoter_share_link")]
[System.Text.Json.Serialization.JsonPropertyName("promoter_share_link")]
public string PromoterShareLink { get; set; } = default!;
}
}

View File

@@ -10,7 +10,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("sharer_appid")] [Newtonsoft.Json.JsonProperty("sharer_appid")]
[System.Text.Json.Serialization.JsonPropertyName("sharer_appid")] [System.Text.Json.Serialization.JsonPropertyName("sharer_appid")]
public string SharerAppId { get; set; } = string.Empty; public string? SharerAppId { get; set; }
/// <summary> /// <summary>
/// 获取或设置预约 ID。 /// 获取或设置预约 ID。

View File

@@ -0,0 +1,6 @@
{
"notice_id": "",
"mini_program_appid": "123",
"talent_appid": "123",
"sharer_appid": "123"
}

View File

@@ -0,0 +1,5 @@
{
"errcode": "0",
"errmsg": "ok",
"promoter_share_link": "xxx"
}