mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-10-07 23:24:36 +08:00
feat(wxapi): 新增微信小店为推客获取小店关联账号直播预约的推广参数接口
This commit is contained in:
@@ -6119,6 +6119,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECPromoterGetShopLiveCommissionProductListResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/promoter/get_shop_live_notice_promoter_share_link 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/leagueheadsupplier/api/sharer/live/api_GetShopLiveNoticePromoterShareLink.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECPromoterGetShopLiveNoticePromoterShareLinkResponse> ExecuteChannelsECPromoterGetShopLiveNoticePromoterShareLinkAsync(this WechatApiClient client, Models.ChannelsECPromoterGetShopLiveNoticePromoterShareLinkRequest 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_shop_live_notice_promoter_share_link")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECPromoterGetShopLiveNoticePromoterShareLinkResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ECPromoter/Product
|
||||
|
@@ -0,0 +1,43 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/promoter/get_shop_live_notice_promoter_share_link 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECPromoterGetShopLiveNoticePromoterShareLinkRequest : WechatApiRequest, IInferable<ChannelsECPromoterGetShopLiveNoticePromoterShareLinkRequest, ChannelsECPromoterGetShopLiveNoticePromoterShareLinkResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置小店 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("shop_appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("shop_appid")]
|
||||
public string ShopId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置关联账号 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promoter_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promoter_id")]
|
||||
public string PromoterId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置关联账号类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promoter_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promoter_type")]
|
||||
public int PromoterType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置预约 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("notice_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("notice_id")]
|
||||
public string NoticeId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推客 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sharer_appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sharer_appid")]
|
||||
public string? SharerAppId { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/promoter/get_shop_live_notice_promoter_share_link 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECPromoterGetShopLiveNoticePromoterShareLinkResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置内嵌微信小店优惠券的推广参数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promoter_share_link")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promoter_share_link")]
|
||||
public string PromoterShareLink { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"shop_appid": "",
|
||||
"promoter_id": "",
|
||||
"promoter_type": 1,
|
||||
"notice_id": "",
|
||||
"sharer_appid": ""
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"errcode": "0",
|
||||
"errmsg": "ok",
|
||||
"promoter_share_link": "XXX"
|
||||
}
|
Reference in New Issue
Block a user