步步为盈
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.

70 lines
2.3 KiB

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";
var appkey = "120EA9EC65AB017567D78CC1139EEEA5";
var appSecret = "8a42bc2301e8439b896e99f5475e0a9b";
////0e61c4a8ec3e4df4b5836e10884db9220yth 齐盛
var token = "2ace3023200c4ea9aa682bbf8bffee18jztm"; //布莱特玩具
//var token = "01f5be2cb4d741dda66bce2356941597mdfm"; //布莱特玩具 token2
//var token = "01dc6f6e7fc34dcd99090d690312556cmdfk"; //齐盛
//var token = "9fffa982da23446fb035499ae5622f49odjk"; //腾奇
//var token = "c22ff4d37b6c4bbd82cd9e8d0dab42dbziyz"; //森王车品
//var token = "44c19a1c1fbd4641957e6e8985ed1358jmtl"; //森王玩具
IJdClient client = GetJdClient(appkey, appSecret);
{
var skuList = new List<long>() {
10025658468477,
10026219782038,
10026279996161,
10026279996162,
10026279996163,
10026463915671,
10029572468081,
10029572468082,
10029572468083,
10029572468084,
10030302993587,
10063391438691,
10063391438692,
10063391438693,
10063391438694
};
foreach (var sku in skuList)
{
var jdClient = GetJdClient(appkey, appSecret);
var req = new StockReadFindSkuStockRequest();
req.skuId = sku;
var res = jdClient.Execute(req, token, DateTime.Now.ToLocalTime());
}
}
Console.ReadKey();
}
}
}