feat(wxapi): 新增视频号小店获取留资组件、获取留资组件直播推广记录等接口

This commit is contained in:
Fu Diwei
2024-04-29 21:59:24 +08:00
parent cf55f66d18
commit 0127123659
9 changed files with 280 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/leads/get_leads_component_id 接口的请求。</para>
/// </summary>
public class ChannelsLeadsGetLeadsComponentIdRequest : WechatApiRequest, IInferable<ChannelsLeadsGetLeadsComponentIdRequest, ChannelsLeadsGetLeadsComponentIdResponse>
{
/// <summary>
/// 获取或设置翻页标记。
/// </summary>
[Newtonsoft.Json.JsonProperty("last_buffer")]
[System.Text.Json.Serialization.JsonPropertyName("last_buffer")]
public string? Cursor { get; set; }
}
}

View File

@@ -0,0 +1,56 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/leads/get_leads_component_id 接口的响应。</para>
/// </summary>
public class ChannelsLeadsGetLeadsComponentIdResponse : WechatApiResponse
{
public static class Types
{
public class LeadsComponent
{
/// <summary>
/// 获取或设置留资组件 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("leads_component_id")]
[System.Text.Json.Serialization.JsonPropertyName("leads_component_id")]
public string LeadsComponentId { get; set; } = default!;
/// <summary>
/// 获取或设置留资组件标题。
/// </summary>
[Newtonsoft.Json.JsonProperty("leads_description")]
[System.Text.Json.Serialization.JsonPropertyName("leads_description")]
public string Description { get; set; } = default!;
/// <summary>
/// 获取或设置留资组件状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
public int Status { get; set; }
}
}
/// <summary>
/// 获取或设置留资组件列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("item")]
[System.Text.Json.Serialization.JsonPropertyName("item")]
public Types.LeadsComponent[] LeadsComponentList { get; set; } = default!;
/// <summary>
/// 获取或设置是否还有更多。
/// </summary>
[Newtonsoft.Json.JsonProperty("continue_flag")]
[System.Text.Json.Serialization.JsonPropertyName("continue_flag")]
public bool HasMore { get; set; }
/// <summary>
/// 获取或设置翻页标记。
/// </summary>
[Newtonsoft.Json.JsonProperty("last_buffer")]
[System.Text.Json.Serialization.JsonPropertyName("last_buffer")]
public string? NextCursor { get; set; }
}
}

View File

@@ -0,0 +1,36 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/leads/get_leads_component_promote_record 接口的请求。</para>
/// </summary>
public class ChannelsLeadsGetLeadsComponentPromoteRecordRequest : WechatApiRequest, IInferable<ChannelsLeadsGetLeadsComponentPromoteRecordRequest, ChannelsLeadsGetLeadsComponentPromoteRecordResponse>
{
/// <summary>
/// 获取或设置留资组件 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("leads_component_id")]
[System.Text.Json.Serialization.JsonPropertyName("leads_component_id")]
public string LeadsComponentId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置开始时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("start_time")]
[System.Text.Json.Serialization.JsonPropertyName("start_time")]
public long? StartTimestamp { get; set; }
/// <summary>
/// 获取或设置结束时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("end_time")]
[System.Text.Json.Serialization.JsonPropertyName("end_time")]
public long? EndTimestamp { get; set; }
/// <summary>
/// 获取或设置翻页标记。
/// </summary>
[Newtonsoft.Json.JsonProperty("last_buffer")]
[System.Text.Json.Serialization.JsonPropertyName("last_buffer")]
public string? Cursor { get; set; }
}
}

View File

@@ -0,0 +1,88 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/leads/get_leads_component_promote_record 接口的响应。</para>
/// </summary>
public class ChannelsLeadsGetLeadsComponentPromoteRecordResponse : WechatApiResponse
{
public static class Types
{
public class RecordData
{
/// <summary>
/// 获取或设置主播昵称。
/// </summary>
[Newtonsoft.Json.JsonProperty("anchor_nickname")]
[System.Text.Json.Serialization.JsonPropertyName("anchor_nickname")]
public string AnchorNickname { get; set; } = default!;
/// <summary>
/// 获取或设置直播描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("live_description")]
[System.Text.Json.Serialization.JsonPropertyName("live_description")]
public string LiveDescription { get; set; } = default!;
/// <summary>
/// 获取或设置直播开始时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("live_start_time")]
[System.Text.Json.Serialization.JsonPropertyName("live_start_time")]
public long LiveStartTimestamp { get; set; }
/// <summary>
/// 获取或设置曝光 UV。
/// </summary>
[Newtonsoft.Json.JsonProperty("exposure_uv")]
[System.Text.Json.Serialization.JsonPropertyName("exposure_uv")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public int ExposureUV { get; set; }
/// <summary>
/// 获取或设置点击 UV。
/// </summary>
[Newtonsoft.Json.JsonProperty("click_uv")]
[System.Text.Json.Serialization.JsonPropertyName("click_uv")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public int ClickUV { get; set; }
/// <summary>
/// 获取或设置曝光点击率。
/// </summary>
[Newtonsoft.Json.JsonProperty("exposure_click_rate")]
[System.Text.Json.Serialization.JsonPropertyName("exposure_click_rate")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public decimal ExposureClickRate { get; set; }
/// <summary>
/// 获取或设置留资人数。
/// </summary>
[Newtonsoft.Json.JsonProperty("leads_num")]
[System.Text.Json.Serialization.JsonPropertyName("leads_num")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public int LeadsNumber { get; set; }
}
}
/// <summary>
/// 获取或设置推广记录列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("record_data")]
[System.Text.Json.Serialization.JsonPropertyName("record_data")]
public Types.RecordData[] RecordDataList { get; set; } = default!;
/// <summary>
/// 获取或设置是否还有更多。
/// </summary>
[Newtonsoft.Json.JsonProperty("continue_flag")]
[System.Text.Json.Serialization.JsonPropertyName("continue_flag")]
public bool HasMore { get; set; }
/// <summary>
/// 获取或设置翻页标记。
/// </summary>
[Newtonsoft.Json.JsonProperty("last_buffer")]
[System.Text.Json.Serialization.JsonPropertyName("last_buffer")]
public string? NextCursor { get; set; }
}
}