我正在使用 GData api 将产品导入我的商家提要。代码如下:
List<ProductEntry> newEntries = new List<ProductEntry>();
foreach (Product prod in ent.Products.Where(i => !i.IsDeleted && i.IsDisplayed && i.Price > 0))
{
newEntries.Add(prod.GetNewEntry());
}
string GoogleUsername = "nope@gmail.com";
string GooglePassword = "*****";
ContentForShoppingService service = new ContentForShoppingService("MY STORE");
service.setUserCredentials(GoogleUsername, GooglePassword);
service.AccountId = "*******";
service.ShowWarnings = true;
ProductFeed pf = service.InsertProducts(newEntries);
r.Write(pf.Entries.Count.ToString());
此代码返回给我 1 个条目,而不是它应该返回的 400+,并且该 1 个条目是空的,没有错误或警告信息。我的商家中心仪表板上没有显示任何内容。关于这里可能发生的事情有什么想法吗?
或者 - 我怎样才能获得有关正在发生的事情的更多详细信息?