setItemId() public méthode

Sets the itemid which has to be looked up Basicly it is an amazon asin
public setItemId ( string $itemId ) : SimilarityLookup
$itemId string
Résultat SimilarityLookup
 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());
 }
Exemple #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);
Exemple #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 testSetter()
 {
     $lookup = new SimilarityLookup();
     $lookup->setItemId('B1234');
 }