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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?