https://github.com/traviswimer/amazonproductapi_soaper
A small PHP class for communicating with the Amazon Product API
https://github.com/traviswimer/amazonproductapi_soaper
Last synced: about 1 year ago
JSON representation
A small PHP class for communicating with the Amazon Product API
- Host: GitHub
- URL: https://github.com/traviswimer/amazonproductapi_soaper
- Owner: traviswimer
- Created: 2012-12-12T07:21:25.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-08-04T18:37:22.000Z (almost 13 years ago)
- Last Synced: 2025-02-17T10:49:05.282Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 129 KB
- Stars: 2
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is an extremely simple class used to make requests to the Amazon Product API. There don't seem to be many good resources available to get people started using the API, so hopefully this code will be of help.
A list of Amazon Product Advertising API operations can be found here:
http://docs.aws.amazon.com/AWSECommerceService/latest/DG/CHAP_OperationListAlphabetical.html
# Example usage
The code below shows how to search Amazon's music section for the band "Slow Magic".
```php
//Create API access object
$public_key = 'YOUR PUBLIC KEY';
$secret_key = 'YOUR PRIVATE KEY';
$associate_tag = 'AN OPTIONAL ASSOCIATE TAG';
$amazon_api = new AmazonAPI($public_key, $secret_key, $associate_tag);
// Set the API request parameters
$params_array = array(
'Operation' => 'ItemSearch',
'SearchIndex' => 'Music',
'Keywords' => urlencode('Slow Magic')
);
// returns a list of items for the search query 'Slow Magic'
$response = $amazon_api->sendRequest($params_array);
```