using Jd.ACES; using Jd.Api; using Jd.Api.Request; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; 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 = "E1AA9247D5583A6D87449CE6AB290185"; var appSecret = "e479558ddd9e40f8929cfc00c6cbbc9c"; ////0e61c4a8ec3e4df4b5836e10884db9220yth 齐盛 ////2ace3023200c4ea9aa682bbf8bffee18jztm 布莱特玩具 //var token = "01dc6f6e7fc34dcd99090d690312556cmdfk"; //齐盛 //var token = "9fffa982da23446fb035499ae5622f49odjk"; //腾奇 //var token = "c22ff4d37b6c4bbd82cd9e8d0dab42dbziyz"; //森王车品 var token = "44c19a1c1fbd4641957e6e8985ed1358jmtl"; //森王玩具 //var appkey = "120EA9EC65AB017567D78CC1139EEEA5"; //var appSecret = "8a42bc2301e8439b896e99f5475e0a9b"; //var token = "2ace3023200c4ea9aa682bbf8bffee18jztm"; //var path = @"C:\Users\pengcong001\Desktop\含赠品SKU.txt"; //var j = JToken.Parse(System.IO.File.ReadAllText(path, System.Text.Encoding.UTF8)); //var firstJ = j["Json"]["jingdong_sku_read_searchSkuList_responce"]["page"]["data"].Children().FirstOrDefault(); //var saleAtters = firstJ.Value("saleAttrs").Select(s => new //{ // attrId = s.Value("attrId"), // attrValues = s.Value("attrValues").Select(x => x.ToString()).ToList() //}).ToList(); IJdClient client = GetJdClient(appkey, appSecret); var p = new JDPromotionAPITest(); p.GetPromotionDetailById(client, token, 30785008559); p.GetPromotionDetailById(client, token, 30785011567); p.GetPromotionDetailById(client, token, 30785013875); p.GetPromotionDetailById(client, token, 30785012730); p.GetPromotionDetailById(client, token, 5623992600); p.GetPromotionDetailById(client, token, 5624259295); //var p = new JDProductAPITest(); //p.GetSkus(client, token); //{ // var req = new SellerPromotionCheckRequest(); // req.promoId = 5623871513; // req.status = 4; // var res = client.Execute(req, token, DateTime.Now.ToLocalTime()); // Console.WriteLine(JsonConvert.SerializeObject(res)); //} Console.ReadKey(); } } }