mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-20 18:48:10 +08:00
feat(wxads): 封装部分微信广告平台接口
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads
|
||||
{
|
||||
public static class WechatAdsClientExecuteAdCreativesExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /adcreatives/add 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.AdCreativesAddResponse> ExecuteAdCreativesAddAsync(this WechatAdsClient client, Models.AdCreativesAddRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "adcreatives", "add")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.AdCreativesAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /adcreatives/update 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.AdCreativesUpdateResponse> ExecuteAdCreativesUpdateAsync(this WechatAdsClient client, Models.AdCreativesUpdateRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "adcreatives", "update")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.AdCreativesUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /adcreatives/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.AdCreativesGetResponse> ExecuteAdCreativesGetAsync(this WechatAdsClient client, Models.AdCreativesGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "adcreatives", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
if (request.AdCreativeId.HasValue)
|
||||
flurlReq.SetQueryParam("adcreative_id", request.AdCreativeId.Value);
|
||||
|
||||
if (request.Filters != null && request.Filters.Any())
|
||||
flurlReq.SetQueryParam("filtering", client.JsonSerializer.Serialize(request.Filters));
|
||||
|
||||
if (request.PageSize.HasValue)
|
||||
flurlReq.SetQueryParam("page_size", request.PageSize.Value);
|
||||
|
||||
if (request.Page.HasValue)
|
||||
flurlReq.SetQueryParam("page", request.Page.Value);
|
||||
|
||||
return await client.SendRequestAsync<Models.AdCreativesGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads
|
||||
{
|
||||
public static class WechatAdsClientExecuteAdGroupsExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /adgroups/add 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.AdGroupsAddResponse> ExecuteAdGroupsAddAsync(this WechatAdsClient client, Models.AdGroupsAddRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "adgroups", "add")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.AdGroupsAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /adgroups/update 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.AdGroupsUpdateResponse> ExecuteAdGroupsUpdateAsync(this WechatAdsClient client, Models.AdGroupsUpdateRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "adgroups", "update")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.AdGroupsUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /adgroups/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.AdGroupsGetResponse> ExecuteAdGroupsGetAsync(this WechatAdsClient client, Models.AdGroupsGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "adgroups", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
if (request.AdGroupId.HasValue)
|
||||
flurlReq.SetQueryParam("adgroup_id", request.AdGroupId.Value);
|
||||
|
||||
if (request.Filters != null && request.Filters.Any())
|
||||
flurlReq.SetQueryParam("filtering", client.JsonSerializer.Serialize(request.Filters));
|
||||
|
||||
if (request.PageSize.HasValue)
|
||||
flurlReq.SetQueryParam("page_size", request.PageSize.Value);
|
||||
|
||||
if (request.Page.HasValue)
|
||||
flurlReq.SetQueryParam("page", request.Page.Value);
|
||||
|
||||
return await client.SendRequestAsync<Models.AdGroupsGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /adgroups/delete 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.AdGroupsDeleteResponse> ExecuteAdGroupsDeleteAsync(this WechatAdsClient client, Models.AdGroupsDeleteRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "adgroups", "delete")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.AdGroupsDeleteResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads
|
||||
{
|
||||
public static class WechatAdsClientExecuteAdsExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /ads/add 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.AdsAddResponse> ExecuteAdsAddAsync(this WechatAdsClient client, Models.AdsAddRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "ads", "add")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.AdsAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /ads/update 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.AdsUpdateResponse> ExecuteAdsUpdateAsync(this WechatAdsClient client, Models.AdsUpdateRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "ads", "update")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.AdsUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /ads/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.AdsGetResponse> ExecuteAdsGetAsync(this WechatAdsClient client, Models.AdsGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "ads", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
if (request.AdId.HasValue)
|
||||
flurlReq.SetQueryParam("ad_id", request.AdId.Value);
|
||||
|
||||
if (request.Filters != null && request.Filters.Any())
|
||||
flurlReq.SetQueryParam("filtering", client.JsonSerializer.Serialize(request.Filters));
|
||||
|
||||
if (request.PageSize.HasValue)
|
||||
flurlReq.SetQueryParam("page_size", request.PageSize.Value);
|
||||
|
||||
if (request.Page.HasValue)
|
||||
flurlReq.SetQueryParam("page", request.Page.Value);
|
||||
|
||||
return await client.SendRequestAsync<Models.AdsGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /ads/delete 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.AdsDeleteResponse> ExecuteAdsDeleteAsync(this WechatAdsClient client, Models.AdsDeleteRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "ads", "delete")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.AdsDeleteResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads
|
||||
{
|
||||
public static class WechatAdsClientExecuteAsyncTasksExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /async_tasks/add 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.AsyncTasksAddResponse> ExecuteAsyncTasksAddAsync(this WechatAdsClient client, Models.AsyncTasksAddRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "async_tasks", "add")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.AsyncTasksAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /async_tasks/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.AsyncTasksGetResponse> ExecuteAsyncTasksGetAsync(this WechatAdsClient client, Models.AsyncTasksGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "async_tasks", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
if (request.Filters != null && request.Filters.Any())
|
||||
flurlReq.SetQueryParam("filtering", client.JsonSerializer.Serialize(request.Filters));
|
||||
|
||||
if (request.PageSize.HasValue)
|
||||
flurlReq.SetQueryParam("page_size", request.PageSize.Value);
|
||||
|
||||
if (request.Page.HasValue)
|
||||
flurlReq.SetQueryParam("page", request.Page.Value);
|
||||
|
||||
return await client.SendRequestAsync<Models.AsyncTasksGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
#region Files
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /async_task_files/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.AsyncTaskFilesGetResponse> ExecuteAsyncTaskFilesGetAsync(this WechatAdsClient client, Models.AsyncTaskFilesGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "async_task_files", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("task_id", request.TaskId)
|
||||
.SetQueryParam("file_id", request.FileId);
|
||||
|
||||
return await client.SendRequestAsync<Models.AsyncTaskFilesGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads
|
||||
{
|
||||
public static class WechatAdsClientExecuteCampaignsExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /campaigns/add 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CampaignsAddResponse> ExecuteCampaignsAddAsync(this WechatAdsClient client, Models.CampaignsAddRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "campaigns", "add")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CampaignsAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /campaigns/update 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CampaignsUpdateResponse> ExecuteCampaignsUpdateAsync(this WechatAdsClient client, Models.CampaignsUpdateRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "campaigns", "update")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CampaignsUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /campaigns/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CampaignsGetResponse> ExecuteCampaignsGetAsync(this WechatAdsClient client, Models.CampaignsGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "campaigns", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
if (request.CampaignId.HasValue)
|
||||
flurlReq.SetQueryParam("campaign_id", request.CampaignId.Value);
|
||||
|
||||
if (request.Filters != null && request.Filters.Any())
|
||||
flurlReq.SetQueryParam("filtering", client.JsonSerializer.Serialize(request.Filters));
|
||||
|
||||
if (request.PageSize.HasValue)
|
||||
flurlReq.SetQueryParam("page_size", request.PageSize.Value);
|
||||
|
||||
if (request.Page.HasValue)
|
||||
flurlReq.SetQueryParam("page", request.Page.Value);
|
||||
|
||||
return await client.SendRequestAsync<Models.CampaignsGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads
|
||||
{
|
||||
public static class WechatAdsClientExecuteCreditBillsExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /credit_bills/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CreditBillsGetResponse> ExecuteCreditBillsGetAsync(this WechatAdsClient client, Models.CreditBillsGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "credit_bills", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("bill_year", request.BillYear)
|
||||
.SetQueryParam("bill_month", request.BillMonth);
|
||||
|
||||
if (request.PageSize.HasValue)
|
||||
flurlReq.SetQueryParam("page_size", request.PageSize.Value);
|
||||
|
||||
if (request.Page.HasValue)
|
||||
flurlReq.SetQueryParam("page", request.Page.Value);
|
||||
|
||||
return await client.SendRequestAsync<Models.CreditBillsGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,150 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads
|
||||
{
|
||||
public static class WechatAdsClientExecuteCustomAudiencesExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /custom_audiences/add 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CustomAudiencesAddResponse> ExecuteCustomAudiencesAddAsync(this WechatAdsClient client, Models.CustomAudiencesAddRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "custom_audiences", "add")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CustomAudiencesAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /custom_audiences/update 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CustomAudiencesUpdateResponse> ExecuteCustomAudiencesUpdateAsync(this WechatAdsClient client, Models.CustomAudiencesUpdateRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "custom_audiences", "update")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CustomAudiencesUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /custom_audiences/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CustomAudiencesGetResponse> ExecuteCustomAudiencesGetAsync(this WechatAdsClient client, Models.CustomAudiencesGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "custom_audiences", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
if (request.CustomAudienceId.HasValue)
|
||||
flurlReq.SetQueryParam("audience_id", request.CustomAudienceId.Value);
|
||||
|
||||
if (request.PageSize.HasValue)
|
||||
flurlReq.SetQueryParam("page_size", request.PageSize.Value);
|
||||
|
||||
if (request.Page.HasValue)
|
||||
flurlReq.SetQueryParam("page", request.Page.Value);
|
||||
|
||||
return await client.SendRequestAsync<Models.CustomAudiencesGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
#region Files
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /custom_audience_files/add 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CustomAudienceFilesAddResponse> ExecuteCustomAudienceFilesAddAsync(this WechatAdsClient client, Models.CustomAudienceFilesAddRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
string boundary = "--BOUNDARY--" + DateTimeOffset.Now.Ticks.ToString("x");
|
||||
string filename = "file.zip";
|
||||
using var fileContent = new ByteArrayContent(request.FileBytes ?? new byte[0]);
|
||||
using var httpContent = new MultipartFormDataContent(boundary);
|
||||
httpContent.Add(new StringContent(request.CustomAudienceId.ToString()), "audience_id");
|
||||
httpContent.Add(new StringContent(request.UserIdType), "user_id_type");
|
||||
httpContent.Add(new StringContent(request.OperationType), "operation_type");
|
||||
httpContent.Add(fileContent, "\"file\"", "\"" + filename + "\"");
|
||||
httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data; boundary=" + boundary);
|
||||
fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("application/zip");
|
||||
fileContent.Headers.ContentLength = request.FileBytes?.Length ?? 0;
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(HttpMethod.Post, "custom_audience_files", "add")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestAsync<Models.CustomAudienceFilesAddResponse>(flurlReq, content: httpContent, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /custom_audience_files/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CustomAudienceFilesGetResponse> ExecuteCustomAudienceFilesGetAsync(this WechatAdsClient client, Models.CustomAudienceFilesGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "custom_audience_files", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
if (request.CustomAudienceId.HasValue)
|
||||
flurlReq.SetQueryParam("audience_id", request.CustomAudienceId.Value);
|
||||
|
||||
if (request.CustomAudienceFileId.HasValue)
|
||||
flurlReq.SetQueryParam("custom_audience_file_id", request.CustomAudienceFileId.Value);
|
||||
|
||||
if (request.PageSize.HasValue)
|
||||
flurlReq.SetQueryParam("page_size", request.PageSize.Value);
|
||||
|
||||
if (request.Page.HasValue)
|
||||
flurlReq.SetQueryParam("page", request.Page.Value);
|
||||
|
||||
return await client.SendRequestAsync<Models.CustomAudienceFilesGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads
|
||||
{
|
||||
public static class WechatAdsClientExecuteEstimationExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /estimation/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.EstimationGetResponse> ExecuteEstimationGetAsync(this WechatAdsClient client, Models.EstimationGetRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "estimation", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.EstimationGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads
|
||||
{
|
||||
public static class WechatAdsClientExecuteFundsExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /fund_transfer/add 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.FundTransferAddResponse> ExecuteFundTransferAddAsync(this WechatAdsClient client, Models.FundTransferAddRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "fund_transfer", "add")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.FundTransferAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /funds/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.FundsGetResponse> ExecuteFundsGetAsync(this WechatAdsClient client, Models.FundsGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "funds", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestAsync<Models.FundsGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /fund_statements_detailed/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.FundStatementsDetailedGetResponse> ExecuteFundStatementsDetailedGetAsync(this WechatAdsClient client, Models.FundStatementsDetailedGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "fund_statements_detailed", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
if (request.DateRange != null)
|
||||
flurlReq.SetQueryParam("date_range", client.JsonSerializer.Serialize(request.DateRange));
|
||||
|
||||
if (!string.IsNullOrEmpty(request.TradeType))
|
||||
flurlReq.SetQueryParam("trade_type", request.TradeType);
|
||||
|
||||
if (request.PageSize.HasValue)
|
||||
flurlReq.SetQueryParam("page_size", request.PageSize.Value);
|
||||
|
||||
if (request.Page.HasValue)
|
||||
flurlReq.SetQueryParam("page", request.Page.Value);
|
||||
|
||||
return await client.SendRequestAsync<Models.FundStatementsDetailedGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -53,7 +53,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Ads
|
||||
string boundary = "--BOUNDARY--" + DateTimeOffset.Now.Ticks.ToString("x");
|
||||
using var fileContent = new ByteArrayContent(request.FileBytes ?? new byte[0]);
|
||||
using var httpContent = new MultipartFormDataContent(boundary);
|
||||
httpContent.Add(fileContent, "\"media\"", "\"" + HttpUtility.UrlEncode(request.FileName) + "\"");
|
||||
httpContent.Add(fileContent, "\"file\"", "\"" + HttpUtility.UrlEncode(request.FileName) + "\"");
|
||||
httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data; boundary=" + boundary);
|
||||
fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse(request.FileContentType);
|
||||
fileContent.Headers.ContentLength = request.FileBytes?.Length ?? 0;
|
||||
|
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads
|
||||
{
|
||||
public static class WechatAdsClientExecuteQualificationsExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /qualifications/add 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.QualificationsAddResponse> ExecuteQualificationsAddAsync(this WechatAdsClient client, Models.QualificationsAddRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "qualifications", "add")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.QualificationsAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /qualifications/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.QualificationsGetResponse> ExecuteQualificationsGetAsync(this WechatAdsClient client, Models.QualificationsGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "qualifications", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestAsync<Models.QualificationsGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /qualifications/delete 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.QualificationsDeleteResponse> ExecuteQualificationsDeleteAsync(this WechatAdsClient client, Models.QualificationsDeleteRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "qualifications", "delete")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.QualificationsDeleteResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads
|
||||
{
|
||||
public static class WechatAdsClientExecuteReportsExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /daily_reports/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.DailyReportsGetResponse> ExecuteDailyReportsGetAsync(this WechatAdsClient client, Models.DailyReportsGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "daily_reports", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
if (request.DateRange != null)
|
||||
flurlReq.SetQueryParam("date_range", client.JsonSerializer.Serialize(request.DateRange));
|
||||
|
||||
if (!string.IsNullOrEmpty(request.ReportType))
|
||||
flurlReq.SetQueryParam("report_type", request.ReportType);
|
||||
|
||||
if (!string.IsNullOrEmpty(request.ReportLevel))
|
||||
flurlReq.SetQueryParam("level", request.ReportLevel);
|
||||
|
||||
if (request.PageSize.HasValue)
|
||||
flurlReq.SetQueryParam("page_size", request.PageSize.Value);
|
||||
|
||||
if (request.Page.HasValue)
|
||||
flurlReq.SetQueryParam("page", request.Page.Value);
|
||||
|
||||
return await client.SendRequestAsync<Models.DailyReportsGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /realtime_cost/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.RealtimeCostGetResponse> ExecuteRealtimeCostGetAsync(this WechatAdsClient client, Models.RealtimeCostGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "realtime_cost", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("date", request.DateString)
|
||||
.SetQueryParam("level", request.Level);
|
||||
|
||||
if (request.Filters != null && request.Filters.Any())
|
||||
flurlReq.SetQueryParam("filtering", client.JsonSerializer.Serialize(request.Filters));
|
||||
|
||||
return await client.SendRequestAsync<Models.RealtimeCostGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads
|
||||
{
|
||||
public static class WechatAdsClientExecuteSpEntrustmentExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /sp_entrustment/add 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.SpEntrustmentAddResponse> ExecuteSpEntrustmentAddAsync(this WechatAdsClient client, Models.SpEntrustmentAddRequest 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
|
||||
.CreateRequest(HttpMethod.Post, "sp_entrustment", "add")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.SpEntrustmentAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /sp_entrustment/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.SpEntrustmentGetResponse> ExecuteSpEntrustmentGetAsync(this WechatAdsClient client, Models.SpEntrustmentGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "sp_entrustment", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestAsync<Models.SpEntrustmentGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads
|
||||
{
|
||||
public static class WechatAdsClientExecuteTargetingTagsExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /targeting_tags/get 接口。</para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.TargetingTagsGetResponse> ExecuteTargetingTagsGetAsync(this WechatAdsClient client, Models.TargetingTagsGetRequest 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
|
||||
.CreateRequest(HttpMethod.Get, "targeting_tags", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("type", request.TagType);
|
||||
|
||||
return await client.SendRequestAsync<Models.TargetingTagsGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models.Abstractions
|
||||
{
|
||||
public sealed class CommonDateRange
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置开始日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("start_date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("start_date")]
|
||||
public string StartDateString { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置结束日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("end_date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("end_date")]
|
||||
public string EndDateString { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,133 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /adcreatives/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class AdCreativesAddRequest : WechatAdsRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Element
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置广告文案。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("description")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("description")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("image")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("image")]
|
||||
public string? ImageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("image_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("image_list")]
|
||||
public IList<string>? ImageIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置链接名称类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("link_name_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("link_name_type")]
|
||||
public string? LinkNameType { get; set; }
|
||||
}
|
||||
|
||||
public class Share
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分享标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("share_title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("share_title")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分享描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("share_description")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("share_description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_id")]
|
||||
public long CampaignId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adcreative_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adcreative_name")]
|
||||
public string AdCreativeName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意规格 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adcreative_template_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adcreative_template_id")]
|
||||
public int AdCreativeTemplateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意元素信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adcreative_elements")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adcreative_elements")]
|
||||
public Types.Element AdCreativeElement { get; set; } = new Types.Element();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置投放站点列表。
|
||||
/// <para>默认值:["SITE_SET_WECHAT"]</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("site_set")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("site_set")]
|
||||
public IList<string> SiteList { get; set; } = new List<string>() { "SITE_SET_WECHAT" };
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置目标 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("destination_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("destination_url")]
|
||||
public string DestinationUrl { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标的物类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_type")]
|
||||
public string ProductType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标的物 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_refs_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_refs_id")]
|
||||
public string? ProductRefId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分享信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("share_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("share_info")]
|
||||
public Types.Share? Share { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /adcreatives/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class AdCreativesAddResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adcreative_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adcreative_id")]
|
||||
public long AdCreativeId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /adcreatives/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class AdCreativesGetRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public long? AdCreativeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置过滤条件。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public IList<Abstractions.CommonFilter>? Filters { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? PageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? Page { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,162 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /adcreatives/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class AdCreativesGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class AdCreative
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Element
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置广告文案。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("description")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("description")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("image")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("image")]
|
||||
public string? ImageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("image_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("image_list")]
|
||||
public string[]? ImageIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置链接名称类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("link_name_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("link_name_type")]
|
||||
public string? LinkNameType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_id")]
|
||||
public long CampaignId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adcreative_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adcreative_id")]
|
||||
public long AdCreativeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adcreative_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adcreative_name")]
|
||||
public string AdCreativeName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意规格 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adcreative_template_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adcreative_template_id")]
|
||||
public int AdCreativeTemplateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意元素信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adcreative_elements")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adcreative_elements")]
|
||||
public Types.Element AdCreativeElement { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置投放站点列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("site_set")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("site_set")]
|
||||
public string[] SiteList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置目标 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("destination_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("destination_url")]
|
||||
public string DestinationUrl { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标的物类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_type")]
|
||||
public string ProductType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标的物 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_refs_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_refs_id")]
|
||||
public string? ProductRefId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置最近修改时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("last_modified_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("last_modified_time")]
|
||||
public long UpdateTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("created_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("created_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.AdCreative[] AdCreativeList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_info")]
|
||||
public Abstractions.CommonPagination Pagination { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /adcreatives/update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class AdCreativesUpdateRequest : WechatAdsRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Element : AdCreativesAddRequest.Types.Element
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adcreative_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adcreative_id")]
|
||||
public long AdCreativeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adcreative_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adcreative_name")]
|
||||
public string? AdCreativeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意元素信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adcreative_elements")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adcreative_elements")]
|
||||
public Types.Element? AdCreativeElement { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置目标 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("destination_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("destination_url")]
|
||||
public string? DestinationUrl { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /adcreatives/update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class AdCreativesUpdateResponse : WechatAdsResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,285 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /adgroups/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class AdGroupsAddRequest : WechatAdsRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Target
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class GeoLocation
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class CustomLocation
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置经度。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("longitude")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("longitude")]
|
||||
public double Longitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置纬度。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("latitude")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("latitude")]
|
||||
public double Latitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置半径(单位:米)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("radius")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("radius")]
|
||||
public int Radius { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置地点类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("location_types")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("location_types")]
|
||||
public IList<string> LocationTypes { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置省市区县 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("regions")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("regions")]
|
||||
public IList<int>? RegionIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商圈 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("business_districts")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("business_districts")]
|
||||
public IList<int>? BusinessDistrictIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义地理位置列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("custom_locations")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("custom_locations")]
|
||||
public IList<Types.CustomLocation>? CustomLocations { get; set; }
|
||||
}
|
||||
|
||||
public class WechatAdBehavior
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置包含的行为列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("actions")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("actions")]
|
||||
public IList<string>? IncludedActions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置排除的行为列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("excluded_actions")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("excluded_actions")]
|
||||
public IList<string>? ExcludedActions { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置年龄定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("age")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("age")]
|
||||
public IList<string>? AgeRanges { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置性别定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("gender")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("gender")]
|
||||
public IList<string>? GenderTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置学历定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("education")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("education")]
|
||||
public IList<string>? EducationTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置婚恋状态定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("relationship_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("relationship_status")]
|
||||
public IList<string>? RelationshipStatuses { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户付费习惯定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_paying_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_paying_type")]
|
||||
public IList<string>? UserPayingTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置联网方式定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("network_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("network_type")]
|
||||
public IList<string>? NetworkTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置移动运营商定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("network_operator")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("network_operator")]
|
||||
public IList<string>? NetworkOperatorTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置操作系统定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_os")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_os")]
|
||||
public IList<string>? UserOSTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置移动设备价格定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_price")]
|
||||
public IList<string>? DevicePriceTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置地理位置定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("geo_location")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("geo_location")]
|
||||
public Types.GeoLocation? GeoLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信广告行为定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("wechat_ad_behavior")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("wechat_ad_behavior")]
|
||||
public Types.WechatAdBehavior? WechatAdBehavior { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置包含的自定义人群 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("custom_audience")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("custom_audience")]
|
||||
public IList<int>? IncludedCustomAudienceIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置排除的自定义人群 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("excluded_custom_audience")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("excluded_custom_audience")]
|
||||
public IList<int>? ExcludedCustomAudienceIds { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_id")]
|
||||
public long CampaignId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告组名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adgroup_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adgroup_name")]
|
||||
public string AdGroupName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置投放站点列表。
|
||||
/// <para>默认值:["SITE_SET_WECHAT"]</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("site_set")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("site_set")]
|
||||
public IList<string> SiteList { get; set; } = new List<string>() { "SITE_SET_WECHAT" };
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标的物类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_type")]
|
||||
public string ProductType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标的物 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_refs_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_refs_id")]
|
||||
public string? ProductRefId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置定向条件。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("targeting")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("targeting")]
|
||||
public Types.Target Target { get; set; } = new Types.Target();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优化目标类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("optimization_goal")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("optimization_goal")]
|
||||
public string OptimizationGoalType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置出价方式类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("billing_event")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("billing_event")]
|
||||
public string BillingEventType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告出价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bid_amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bid_amount")]
|
||||
public int BidAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置开始投放日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("begin_date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("begin_date")]
|
||||
public string BeginDateString { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置结束投放日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("end_date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("end_date")]
|
||||
public string EndDateString { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置投放时间段。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("time_series")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("time_series")]
|
||||
public string? TimeSeries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置日限额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("daily_budget")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("daily_budget")]
|
||||
public int? DailyBudget { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("configured_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("configured_status")]
|
||||
public string? ConfiguredStatus { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /adgroups/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class AdGroupsAddResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置广告组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adgroup_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adgroup_id")]
|
||||
public long AdGroupId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /adgroups/delete 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class AdGroupsDeleteRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置广告组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adgroup_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adgroup_id")]
|
||||
public long AdGroupId { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /adgroups/delete 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class AdGroupsDeleteResponse : WechatAdsResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /adgroups/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class AdGroupsGetRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置广告组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public long? AdGroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置过滤条件。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public IList<Abstractions.CommonFilter>? Filters { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? PageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? Page { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,352 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /adgroups/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class AdGroupsGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class AdGroup
|
||||
{
|
||||
public class Types
|
||||
{
|
||||
public class Target
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class GeoLocation
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class CustomLocation
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置经度。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("longitude")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("longitude")]
|
||||
public double Longitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置纬度。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("latitude")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("latitude")]
|
||||
public double Latitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置半径(单位:米)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("radius")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("radius")]
|
||||
public int Radius { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置地点类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("location_types")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("location_types")]
|
||||
public string[] LocationTypes { get; set; } = new string[0];
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置省市区县 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("regions")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("regions")]
|
||||
public int[]? RegionIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商圈 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("business_districts")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("business_districts")]
|
||||
public int[]? BusinessDistrictIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义地理位置列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("custom_locations")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("custom_locations")]
|
||||
public Types.CustomLocation[]? CustomLocations { get; set; }
|
||||
}
|
||||
|
||||
public class WechatAdBehavior
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置包含的行为列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("actions")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("actions")]
|
||||
public string[]? IncludedActions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置排除的行为列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("excluded_actions")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("excluded_actions")]
|
||||
public string[]? ExcludedActions { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置年龄定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("age")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("age")]
|
||||
public string[]? AgeRanges { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置性别定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("gender")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("gender")]
|
||||
public string[]? GenderTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置学历定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("education")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("education")]
|
||||
public string[]? EducationTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置婚恋状态定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("relationship_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("relationship_status")]
|
||||
public string[]? RelationshipStatuses { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户付费习惯定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_paying_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_paying_type")]
|
||||
public string[]? UserPayingTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置联网方式定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("network_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("network_type")]
|
||||
public string[]? NetworkTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置移动运营商定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("network_operator")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("network_operator")]
|
||||
public string[]? NetworkOperatorTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置操作系统定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_os")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_os")]
|
||||
public string[]? UserOSTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置移动设备价格定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_price")]
|
||||
public string[]? DevicePriceTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置地理位置定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("geo_location")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("geo_location")]
|
||||
public Types.GeoLocation? GeoLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信广告行为定向。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("wechat_ad_behavior")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("wechat_ad_behavior")]
|
||||
public Types.WechatAdBehavior? WechatAdBehavior { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置包含的自定义人群 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("custom_audience")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("custom_audience")]
|
||||
public int[]? IncludedCustomAudienceIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置排除的自定义人群 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("excluded_custom_audience")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("excluded_custom_audience")]
|
||||
public int[]? ExcludedCustomAudienceIds { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_id")]
|
||||
public long CampaignId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adgroup_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adgroup_id")]
|
||||
public long AdGroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告组名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adgroup_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adgroup_name")]
|
||||
public string AdGroupName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置投放站点列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("site_set")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("site_set")]
|
||||
public string[] SiteList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标的物类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_type")]
|
||||
public string ProductType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标的物 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_refs_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_refs_id")]
|
||||
public string? ProductRefId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置定向条件。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("targeting")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("targeting")]
|
||||
public Types.Target Target { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优化目标类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("optimization_goal")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("optimization_goal")]
|
||||
public string OptimizationGoalType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置出价方式类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("billing_event")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("billing_event")]
|
||||
public string BillingEventType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告出价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bid_amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bid_amount")]
|
||||
public int BidAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置开始投放日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("begin_date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("begin_date")]
|
||||
public string BeginDateString { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置结束投放日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("end_date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("end_date")]
|
||||
public string EndDateString { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置投放时间段。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("time_series")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("time_series")]
|
||||
public string TimeSeries { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置日限额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("daily_budget")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("daily_budget")]
|
||||
public int? DailyBudget { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("configured_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("configured_status")]
|
||||
public string ConfiguredStatus { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置系统状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("system_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("system_status")]
|
||||
public string SystemStatus { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置审核拒绝原因。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reject_message")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("reject_message")]
|
||||
public string? RejectReason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置最近修改时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("last_modified_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("last_modified_time")]
|
||||
public long UpdateTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("created_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("created_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告组列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.AdGroup[] AdGroupList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_info")]
|
||||
public Abstractions.CommonPagination Pagination { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /adgroups/update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class AdGroupsUpdateRequest : WechatAdsRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Target : AdGroupsAddRequest.Types.Target
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adgroup_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adgroup_id")]
|
||||
public long AdGroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告组名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adgroup_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adgroup_name")]
|
||||
public string? AdGroupName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置定向条件。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("targeting")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("targeting")]
|
||||
public Types.Target? Target { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告出价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bid_amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bid_amount")]
|
||||
public int? BidAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置开始投放日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("begin_date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("begin_date")]
|
||||
public string? BeginDateString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置结束投放日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("end_date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("end_date")]
|
||||
public string? EndDateString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置投放时间段。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("time_series")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("time_series")]
|
||||
public string? TimeSeries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置日限额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("daily_budget")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("daily_budget")]
|
||||
public int? DailyBudget { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("configured_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("configured_status")]
|
||||
public string? ConfiguredStatus { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /adgroups/update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class AdGroupsUpdateResponse : WechatAdsResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /ads/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class AdsAddRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置广告组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adgroup_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adgroup_id")]
|
||||
public long AdGroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adcreative_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adcreative_id")]
|
||||
public long AdCreativeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ad_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ad_name")]
|
||||
public string AdName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("configured_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("configured_status")]
|
||||
public string? ConfiguredStatus { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /ads/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class AdsAddResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置广告 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ad_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ad_id")]
|
||||
public long AdId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /ads/delete 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class AdsDeleteRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置广告 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ad_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ad_id")]
|
||||
public long AdId { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /ads/delete 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class AdsDeleteResponse : WechatAdsResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /ads/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class AdsGetRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置广告 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public long? AdId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置过滤条件。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public IList<Abstractions.CommonFilter>? Filters { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? PageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? Page { get; set; }
|
||||
}
|
||||
}
|
121
src/SKIT.FlurlHttpClient.Wechat.Ads/Models/Ads/AdsGetResponse.cs
Normal file
121
src/SKIT.FlurlHttpClient.Wechat.Ads/Models/Ads/AdsGetResponse.cs
Normal file
@@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /ads/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class AdsGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Ad
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class AdCreative : AdCreativesGetResponse.Types.Data.Types.AdCreative
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_id")]
|
||||
public long CampaignId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ad_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ad_id")]
|
||||
public long AdId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ad_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ad_name")]
|
||||
public string AdName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adgroup_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adgroup_id")]
|
||||
public long AdGroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告创意信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adcreative")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adcreative")]
|
||||
public Types.AdCreative AdCreative { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("configured_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("configured_status")]
|
||||
public string ConfiguredStatus { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置系统状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("system_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("system_status")]
|
||||
public string SystemStatus { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置审核拒绝原因。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reject_message")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("reject_message")]
|
||||
public string? RejectReason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置最近修改时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("last_modified_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("last_modified_time")]
|
||||
public long UpdateTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("created_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("created_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.Ad[] AdList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_info")]
|
||||
public Abstractions.CommonPagination Pagination { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /ads/update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class AdsUpdateRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置广告 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ad_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ad_id")]
|
||||
public long AdId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ad_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ad_name")]
|
||||
public string? AdName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("configured_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("configured_status")]
|
||||
public string? ConfiguredStatus { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /ads/update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class AdsUpdateResponse : WechatAdsResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,124 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /async_tasks/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class AsyncTasksAddRequest : WechatAdsRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Specification
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class AdGroupHourlyReportSpec
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置查询日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("date")]
|
||||
public string DateString { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class AdGroupDailyReportSpec : AdGroupHourlyReportSpec
|
||||
{
|
||||
}
|
||||
|
||||
public class WechatAdvertisingDataSpec
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public sealed class TimeRange
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置开始时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("begin_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("begin_time")]
|
||||
public long BeginTimestamp { 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_modified_time_range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("last_modified_time_range")]
|
||||
public Types.TimeRange TimeRange { get; set; } = new Types.TimeRange();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置查询字段列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fields")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fields")]
|
||||
public IList<string> FieldList { get; set; } = new List<string>();
|
||||
}
|
||||
|
||||
public class POIHourlyReportSpec : AdGroupHourlyReportSpec
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告组小时报表查询条件所需条件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_type_adgroup_hourly_report_spec")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_type_adgroup_hourly_report_spec")]
|
||||
public Types.AdGroupHourlyReportSpec? AdGroupHourlyReportSpec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告组天报表查询条件所需条件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_type_adgroup_daily_report_spec")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_type_adgroup_daily_report_spec")]
|
||||
public Types.AdGroupDailyReportSpec? AdGroupDailyReportSpec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信广告数据查询条件所需条件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_type_wechat_advertising_data_spec")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_type_wechat_advertising_data_spec")]
|
||||
public Types.WechatAdvertisingDataSpec? WechatAdvertisingDataSpec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信门店小时报表查询条件所需条件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_type_poi_hourly_report_spec")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_type_poi_hourly_report_spec")]
|
||||
public Types.POIHourlyReportSpec? POIHourlyReportSpec { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_name")]
|
||||
public string TaskName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_type")]
|
||||
public string TaskType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务所需条件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_spec")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_spec")]
|
||||
public Types.Specification TaskSpecification { get; set; } = new Types.Specification();
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /async_tasks/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class AsyncTasksAddResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_id")]
|
||||
public int TaskId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /async_tasks/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class AsyncTasksGetRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置过滤条件。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public IList<Abstractions.CommonFilter>? Filters { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? PageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? Page { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,146 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /async_tasks/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class AsyncTasksGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Task
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Result
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class File
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置文件 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("file_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("file_id")]
|
||||
public int FileId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件 MD5 哈希值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("md5")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("md5")]
|
||||
public string FileHash { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("file_info_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("file_info_list")]
|
||||
public Types.File[] FileList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置错误码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("code")]
|
||||
public int ErrorCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置错误信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("message")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("message")]
|
||||
public string? ErrorMessage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置结果数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data? Data { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_id")]
|
||||
public int TaskId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_name")]
|
||||
public string TaskName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_type")]
|
||||
public string TaskType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public string Status { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务结果信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||
public Types.Result? Result { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("created_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("created_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.Task[] TaskList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_info")]
|
||||
public Abstractions.CommonPagination Pagination { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /async_task_files/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class AsyncTaskFilesGetRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int TaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务文件 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int FileId { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /async_task_files/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class AsyncTaskFilesGetResponse : WechatAdsResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /campaigns/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CampaignsAddRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_name")]
|
||||
public string CampaignName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_type")]
|
||||
public string CampaignType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广标的物类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_type")]
|
||||
public string ProductType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("configured_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("configured_status")]
|
||||
public string? ConfiguredStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置日消耗限额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("daily_budget")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("daily_budget")]
|
||||
public int? DailyBudget { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /campaigns/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CampaignsAddResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_id")]
|
||||
public long CampaignId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /campaigns/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CampaignsGetRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public long? CampaignId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置过滤条件。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public IList<Abstractions.CommonFilter>? Filters { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? PageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? Page { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /campaigns/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CampaignsGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Campaign
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_id")]
|
||||
public long CampaignId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_name")]
|
||||
public string CampaignName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_type")]
|
||||
public string CampaignType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广标的物类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_type")]
|
||||
public string ProductType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("configured_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("configured_status")]
|
||||
public string ConfiguredStatus { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置日消耗限额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("daily_budget")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("daily_budget")]
|
||||
public int? DailyBudget { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置限额到达日期字符串(格式:yyyyMMdd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("budget_reach_date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("budget_reach_date")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedStringConverter))]
|
||||
public string? BudgetReachDateString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置最近修改时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("last_modified_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("last_modified_time")]
|
||||
public long UpdateTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("created_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("created_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.Campaign[] CampaignList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_info")]
|
||||
public Abstractions.CommonPagination Pagination { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /campaigns/update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CampaignsUpdateRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_id")]
|
||||
public long CampaignId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_name")]
|
||||
public string? CampaignName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("configured_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("configured_status")]
|
||||
public string? ConfiguredStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置日消耗限额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("daily_budget")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("daily_budget")]
|
||||
public int? DailyBudget { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /campaigns/update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CampaignsUpdateResponse : WechatAdsResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /credit_bills/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CreditBillsGetRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置账单年份。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int BillYear { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置账单月份。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int BillMonth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? PageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? Page { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信广告平台的版本号。
|
||||
/// <para>默认值:v1.1</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? Version { get; set; } = "v1.1";
|
||||
}
|
||||
}
|
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /credit_bills/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CreditBillsGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class CreditBill
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置出账单日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bill_date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bill_date")]
|
||||
public string BillDateString { get; set; } = default!;
|
||||
|
||||
/// <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("due_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("due_time")]
|
||||
public long DueTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置待还金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("need_repay_amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("need_repay_amount")]
|
||||
public int RepayingAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置已还金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("repaid_amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("repaid_amount")]
|
||||
public int RepaidAmount { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资金账户列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.CreditBill[] CreditBillList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_info")]
|
||||
public Abstractions.CommonPagination Pagination { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /custom_audiences/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CustomAudiencesAddRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string CustomAudienceName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public string CustomAudienceType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("description")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("description")]
|
||||
public string CustomAudienceDescription { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /custom_audiences/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CustomAudiencesAddResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audience_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audience_id")]
|
||||
public int CustomAudienceId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /custom_audiences/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CustomAudiencesGetRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? CustomAudienceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? PageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? Page { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,111 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /custom_audiences/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CustomAudiencesGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class CustomAudience
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audience_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audience_id")]
|
||||
public int CustomAudienceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string CustomAudienceName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public string CustomAudienceType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("description")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("description")]
|
||||
public string CustomAudienceDescription { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置处理状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public string Status { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置错误码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("error_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("error_code")]
|
||||
public int ErrorCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户覆盖数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_count")]
|
||||
public int UserCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置最近修改时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("last_modified_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("last_modified_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
public DateTimeOffset UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("created_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("created_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
public DateTimeOffset CreateTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.CustomAudience[] CustomAudienceList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_info")]
|
||||
public Abstractions.CommonPagination Pagination { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /custom_audiences/update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CustomAudiencesUpdateRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audience_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audience_id")]
|
||||
public int CustomAudienceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string? CustomAudienceName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("description")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("description")]
|
||||
public string? CustomAudienceDescription { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /custom_audiences/update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CustomAudiencesUpdateResponse : WechatAdsResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /custom_audience_files/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CustomAudienceFilesAddRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int CustomAudienceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户 ID 类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string UserIdType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件操作类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string OperationType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置压缩文件字节数组。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public byte[] FileBytes { get; set; } = new byte[0];
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /custom_audience_files/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CustomAudienceFilesAddResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群数据文件 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("custom_audience_file_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("custom_audience_file_id")]
|
||||
public int CustomAudienceFileId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /custom_audience_files/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CustomAudienceFilesGetRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? CustomAudienceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群数据文件 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? CustomAudienceFileId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? PageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? Page { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,130 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /custom_audience_files/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CustomAudienceFilesGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class CustomAudienceFile
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audience_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audience_id")]
|
||||
public int CustomAudienceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群数据文件 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("custom_audience_file_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("custom_audience_file_id")]
|
||||
public int CustomAudienceFileId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群数据文件名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string CustomAudienceFileName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户 ID 类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_id_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_id_type")]
|
||||
public string UserIdType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件操作类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("operation_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("operation_type")]
|
||||
public string OperationType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置处理状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("process_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("process_status")]
|
||||
public string ProcessStatus { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置错误码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("process_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("process_code")]
|
||||
public int ErrorCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置错误信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("error_message")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("error_message")]
|
||||
public string? ErrorMessage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件总行数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("line_count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("line_count")]
|
||||
public int LineCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件包含的有效行数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("valid_line_count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("valid_line_count")]
|
||||
public int ValidLineCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件包含的用户数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_count")]
|
||||
public int UserCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("created_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("created_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
public DateTimeOffset CreateTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义人群数据文件列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.CustomAudienceFile[] CustomAudienceFileList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_info")]
|
||||
public Abstractions.CommonPagination Pagination { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /estimation/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class EstimationGetRequest : WechatAdsRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Target : AdGroupsAddRequest.Types.Target
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_type")]
|
||||
public string CampaignType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置定向条件。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("targeting")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("targeting")]
|
||||
public Types.Target Target { get; set; } = new Types.Target();
|
||||
}
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /estimation/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class EstimationGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置预估覆盖人数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("approximate_count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("approximate_count")]
|
||||
public int ApproximateCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置预估曝光量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("impression")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("impression")]
|
||||
public int ImpressCount { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /fund_statements_detailed/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class FundStatementsDetailedGetRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置时间范围。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public Abstractions.CommonDateRange DateRange { get; set; } = new Abstractions.CommonDateRange();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置交易类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? TradeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? PageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? Page { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信广告平台的版本号。
|
||||
/// <para>默认值:v1.1</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? Version { get; set; } = "v1.1";
|
||||
}
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /fund_statements_detailed/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class FundStatementsDetailedGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class FundStatement
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置资金账户类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fund_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fund_type")]
|
||||
public string FundType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置余额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置交易单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bill_number")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bill_number")]
|
||||
public string BillNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置交易描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("description")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("description")]
|
||||
public string Description { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置交易发生时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资金账户列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.FundStatement[] FundStatementList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_info")]
|
||||
public Abstractions.CommonPagination Pagination { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /fund_transfer/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class FundTransferAddRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置资金账户类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fund_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fund_type")]
|
||||
public string FundType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置调用方订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("external_bill_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("external_bill_no")]
|
||||
public string? ExternalBillNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置备注信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("memo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("memo")]
|
||||
public string? Memo { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /fund_transfer/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class FundTransferAddResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置资金账户类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fund_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fund_type")]
|
||||
public string FundType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置调用方订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("external_bill_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("external_bill_no")]
|
||||
public string? ExternalBillNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否重复转账。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_repeated")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_repeated")]
|
||||
public bool IsRepeated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置交易时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /funds/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class FundsGetRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置微信广告平台的版本号。
|
||||
/// <para>默认值:v1.1</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? Version { get; set; } = "v1.1";
|
||||
}
|
||||
}
|
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /funds/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class FundsGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Fund
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Credit
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置额度(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit_amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit_amount")]
|
||||
public int LimitAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置可分配金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("usable_amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("usable_amount")]
|
||||
public int UsableAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置已用金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("used_amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("used_amount")]
|
||||
public int UsedAmount { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资金账户类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fund_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fund_type")]
|
||||
public string FundType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资金余额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("balance")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("balance")]
|
||||
public int Balance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置固定信用金信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("credit_roll_spec")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("credit_roll_spec")]
|
||||
public Types.Credit? Credit { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资金账户列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.Fund[] FundList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -30,7 +30,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
public string? FileContentType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片文件的哈希值。如果不指定将由系统自动生成。
|
||||
/// 获取或设置图片文件的 MD5 哈希值。如果不指定将由系统自动生成。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
|
@@ -13,7 +13,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string ImageId { get; set; } = string.Empty;
|
||||
public string? ImageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置过滤条件。
|
||||
|
@@ -52,7 +52,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
public int FileSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片文件的哈希值。
|
||||
/// 获取或设置图片文件的 MD5 哈希值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("signature")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("signature")]
|
||||
|
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /qualifications/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class QualificationsAddRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置资质类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification_type")]
|
||||
public string QualificationType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资质名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification_name")]
|
||||
public string QualificationName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资质证明文件图片 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification_image_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification_image_id")]
|
||||
public string QualificationImageId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /qualifications/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class QualificationsAddResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置资质 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification_id")]
|
||||
public int QualificationId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /qualifications/delete 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class QualificationsDeleteRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置资质 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification_id")]
|
||||
public long QualificationId { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /qualifications/delete 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class QualificationsDeleteResponse : WechatAdsResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /qualifications/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class QualificationsGetRequest : WechatAdsRequest
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,93 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /qualifications/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class QualificationsGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Qualification
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置资质 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification_id")]
|
||||
public long QualificationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资质类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification_type")]
|
||||
public string QualificationType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资质名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification_name")]
|
||||
public string QualificationName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资质证明文件图片 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification_url")]
|
||||
public string QualificationImageUrl { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资质状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification_status")]
|
||||
public string QualificationStatus { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资质有效日期(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("valid_date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("valid_date")]
|
||||
public string? ValidDateString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置审核拒绝原因。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reject_message")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("reject_message")]
|
||||
public string? RejectReason { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资质列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.Qualification[] QualificationList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_info")]
|
||||
public Abstractions.CommonPagination Pagination { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /daily_reports/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class DailyReportsGetRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置时间范围。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public Abstractions.CommonDateRange DateRange { get; set; } = new Abstractions.CommonDateRange();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置报表类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? ReportType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置报表层级。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? ReportLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? PageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置页码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? Page { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,142 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /daily_reports/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class DailyReportsGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class DailyReport
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置查询日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("date")]
|
||||
public string DateString { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_id")]
|
||||
public long? CampaignId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_name")]
|
||||
public string? CampaignName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adgroup_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adgroup_id")]
|
||||
public long? AdGroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告组名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adgroup_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adgroup_name")]
|
||||
public string? AdGroupName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置曝光量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("impression")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("impression")]
|
||||
public int ImpressCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置点击量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("click")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("click")]
|
||||
public int ClickCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消耗金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cost")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cost")]
|
||||
public int Cost { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置点赞或评论量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("like_or_comment")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("like_or_comment")]
|
||||
public int LikeOrCommentCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片点击量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("image_click")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("image_click")]
|
||||
public int ImageClickCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置关注量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("follow")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("follow")]
|
||||
public int FollowCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置转发量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("share")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("share")]
|
||||
public int ShareCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置本地门店访问人次。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("lbs_wechat_pv")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("lbs_wechat_pv")]
|
||||
public int LBSWechatPV { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置本地门店访问人数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("lbs_wechat_uv")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("lbs_wechat_uv")]
|
||||
public int LBSWechatUV { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置日报列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.DailyReport[] DailyReportList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_info")]
|
||||
public Abstractions.CommonPagination Pagination { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /realtime_cost/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class RealtimeCostGetRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置查询日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string DateString { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置类型级别。
|
||||
/// <para>默认值:ADGROUP</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string Level { get; set; } = "ADGROUP";
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置过滤条件。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public IList<Abstractions.CommonFilter>? Filters { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /realtime_cost/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class RealtimeCostGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class RealtimeCost
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置推广计划 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("campaign_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("campaign_id")]
|
||||
public long CampaignId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置广告组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("adgroup_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("adgroup_id")]
|
||||
public long AdGroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消耗金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cost")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cost")]
|
||||
public int Cost { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置实时消耗列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.RealtimeCost[] RealtimeCostList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_info")]
|
||||
public Abstractions.CommonPagination Pagination { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /sp_entrustment/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class SpEntrustmentAddRequest : WechatAdsRequest
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /sp_entrustment/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class SpEntrustmentAddResponse : WechatAdsResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /sp_entrustment/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class SpEntrustmentGetRequest : WechatAdsRequest
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /sp_entrustment/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class SpEntrustmentGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否有授权关系。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("entrusted")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("entrusted")]
|
||||
public bool IsEntrusted { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /targeting_tags/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class TargetingTagsGetRequest : WechatAdsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置标签类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string TagType { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /targeting_tags/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class TargetingTagsGetResponse : WechatAdsResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Tag
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上级 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("parent_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("parent_id")]
|
||||
public int ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上级名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("parent_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("parent_name")]
|
||||
public string ParentName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置城市级别。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("city_level")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("city_level")]
|
||||
public string? CityLevel { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标签列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.Tag[] TagList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user