'><?php echo $type; ?> </option> <?php } } ?> </select> </label> <input type="submit" value="Search!"> </p> </form> <?php if (strtolower($_SERVER['REQUEST_METHOD']) == 'post') { $amazon = new Query("1338XJTNFMTHK413WFR2"); try { $amazon->category($searchFor)->ResponseGroup('Large')->Keywords($keywords); $results = $amazon->search(); if ($results->totalResults() > 0) { echo '<div id="results">'; echo '<h2>Search Results</h2>'; foreach ($results as $result) { echo "<div>"; echo "<h3>{$result->Title}</h3>"; if (isset($result->MediumImage)) { ?> <div class="thumb"> <a href='<?php echo $result->DetailPageURL; ?>
/** * Ensures that the query API works as expected when searching by ASIN * * @return void */ public function testQueryAsin() { $item = $this->_query->asin('B0015T963C')->search(); $this->assertTrue($item instanceof Amazon\Item); }