mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Fix amazon lookup.
This commit is contained in:
@@ -4,7 +4,6 @@ require_once realpath(dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR .
|
||||
use ApaiIO\ApaiIO;
|
||||
use ApaiIO\Configuration\GenericConfiguration;
|
||||
use ApaiIO\Operations\Search;
|
||||
use ApaiIO\ResponseTransformer\XmlToSimpleXmlObject;
|
||||
use app\models\Settings;
|
||||
|
||||
|
||||
@@ -13,12 +12,16 @@ $privkey = Settings::value('APIs..amazonprivkey');
|
||||
$asstag = Settings::value('APIs..amazonassociatetag');
|
||||
|
||||
$conf = new GenericConfiguration();
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$request = new \ApaiIO\Request\GuzzleRequest($client);
|
||||
|
||||
$conf
|
||||
->setCountry('com')
|
||||
->setAccessKey($pubkey)
|
||||
->setSecretKey($privkey)
|
||||
->setAssociateTag($asstag)
|
||||
->setResponseTransformer(XmlToSimpleXmlObject::class);
|
||||
->setRequest($request)
|
||||
->setResponseTransformer(new \ApaiIO\ResponseTransformer\XmlToSimpleXmlObject());
|
||||
|
||||
$search = new Search();
|
||||
$search->setCategory('VideoGames');
|
||||
|
||||
Reference in New Issue
Block a user