PHP code example of cyrrill / apai-io
1. Go to this page and download the library: Download cyrrill/apai-io library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cyrrill / apai-io example snippets
bash
$ php composer.phar install
php
namespace Acme\Demo;
use ApaiIO\Configuration\GenericConfiguration;
use ApaiIO\Operations\Search;
use ApaiIO\ApaiIO;
$conf = new GenericConfiguration();
$client = new \GuzzleHttp\Client();
$request = new \ApaiIO\Request\GuzzleRequest($client);
$conf
->setCountry('com')
->setAccessKey(AWS_API_KEY)
->setSecretKey(AWS_API_SECRET_KEY)
->setAssociateTag(AWS_ASSOCIATE_TAG)
->setRequest($request);
$apaiIO = new ApaiIO($conf);
$search = new Search();
$search->setCategory('DVD');
$search->setActor('Bruce Willis');
$search->setKeywords('Die Hard');
$formattedResponse = $apaiIO->runOperation($search);
var_dump($formattedResponse);