Skip to content

Latest commit

 

History

History
108 lines (87 loc) · 3.41 KB

README.md

File metadata and controls

108 lines (87 loc) · 3.41 KB

Nager.AmazonProductAdvertising

Features

  • ItemLookup
  • ItemSeach
  • BrowseNodeLookup
  • Card Operations
  • Create
  • Add
  • Get
  • Clear
  • Modify
  • Async support

Demo Shop

Visit the Nager Amazon Product Advertising Shop

nuget

The package is available on nuget

PM> install-package Nager.AmazonProductAdvertising

Donation possibilities

If this project help you reduce time to develop, you can give me a beer 🍺

  • Donate
  • BTC: 3PjuVRcAaKPv9yLLmrVUY9mqGngPDm3nPc (Bitcoin)

Exampels

Please check the AmazonEndpoint is correct for your Country.

  • Amazon Germany use AmazonEndpoint.DE
  • Amazon Spain use AmazonEndpoint.ES
  • Amazon United Kingdom use AmazonEndpoint.UK
Item Search
var authentication = new AmazonAuthentication();
authentication.AccessKey = "accesskey";
authentication.SecretKey = "secretkey";

var wrapper = new AmazonWrapper(authentication, AmazonEndpoint.US, "nager-20");
var result = wrapper.Search("canon eos", AmazonSearchIndex.Electronics, AmazonResponseGroup.Large);
Item Lookup
var authentication = new AmazonAuthentication();
authentication.AccessKey = "accesskey";
authentication.SecretKey = "secretkey";

var wrapper = new AmazonWrapper(authentication, AmazonEndpoint.US, "nager-20");
var result = wrapper.Lookup("B00BYPW00I");
Multi Item Lookup
var authentication = new AmazonAuthentication();
authentication.AccessKey = "accesskey";
authentication.SecretKey = "secretkey";

var wrapper = new AmazonWrapper(authentication, AmazonEndpoint.US, "nager-20");
var result = wrapper.Lookup(new string[] { "B00BYPW00I", "B004MKNBJG" });
CustomRequest with paging
var authentication = new AmazonAuthentication();
authentication.AccessKey = "accesskey";
authentication.SecretKey = "secretkey";

var wrapper = new AmazonWrapper(authentication, AmazonEndpoint.US, "nager-20");
var searchOperation = wrapper.ItemSearchOperation("canon eos", AmazonSearchIndex.Electronics);
searchOperation.Sort(AmazonSearchSort.Price, AmazonSearchSortOrder.Descending);
searchOperation.Skip(2);
var xmlResponse = wrapper.Request(searchOperation);

var result = XmlHelper.ParseXml<ItemSearchResponse>(xmlResponse.Content);
Debugging
var authentication = new AmazonAuthentication();
authentication.AccessKey = "accesskey";
authentication.SecretKey = "secretkey";

var wrapper = new AmazonWrapper(authentication, AmazonEndpoint.US, "nager-20");
wrapper.XmlReceived += (xml) => { System.Diagnostics.Debug.WriteLine(xml); };
wrapper.ErrorReceived += (errorResonse) => { System.Diagnostics.Debug.WriteLine(errorResonse.Error.Message); };
var result = wrapper.Lookup(new string[] { "B00OQVZDJM", "B00ZV9RDKK" });
Cart Create
var authentication = new AmazonAuthentication();
authentication.AccessKey = "accesskey";
authentication.SecretKey = "secretkey";

var items = new List<AmazonCartItem>();
items.Add(new AmazonCartItem("B00MH4QM1S"));
items.Add(new AmazonCartItem("B01EUHFAC6"));

var wrapper = new AmazonWrapper(authentication, AmazonEndpoint.US, "nager-20");
var result = wrapper.CartCreate(items);

Amazon Documentation

API Reference