Amazon C # Product Advertising API

Can someone tell me a C # example using the Amazon product advertising API, for example for a search item. Everything I found now does not work due to changes.

Thanks!

edit:

Most popular error: "Could not serialize message body: ItemSearchRequest1 cannot create a temporary class"

+6
source share
3 answers

Here is a C # example:

http://aws.amazon.com/code/Product-Advertising-API/3941

FWIW, the AWS thread I mentioned includes these steps for a workaround:

These are the steps as of January 31, 2012 to fix this problem in Visual Studio for .Net clients:

1) Click the "Show all files" button in Solution Explorer for the project that contains the link to the amazon service.

2) Expand the link and open the AWSECommerceService.wsdl file in the editor

3) On line 584, change the value of "maxOccurs" to "1".

<xs:element minOccurs="0" maxOccurs="1" name="ImageSets"> 

4) Save the AWSECommerceService.wsdl file

5) Right-click Reference.svcmap and click on "Run Custom Tool"

6) Expand Reference.svcmap and open either Reference.cs or Reference.vb

+4
source

You can use the following nuget package.

 PM> Install-Package Nager.AmazonProductAdvertising 

Search Example

 var authentication = new AmazonAuthentication(); authentication.AccessKey = "accesskey"; authentication.SecretKey = "secretkey"; var wrapper = new AmazonWrapper(authentication, AmazonEndpoint.DE); var result = wrapper.Search("canon eos", AmazonSearchIndex.Electronics, AmazonResponseGroup.Large); 
+9
source

If you want to use Html REST instead of Soap / Wsdl, I will add an example updated for API 2011 and Visual Studio 2012 in my blog: "Up to date CSHARP REST sample"

+2
source

Source: https://habr.com/ru/post/915032/


All Articles