我正在使用亚马逊产品广告 API 根据给定的 ISBN 编号获取有关书籍的数据。它工作得很好,我得到了大部分信息,但对于一些书,我对编辑评论有疑问。看起来这些信息可以在亚马逊网站上找到,但我的查询没有得到它。有谁知道为什么?下面是我的代码示例。示例 ISBN 可能是 9780752809069。感谢您的任何建议。
AWSECommerceServicePortTypeClient amazonClient;
amazonClient = new AWSECommerceServicePortTypeClient(
new BasicHttpBinding(BasicHttpSecurityMode.Transport), new EndpointAddress("https://ecs.amazonaws.co.uk/onca/soap?Service=AWSECommerceService")); //Amazon UK working
amazonClient.ChannelFactory.Endpoint.Behaviors.Add(new AmazonSigningEndpointBehavior("AAAAAAAAAAAAAAAAA", "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"));
ItemLookup itemLookup = new ItemLookup();
ItemLookupRequest request_isbn = new ItemLookupRequest();
request_isbn.ResponseGroup = new string[] {"EditorialReview", "Large" };
request_isbn.SearchIndex = "Books";
request_isbn.ItemId = new string[] { "9780752809069" };
request_isbn.IncludeReviewsSummary = "True";
request_isbn.IdType = ItemLookupRequestIdType.ISBN;
request_isbn.IdTypeSpecified = true;
itemLookup.Request = new ItemLookupRequest[] { request_isbn };
itemLookup.AssociateTag = "my astag";
ItemLookupResponse response_isbn = new ItemLookupResponse();
response_isbn = amazonClient.ItemLookup(itemLookup);
string _Description = "";
foreach (var revitem in response_isbn.Items[0].Item)
{
if (revitem.EditorialReviews != null) _Description = revitem.EditorialReviews.Last().Content.ToString(); //Sometimes is null even if there is Product Description avaliable on the Amazon Web
}