简体   繁体   中英

C# library for Amazon Product Advertising API

I'm trying to retrieve data from 'Amazon Product Advertising API', and I see that I need to sign my request, and then the response is an XML document which should be parsed.

I wonder if there is any library which I can send my requests throught, and recieve the response back as an object.

If not, what should I do to convert those XML reponses to an object ? I've read about schemas, but where do I get those schemas from and where do I get from the defention for the response objects so I could define them my self.

Thanks alot!

You can use the following nuget package

PM> Install-Package Nager.AmazonProductAdvertising

Example:

var authentication = new AmazonAuthentication();
authentication.AccessKey = "accesskey";
authentication.SecretKey = "secretkey";

var client = new AmazonProductAdvertisingClient(authentication, AmazonEndpoint.DE);
//Search
var result = await client.SearchItemsAsync("canon eos");
//Lookup
var result = await client.GetItemsAsync("B00BYPW00I");

There is a library that helps you sign requests AND process the responses by converting the XML into a relatively easy-to-use object. I've been using it for a few weeks now and wrote my own helper classes to really make querying the API fast and easy.

I wrote a demo console C# app where you can just plug in your Amazon credentials and start playing around here: https://github.com/zoenberger/AmazonProductAdvertising

I also answered a similar question here: https://stackoverflow.com/a/33617604/5543992

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM