Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

Exeu AmazonECS Bundle

Build Status

Travis:

Comming soon..

Jenkins:

Build Status

Installation

Symfony 2.0.x

Add the following lines in your deps file:

[AmazonECSPHPLibrary]
    git=git://github.com/Exeu/Amazon-ECS-PHP-Library.git
    target=amazon_ecs_php_library
[ExeuAmazonECSBundle]
    git=git://github.com/Exeu/ExeuAmazonECSBundle.git
    target=bundles/Exeu/AmazonECSBundle

Modify the autoload.php:

<?php

// app/autoload.php
$loader->registerNamespaces(array(
    // ...
    'Exeu'              => __DIR__.'/../vendor/bundles',
    // ...
));

require __DIR__.'/../vendor/amazon_ecs_php_library/lib/AmazonECS.class.php';

Now run the vendors script:

$ php bin/vendors install

Symfony 2.1.x

Add ExeuAmazonECSBundle in your composer.json:

{
    "require": {
        "exeu/amazon-ecs-bundle": "dev-master"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update exeu/amazon-ecs-bundle

Dont forget to activate the bundle in your AppKernel:

<?php

// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new Exeu\AmazonECSBundle\ExeuAmazonECSBundle(),
    // ...
);

Configuration

To get this bundle working you have to add the following to your config.yml

# app/config/config.yml

exeu_amazon_ecs:
    access_key: YOUR_ACCESS_KEY
    secret_key: YOUR_SECRET_KEY
    country: COUNTRY CODE
    associate_tag: YOUR_ASSOCIATE_TAG

Usage

To work with the Amazon Product Advertising API you need to get the new service for example in your controller:

<?php

$amazonEcs = $this->get('exeu_amazon_ecs.pa');

Now you can execute your first searchrequest:

<?php

// ...
$result = $amazonEcs->category('Blended')->search('PHP 5');

var_dump($result);

For more detailed information See: Amazon-ECS-PHP-Library - Examples )