apai-io

Amazon Product Adverstising Library based on PHP REST and SOAP (only V1) using the Product Advertising API.

Github星跟踪图

apai-io

Scrutinizer Code Quality
Code Coverage
Build Status
Latest Stable Version Total Downloads
Build Status
Documentation Status

ApaiIO is a highly flexible PHP library for fetching the Product Advertising API using REST or SOAP.
You can either use the built in operations like ItemSearch or ItemLookup or you can implement your own operations which fits to your needs.

Everything is programmed against interfaces so you can implement your own request or response classes for example.

This class is realized by the Product Advertising API (former ECS) from Amazon WS Front. https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html

Documentation

The documentation is currently under construction.

You can read here: http://apai-io.readthedocs.io/en/latest/

Installation

Composer

$ composer require exeu/apai-io

Composer will generate the autoloader file automaticaly. So you only have to include this.
Typically its located in the vendor dir and its called autoload.php

Basic Usage:

This library is using the PSR-4 standard: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md
So you can use any autoloader which fits into this standard.
The tests directory contains an example bootstrap file.

<?php
namespace Acme\Demo;

use ApaiIO\Configuration\GenericConfiguration;
use ApaiIO\Operations\Search;
use ApaiIO\ApaiIO;

$conf = new GenericConfiguration();
$client = new \GuzzleHttp\Client();
$request = new \ApaiIO\Request\GuzzleRequest($client);

$conf
    ->setCountry('com')
    ->setAccessKey(AWS_API_KEY)
    ->setSecretKey(AWS_API_SECRET_KEY)
    ->setAssociateTag(AWS_ASSOCIATE_TAG)
    ->setRequest($request);
$apaiIO = new ApaiIO($conf);

$search = new Search();
$search->setCategory('DVD');
$search->setActor('Bruce Willis');
$search->setKeywords('Die Hard');

$formattedResponse = $apaiIO->runOperation($search);

var_dump($formattedResponse);

For some very simple examples go to the samples-folder and have a look at the sample files.
These files contain all information you need for building queries successful.

Webservice Documentation:

Hosted on Amazon.com:
http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/

主要指标

概览
名称与所有者Exeu/apai-io
主编程语言PHP
编程语言PHP (语言数: 1)
平台
许可证
所有者活动
创建于2013-06-08 07:19:11
推送于2019-12-12 09:11:03
最后一次提交2019-12-12 10:11:02
发布数15
最新版本名称2.2.0 (发布于 )
第一版名称1.0.0 (发布于 2013-06-20 20:01:16)
用户参与
星数625
关注者数57
派生数152
提交数312
已启用问题?
问题数114
打开的问题数14
拉请求数48
打开的拉请求数3
关闭的拉请求数21
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?