2017 © Pedro Peláez
 

library amazon-ecs

With Laravel, search and lookup Amazon products easily.

image

dawson/amazon-ecs

With Laravel, search and lookup Amazon products easily.

  • Monday, March 26, 2018
  • by joedawson
  • Repository
  • 4 Watchers
  • 36 Stars
  • 1,942 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 15 Forks
  • 4 Open issues
  • 9 Versions
  • 27 % Grown

The README.md

Amazon ECS (E-Commerce Services) Package for Laravel

If you need the ability to search Amazon's catalog of products or lookup an individual item with Laravel, then this may be the package for you., (*1)

Please note, you'll need to ensure you have an associate tag before using this package., (*2)

Installation

composer require dawson/amazon-ecs

After you have successfully installed, add the follow Service Provider to your config/app.php., (*3)

Dawson\AmazonECS\AmazonECSServiceProvider::class,

And the following facade, also in config/app.php., (*4)

'Amazon' => Dawson\AmazonECS\AmazonECSFacade::class

Now we'll go ahead and publish the amazon.php configuration file., (*5)

php artisan vendor:publish --provider="Dawson\AmazonECS\AmazonECSServiceProvider"

Open up the amazon.php configuration file and enter your credentials or leverage the use of environment variables which're used by default., (*6)

When it comes to choosing a locale, you have a choice of the following:, (*7)

Locale Country
co.uk United Kingdom
com United States
ca Canada
com.br Brazil
de Germany
es Spain
fr France
in India
co.jp Japan
com.mx Mexico

You should now be correctly configured!, (*8)

Usage

Currently, there are two methods available which are search and lookup., (*9)

$results = Amazon::search('Home Alone')->json();

It's that simple!, (*10)

Please note, this currently searches the entire Amazon catalog. I plan on adding the ability to search within a given category soon so keep an eye out for that., (*11)

Lookup

You can also lookup any given item, assuming it's availble on your configure locale and is a valid ASIN, of which is possible by doing the following:, (*12)

$product = Amazon::lookup('B004VLKY8M')->json();

This will simply return the product, it's attributes and item links., (*13)

Responses

Currently, there are two available response methods. The default xml method, or my preferred - json., (*14)

The following returns an XML string., (*15)

$xml = Amazon::search('Call of Duty')->xml();

And as you can probably assume, the following returns a JSON string., (*16)

$json = Amazon::search('Halo')->json();

Questions & Issues

Should you have any questions or come across a problem, please feel free to submit an issue., (*17)

License

This package is open-sourced software licensed under the MIT license., (*18)


Planned

  • [X] Finish Documentation
  • [X] Locales
  • [ ] Better Exception Handling
  • [ ] Cart abilities, such as modifying, adding, clearing etc.
  • [X] XML to JSON (the ECS API returns an XML response, I myself would like to have the ability to convert this to JSON - but optional)

The Versions

26/03 2018

dev-master

9999999-dev

With Laravel, search and lookup Amazon products easily.

  Sources   Download

MIT

The Requires

 

by Joe Dawson

laravel amazon ecs affiliate product advertising associate

26/03 2018

2.1.0

2.1.0.0

With Laravel, search and lookup Amazon products easily.

  Sources   Download

MIT

The Requires

 

by Joe Dawson

laravel amazon ecs affiliate product advertising associate

13/06 2017

2.0.1

2.0.1.0

With Laravel, search and lookup Amazon products easily.

  Sources   Download

MIT

The Requires

 

by Joe Dawson

laravel amazon ecs affiliate product advertising associate

28/02 2017

dev-dev

dev-dev

With Laravel, search and lookup Amazon products easily.

  Sources   Download

MIT

The Requires

 

by Joe Dawson

laravel amazon ecs affiliate product advertising associate

28/02 2017

v2.0.0

2.0.0.0

With Laravel, search and lookup Amazon products easily.

  Sources   Download

MIT

The Requires

 

by Joe Dawson

laravel amazon ecs affiliate product advertising associate

11/12 2015

1.0.3

1.0.3.0

With Laravel, search and lookup Amazon products easily.

  Sources   Download

MIT

The Requires

 

by Joe Dawson

11/12 2015

1.0.2

1.0.2.0

With Laravel, search and lookup Amazon products easily.

  Sources   Download

MIT

The Requires

 

by Joe Dawson

11/12 2015

1.0.1

1.0.1.0

With Laravel, search and lookup Amazon products easily.

  Sources   Download

MIT

The Requires

 

by Joe Dawson

11/12 2015

1.0.0

1.0.0.0

With Laravel, search and lookup Amazon products easily.

  Sources   Download

MIT

The Requires

 

by Joe Dawson