setSearchIndex() публичный Метод

Sets the searchindex which should be used when set IdType other than ASIN
public setSearchIndex ( string $searchIndex ) : Lookup
$searchIndex string
Результат Lookup
Пример #1
0
 public function testGetSearchIndex()
 {
     $lookup = new Lookup();
     $this->assertEquals(null, $lookup->getSearchIndex());
     $lookup->setSearchIndex('Appliances');
     $this->assertEquals('Appliances', $lookup->getSearchIndex());
 }
Пример #2
0
<?php

include 'config.php';
require_once "lib/phpfastcache.php";
//AMAZON API
require __DIR__ . '/vendor/autoload.php';
use ApaiIO\Configuration\GenericConfiguration;
use ApaiIO\Operations\Lookup;
use ApaiIO\ApaiIO;
$conf = new GenericConfiguration();
$conf->setCountry('com')->setAccessKey(AWS_API_KEY)->setSecretKey(AWS_API_SECRET_KEY)->setAssociateTag(AWS_ANOTHER_ASSOCIATE_TAG);
$apaiIO = new ApaiIO($conf);
$search = new Lookup();
$search->setIdType('ISBN');
$search->setSearchIndex('Books');
$search->setResponseGroup(array('Images'));
//MYSQL
$mysqli = new mysqli($host, $user, $pass, $db);
if ($mysqli->connect_error) {
    die('Connect Error: ' . $mysqli->connect_error);
}
if (isset($_GET["off"]) && $_GET["off"] != '') {
    $offsetSql = $_GET["off"];
}
//API vars
//var holder for output
$json = array('books' => array());
$new = array();
// var for chart data
$chart = array("labels" => array(), "datasets" => array("label" => "My First dataset", "fillColor" => "rgba(220,220,220,0.2)", "strokeColor" => "rgba(220,220,220,1)", "pointColor" => "rgba(220,220,220,1)", "pointStrokeColor" => "#fff", "pointHighlightFill" => "#fff", "pointHighlightStroke" => "rgba(220,220,220,1)"));
$levtwo = array("data" => array());