Class: Services_Amazon
Source Location: /Services_Amazon-0.9.0/Services/Amazon.php
Class for accessing and retrieving information from Amazon's Web Services
Author(s):
Version:
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Method Detail
Services_Amazon (Constructor) [line 248]
Services_Amazon Services_Amazon(
string
$access_key_id, string
$secret_access_key, [string
$associate_tag = null])
|
|
Constructor
Parameters:
BrowseNodeLookup [line 549]
array BrowseNodeLookup(
string
$browsenode_id, [array
$options = array()])
|
|
Retrieves information about a browse node Example: <?php
$amazon = new Services_Amazon('[your Access Key ID here]', '[your Secret Access key here]');
?>
Parameters:
CartAdd [line 580]
array CartAdd(
string
$cart_id, string
$hmac, array
$item, [array
$options = array()])
|
|
Adds items to an existing remote shopping cart Example: <?php
$amazon = new Services_Amazon('[your Access Key ID here]', '[your Secret Access key here]');
$item = array('ASIN' => 'aaaaaaaaaa', 'Quantity' => 1);
// $item = array(array('ASIN' => 'aaaaaaaaaa', 'Quantity' => 1),
// array('OfferListingId' => 'bbbbbbbbbb', 'Quantity' => 10),
// array('ASIN' => 'cccccccccc', 'Quantity' => 20));
$result = $amazon->CartAdd('[Cart ID]', '[HMAC]', $item);
?>
Parameters:
CartClear [line 600]
array CartClear(
string
$cart_id, string
$hmac, [array
$options = array()])
|
|
Removes all the contents of a remote shopping cart
Parameters:
CartCreate [line 629]
array CartCreate(
array
$item, [array
$options = array()])
|
|
Creates a new remote shopping cart Example: <?php
$amazon = new Services_Amazon('[your Access Key ID here]', '[your Secret Access key here]');
$item = array('ASIN' => 'aaaaaaaaaa', 'Quantity' => 1);
// $item = array(array('ASIN' => 'aaaaaaaaaa', 'Quantity' => 1),
// array('ASIN' => 'cccccccccc', 'Quantity' => 20));
?>
Parameters:
CartGet [line 647]
array CartGet(
string
$cart_id, string
$hmac, [array
$options = array()])
|
|
Retrieves the contents of a remote shopping cart
Parameters:
CartModify [line 679]
array CartModify(
string
$cart_id, string
$hmac, array
$item, [array
$options = array()])
|
|
Modifies the quantity of items in a cart and changes cart items to saved items Example: <?php
$amazon = new Services_Amazon('[your Access Key ID here]', '[your Secret Access key here]');
$item = array('CartItemId' => 'aaaaaaaaaa', 'Quantity' => 1);
// $item = array('CartItemId' => 'aaaaaaaaaa', 'Action' => 'SaveForLater');
// $item = array(array('CartItemId' => 'aaaaaaaaaa', 'Quantity' => 1),
// array('CartItemId' => 'cccccccccc', 'Quantity' => 20));
$result = $amazon->CartModify('[Cart ID]', '[HMAC]', $item);
?>
Parameters:
doBatch [line 789]
array doBatch(
string
$operation, array
$shared, [array
$params1 = array()], [array
$params2 = array()])
|
|
Combines requests for the same operation into a single request Example: <?php
$amazon = new Services_Amazon('[your Access Key ID here]', '[your Secret Access key here]');
$shared = array('SearchIndex' => 'Books',
'Keywords' => 'php');
$params1 = array('ItemPage' => '1');
$params2 = array('ItemPage' => '2');
$result = $amazon->doBatch('ItemSearch', $shared, $params1, $params2);
?>
Parameters:
getApiVersion [line 262]
Retrieves the current version of this classes API
getError [line 495]
Retrieves the error code and message if (PEAR::isError($result)) {
echo $error['Code'];
echo $error['Message'];
}
getErrors [line 476]
Retrieves all error codes and messages if (PEAR::isError($result)) {
echo $error['Code'];
echo $error['Message'];
}
}
getLastUrl [line 517]
Retrieves the last URL accessed to the Amazon (for debugging)
getProcessingTime [line 506]
string getProcessingTime(
)
|
|
Retrieves the processing time
getRawResult [line 528]
ItemLookup [line 708]
array ItemLookup(
string
$item_id, [array
$options = array()])
|
|
Retrieves information for products Example: <?php
$amazon = new Services_Amazon('[your Access Key ID here]', '[your Secret Access key here]');
$options = array();
$options['ResponseGroup'] = 'Large';
$result = $amazon->ItemLookup('[ASIN(s)]', $options);
?>
Parameters:
ItemSearch [line 740]
array ItemSearch(
string
$search_index, [array
$options = array()])
|
|
Searches for products Example: <?php
$amazon = new Services_Amazon('[your Access Key ID here]', '[your Secret Access key here]');
$options = array();
$options['Keywords'] = 'sushi';
$options['Sort'] = 'salesrank';
$options['ResponseGroup'] = 'ItemIds,ItemAttributes,Images';
?>
Parameters:
setAccessKeyID [line 274]
void setAccessKeyID(
string
$access_key_id)
|
|
Sets an Access Key ID
Parameters:
setAssociateID [line 321]
void setAssociateID(
string
$associd)
|
|
Sets an Associate ID
Parameters:
setAssociateTag [line 310]
void setAssociateTag(
string
$associate_tag)
|
|
Sets an Associate Tag
Parameters:
setBaseUrl [line 333]
void setBaseUrl(
string
$url)
|
|
Sets the base URL
Parameters:
setCache [line 397]
mixed setCache(
[string
$container = 'file'], [array
$container_options = array()])
|
|
Enables caching the data Requires Cache to be installed. Example: <?php
$amazon = new Services_Amazon('[your Access Key ID here]', '[your Secret Access key here]');
$amazon->setCache('file', array ('cache_dir' => 'cache/'));
?>
Parameters:
setCacheExpire [line 428]
void setCacheExpire(
integer
$secs)
|
|
Sets cache expire time Amazon dictates that any prices that are displayed that may be over an hour old should be accompanied by some sort of timestamp. You can get around that by expiring any queries that use the time in an hour (3600 seconds).
Parameters:
setLocale [line 347]
mixed setLocale(
string
$locale)
|
|
Sets the locale passed when making a query to Amazon Currently US, UK, DE, JP, FR, and CA are supported
Parameters:
setProxy [line 442]
void setProxy(
string
$host, [int
$port = 8080], [string
$user = null], [string
$pass = null])
|
|
Sets a proxy
Parameters:
setSecretAccessKey [line 298]
void setSecretAccessKey(
$secret_access_key, string
$subid)
|
|
Sets a Secret Access Key
Parameters:
setSubscriptionID [line 286]
void setSubscriptionID(
string
$subid)
|
|
Sets a Subscription ID (for backward compatibility)
Parameters:
setTimestamp [line 456]
void setTimestamp(
integer
$time)
|
|
Sets a timestamp (for debugging)
Parameters:
setVersion [line 372]
void setVersion(
string
$version)
|
|
Sets a version
Parameters:
SimilarityLookup [line 756]
array SimilarityLookup(
string
$item_id, [array
$options = array()])
|
|
Retrieves products that are similar to Amazon products
Parameters:
Documentation generated on Mon, 11 Mar 2019 15:46:56 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|