See also: http://docs.aws.amazon.com/AWSECommerceService/2011-08-01/DG/SimilarityLookup.html
Author: Jan Eichhorn (exeu65@googlemail.com)
Inheritance: extends AbstractOperation
Esempio n. 1
0
 public function testGetItemId()
 {
     $lookup = new SimilarityLookup();
     $this->assertEquals(null, $lookup->getItemId());
     $lookup->setItemId('B0117IJ4LE');
     $this->assertEquals('B0117IJ4LE', $lookup->getItemId());
 }
 public function getItemId()
 {
     $lookup = new SimilarityLookup();
     static::assertEquals(null, $lookup->getItemId());
     $lookup->setItemId('B0117IJ4LE');
     static::assertEquals('B0117IJ4LE', $lookup->getItemId());
 }
Esempio n. 3
0
// $cartCreate = new CartCreate();
// $cartCreate->addItem("B0040PBK32", 1);
// $formattedResponse = $apaiIO->runOperation($cartCreate);
// $cartAdd = new CartAdd();
// $cartAdd->setCartId('280-6695255-7497359');
// $cartAdd->setHMAC('LxQ0BKVBeQTrzFCXvIoa/262EcU=');
// $cartAdd->addItem('B003YL444A', 1);
// $formattedResponse = $apaiIO->runOperation($cartAdd);
// var_dump($formattedResponse);
$conf->setResponseTransformer('\\ApaiIO\\ResponseTransformer\\XmlToDomDocument');
$lookup = new Lookup();
$lookup->setItemId('B0040PBK32');
$lookup->setResponseGroup(array('Large', 'Small'));
$formattedResponse = $apaiIO->runOperation($lookup, $configuration);
//var_dump($formattedResponse);
$lookup = new SimilarityLookup();
$lookup->setItemId('B0040PBK32');
$lookup->setResponseGroup(array('Large', 'Small'));
$formattedResponse = $apaiIO->runOperation($lookup);
$conf->setRequest('\\ApaiIO\\Request\\Soap\\Request');
$conf->setResponseTransformer('\\ApaiIO\\ResponseTransformer\\ObjectToArray');
$lookup = new SimilarityLookup();
$lookup->setItemId('B0040PBK32');
$lookup->setResponseGroup(array('Large', 'Small'));
$formattedResponse = $apaiIO->runOperation($lookup, $conf);
//var_dump($formattedResponse);
$conf->setResponseTransformer(new \ApaiIO\ResponseTransformer\ObjectToArray());
$browseNodeLookup = new BrowseNodeLookup();
$browseNodeLookup->setNodeId(542064);
$formattedResponse = $apaiIO->runOperation($browseNodeLookup, $configuration);
var_dump($formattedResponse);
Esempio n. 4
0
});
$app->get('/amazon/node/:browsenode', function ($browsenode) {
    $conf = new GenericConfiguration();
    $conf->setCountry('com')->setAccessKey(getenv('AMAZON_ACCESS'))->setSecretKey(getenv('AMAZON_SECRET'))->setAssociateTag(getenv('AMAZON_ASSOCIATE_TAG'));
    $browseNodeLookup = new BrowseNodeLookup();
    $browseNodeLookup->setNodeId($browsenode);
    $apaiIo = new ApaiIO($conf);
    $response = $apaiIo->runOperation($browseNodeLookup);
    echo json_encode(simplexml_load_string($response));
});
$app->get('/amazon/lookup/:asin', function ($asin) {
    $conf = new GenericConfiguration();
    $conf->setCountry('com')->setAccessKey(getenv('AMAZON_ACCESS'))->setSecretKey(getenv('AMAZON_SECRET'))->setAssociateTag(getenv('AMAZON_ASSOCIATE_TAG'));
    $apaiIo = new ApaiIO($conf);
    $lookup = new Lookup();
    $lookup->setItemId($asin);
    $lookup->setResponseGroup(array('Large'));
    // More detailed information
    $response = $apaiIo->runOperation($lookup);
    echo json_encode(simplexml_load_string($response));
});
$app->get('/amazon/similar/:asin', function ($asin) {
    $conf = new GenericConfiguration();
    $conf->setCountry('com')->setAccessKey(getenv('AMAZON_ACCESS'))->setSecretKey(getenv('AMAZON_SECRET'))->setAssociateTag(getenv('AMAZON_ASSOCIATE_TAG'));
    $apaiIo = new ApaiIO($conf);
    $similaritylookup = new SimilarityLookup();
    $similaritylookup->setItemId($asin);
    $response = $apaiIo->runOperation($similaritylookup);
    echo json_encode(simplexml_load_string($response));
});
$app->run();
 public function testGetName()
 {
     $lookup = new SimilarityLookup();
     $this->assertEquals('SimilarityLookup', $lookup->getName());
 }