mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 12:01:33 +00:00
33 lines
856 B
PHP
33 lines
856 B
PHP
<?php
|
|
require_once realpath(dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR . 'bootstrap.php');
|
|
|
|
use ApaiIO\Configuration\GenericConfiguration;
|
|
use ApaiIO\Operations\Search;
|
|
use ApaiIO\ApaiIO;
|
|
use nntmux\db\DB;
|
|
|
|
$s = new DB();
|
|
|
|
$pubkey = $s->getSetting('amazonpubkey');
|
|
$privkey = $s->getSetting('amazonprivkey');
|
|
$asstag = $s->getSetting('amazonassociatetag');
|
|
|
|
$conf = new GenericConfiguration();
|
|
$conf
|
|
->setCountry('com')
|
|
->setAccessKey($pubkey)
|
|
->setSecretKey($privkey)
|
|
->setAssociateTag($asstag)
|
|
->setResponseTransformer('\ApaiIO\ResponseTransformer\XmlToSimpleXmlObject');
|
|
|
|
$search = new Search();
|
|
$search->setCategory('VideoGames');
|
|
$search->setKeywords('Guilty Gear 2 Oveture');
|
|
$search->setResponseGroup(['Large']);
|
|
$search->setPage(1);
|
|
|
|
$apaiIo = new ApaiIO($conf);
|
|
|
|
$response = $apaiIo->runOperation($search);
|
|
var_dump($response);
|