You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.5 KiB
69 lines
2.5 KiB
using BBWY.Common.Http;
|
|
using BBWY.Server.Model.Db;
|
|
using com.alibaba.openapi.client;
|
|
using com.alibaba.openapi.client.policy;
|
|
using Jd.ACES;
|
|
using Jd.Api;
|
|
using Jd.Api.Request;
|
|
using Jd.Api.Response;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Linq;
|
|
using System;
|
|
using System.Linq;
|
|
using System.Threading;
|
|
|
|
namespace BBWY.Test
|
|
{
|
|
internal class Program
|
|
{
|
|
private static IJdClient GetJdClient(string appKey, string appSecret)
|
|
{
|
|
return new DefaultJdClient("https://api.jd.com/routerjson", appKey, appSecret);
|
|
}
|
|
|
|
static void Main(string[] args)
|
|
{
|
|
var appkey = "120EA9EC65AB017567D78CC1139EEEA5";
|
|
var appSecret = "866a9877f5f24b03b537483b4defe75d";
|
|
var token = "eda9bd0d9c2b48fba96ebc415669cea7jkmg";//"2ace3023200c4ea9aa682bbf8bffee18jztm";
|
|
|
|
IJdClient client = GetJdClient(appkey, appSecret);
|
|
|
|
Console.WriteLine("----------------------计划维度 1---------------------------");
|
|
var req5 = new AdsIbgUniversalJosServiceCampaignQueryRequest();
|
|
req5.startDay = "2022-06-01";
|
|
req5.endDay = "2022-09-30";
|
|
req5.businessType = "2";
|
|
//req5.accessPin = "腾奇666";
|
|
req5.clickOrOrderDay = "0";
|
|
req5.giftFlag = "0";
|
|
req5.clickOrOrderCaliber = "1";
|
|
req5.isDaily = "true";
|
|
req5.pageSize = "100";
|
|
req5.page = "2";
|
|
//req.isDaily = "";
|
|
AdsIbgUniversalJosServiceCampaignQueryResponse response5 = client.Execute(req5, token, DateTime.Now.ToLocalTime());
|
|
Console.WriteLine(JsonConvert.SerializeObject(response5));
|
|
|
|
|
|
Console.WriteLine("----------------------计划维度 2---------------------------");
|
|
|
|
var req6 = new AdsIbgUniversalJosServiceCampaignQueryRequest();
|
|
req6.startDay = "2022-09-06";
|
|
req6.endDay = "2022-10-06";
|
|
req6.businessType = "2";
|
|
//req6.accessPin = "腾奇666";
|
|
req6.clickOrOrderDay = "0";
|
|
req6.giftFlag = "0";
|
|
req6.clickOrOrderCaliber = "1";
|
|
req6.isDaily = "true";
|
|
//req.isDaily = "";
|
|
AdsIbgUniversalJosServiceCampaignQueryResponse response6 = client.Execute(req6, token, DateTime.Now.ToLocalTime());
|
|
Console.WriteLine(JsonConvert.SerializeObject(response6));
|
|
|
|
|
|
Console.ReadKey();
|
|
}
|
|
}
|
|
}
|
|
|