Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cedricziel/amzn-sponsored-products-api-php

PHP client for the Amazon Sponsored Products API
https://github.com/cedricziel/amzn-sponsored-products-api-php

amazon amazon-api

Last synced: 11 days ago
JSON representation

PHP client for the Amazon Sponsored Products API

Awesome Lists containing this project

README

        

# amzn-sponsored-products-api-php

An API client for the Amazon Sponsored Products API.

```shell
composer require cedricziel/amznsponsoredproductsapiphp
```

## Docs

### General

Instantiate a client, configure your secrets and continue to use:

```php
use CedricZiel\AmznSponsoredProductsApiPHP\Endpoint;
use CedricZiel\AmznSponsoredProductsApiPHP\Generated\Model\SponsoredProductsListSponsoredProductsCampaignsRequestContent;
use CedricZiel\AmznSponsoredProductsApiPHP\Header;
use CedricZiel\AmznSponsoredProductsApiPHP\SponsoredProductsApiClient;

// You need to obtain a token via the Amazon LwA workflow
$accessToken = '...';
$client = SponsoredProductsApiClient::createFor(Endpoint::Europe, $accessToken);

// execute the endpoint of choice, see below ...
$body = new SponsoredProductsListSponsoredProductsCampaignsRequestContent();
$res = $client->listSponsoredProductsCampaigns($body, [
Header::AmazonAdvertisingApiClientId->value => '...',
Header::AmazonAdvertisingApiScope->value => '...',
]);
```

### docs ###

## License

Apache 2.0