Skip to content

MaximilianoRios/Nager.AmazonProductAdvertising

 
 

Repository files navigation

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

About

C# Amazon Product Advertising .NET Client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 90.3%
  • JavaScript 8.6%
  • Other 1.1%