PHPackages                             rootman/simpleapa - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. rootman/simpleapa

ActiveLibrary

rootman/simpleapa
=================

1.0.5(9y ago)11162MITPHPPHP &gt;=5.4.0

Since Aug 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/rootman/simpleapa)[ Packagist](https://packagist.org/packages/rootman/simpleapa)[ RSS](/packages/rootman-simpleapa/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (3)Versions (7)Used By (0)

SimpleAPA
=========

[](#simpleapa)

A simple wrapper for  Amazon Product Advertising API.

Installation
------------

[](#installation)

Add to composer.json:

```
{
    "require": {
        "rootman/simpleapa": "~1.0"
    }
}
```

Fire up composer:

```
$ composer install
```

### Laravel specific

[](#laravel-specific)

Register the Serviceprovider.

Publish the config:

```
$ php artisan vendor:publish
```

Fill the config.

Usage
-----

[](#usage)

### Framework agnostic

[](#framework-agnostic)

```
use ApaiIO\ApaiIO;
use ApaiIO\Configuration\GenericConfiguration;

$conf = new GenericConfiguration();
$conf
    ->setCountry('de')
    ->setAccessKey('AMAZON ACCESS KEY')
    ->setSecretKey('AMAZON SECRET KEY')
    ->setAssociateTag('AMAZON ASSOCIATE TAG')
    ->setRequest('\ApaiIO\Request\Soap\Request')
    ->setResponseTransformer('\ApaiIO\ResponseTransformer\ObjectToArray');

$apa = SimpleAPA(new ApaiIO($conf));

$apa->bestPrice('B004BM3M6W');
```

### Laravel

[](#laravel)

```
$apa = App::make(\Rootman\Simpleapa\SimpleAPA); // don't actually use it like that, better inject it

$apa->bestPrice('B004BM3M6W');
```

#### Sample helper file

[](#sample-helper-file)

```
