Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nager/Nager.AmazonProductAdvertising

.NET Amazon Product Advertising Client
https://github.com/nager/Nager.AmazonProductAdvertising

amazon amazon-product-advertising amazon-product-advertising-api amazon-product-data c-sharp csharp dotnet dotnet-core paapi paapi5 product-advertising-api

Last synced: 4 days ago
JSON representation

.NET Amazon Product Advertising Client

Awesome Lists containing this project

README

        

# Nager.AmazonProductAdvertising
Allow access to amazon product advertising API (`paapi5`), you can search a product over the name or a keyword.

### Usage

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 (simple)
```cs
var authentication = new AmazonAuthentication("accesskey", "secretkey");
var client = new AmazonProductAdvertisingClient(authentication, AmazonEndpoint.US, "nager-20");
var result = await client.SearchItemsAsync("canon eos");
```

##### Item Search (advanced)
```cs
var authentication = new AmazonAuthentication("accesskey", "secretkey");
var client = new AmazonProductAdvertisingClient(authentication, AmazonEndpoint.US, "nager-20");
var searchRequest = new SearchRequest
{
Keywords = "canon eos",
ItemPage = 2,
Resources = new []
{
//You can found all available Resources in the documentation
//https://webservices.amazon.com/paapi5/documentation/search-items.html#resources-parameter
"Images.Primary.Large",
"ItemInfo.Title",
"ItemInfo.Features"
}
};
var result = await client.SearchItemsAsync(searchRequest);
```

##### Item Lookup
```cs
var authentication = new AmazonAuthentication("accesskey", "secretkey");
var client = new AmazonProductAdvertisingClient(authentication, AmazonEndpoint.US, "nager-20");
var result = await client.GetItemsAsync("B00BYPW00I");
```

##### Multi Item Lookup
```cs
var authentication = new AmazonAuthentication("accesskey", "secretkey");
var client = new AmazonProductAdvertisingClient(authentication, AmazonEndpoint.US, "nager-20");
var result = await client.GetItemsAsync(new string[] { "B00BYPW00I", "B004MKNBJG" });
```

### Amazon Documentation
- [API Reference](https://webservices.amazon.com/paapi5/documentation/)
- [Product Advertising API Scratchpad](https://webservices.amazon.com/paapi5/documentation/play-around-using-scratchpad.html)