Download the PHP package marcl/amazonproductapi without Composer

On this page you can find all versions of the php package marcl/amazonproductapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package amazonproductapi

AmazonProductAPI

PHP library to perform product lookup and searches using the Amazon Product API.

Installation

This library requires the SimpleXML and Curl extensions to be installed and uses PHP 7+ . Installation is simple using Composer:

Amazon Product API

It also assumes that you have some basic knowledge of Amazon's Product API and have set up an Amazon Associate account see: Amazon Product API Set Up.

You'll need an AWS key, secret key, and associate tag. Ensure that you keep these safe!

Examples

I've added some simple examples in examples.php. To run them create a file called secretKeys.php containing your secret keys:

and then run the examples with:

Quick Start

Include the library in your code using the Composer autoloader and create an AmazonUrlBuilder with your credentials

Note: Keep your Amazon keys safe. Either use environment variables or include from a file that you don't check into GitHub.

Locale

This library supports all Product Advertising API locales and you can set it as you construct the AmazonUrlBuilder class with your keys.

At this time, these are the current supported locales:

Item Search

To search for an item use the ItemSearch() method:

Default sort

By default, the ItemSearch() method will search by featured. If you want to sort by another category then pass a 3rd parameter with the name of the category you wish to sort by. These differ by category type but the two you'll probably need are price (sort by price low to high) or -price (sort by price high to low). See ItemSearch Sort Values for more details.

To determine valid categories for search call GetValidSearchNames():

Item Lookup

To look up product using the product ASIN number use ItemLookup():

Data Transformation

By default the data will be returned as SimpleXML nodes. However, you can ask for the data to be transformed differently, depending on your use case for the API. Pass a type when instantiating the AmazonAPI class as follows:

This will output:

This will return a simplified version of each item with minimal data but enough for simple use cases.

The different data transformation types are defined as follows. Feel free to raise an issue if you'd like the data transforming to a new type.

TODO

Thanks

This library uses code based on AWS API authentication For PHP by David Drake but has been mostly rewritten.

LICENSE

See LICENSE


All versions of amazonproductapi with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package marcl/amazonproductapi contains the following files

Loading the files please wait ....