README
If you are here, you probably already installed AmazOOP correctly. If you haven't
done so, please read INSTALL first.
Using AmazOOP couldn't be easier. All it takes is five easy steps:
1. Include AmazOOP in your page
2. Create a new AmazonQuery.
3. Query Amazon for data.
4. Check for errors
5. Display the data you got from Amazon.
Here is a commented example. If you copy/paste this example it WILL work.
<?php
// 1. Include AmazOOP in your page
// You may need to change this to the actual physical path to the file
require_once('aq.php');
$aq = new AmazonQuery(); // 2. Create new AmazonQuery
// 3. Query Amazon for data:
// We will search for ASIN B00007EPJ6 in Amazon.com
// We want all the information so we will do a heavy request.
$queryResult = $aq->query("B00007EPJ6", "ASIN", "", "us", "heavy");
// 4. Check for errors
if($error = $queryResult->getErrorMessage())
echo "It looks like there's an error: " . $error;
// If everything's alright
else{
$product = $queryResult->getDetails();
// 5. Display the data you got from Amazon.
echo $product->getURL('small');
echo $product->getProductName() . "<br>";
echo "Our price: " . $product->getOurPrice() . "<br>";
echo $product->buyNow();
}
?>
Once got this, you can get creative! Check the AmazOOP documentation online at
http://design.madd0.com to take a look at other available functions and more
information on AmazOOP.
You should also go by frequently since AmazOOP and its documentation are work-
in-progress, and new versions are available frequently.
|