Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 1 day 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 (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-08-04T18:37:22.000Z (over 11 years ago)
- Last Synced: 2024-11-06T21:14:06.526Z (about 2 months 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);
```