Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/cedricziel/amzn-sponsored-products-api-php
- Owner: cedricziel
- Created: 2024-07-14T19:22:50.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-08T21:45:43.000Z (3 months ago)
- Last Synced: 2024-10-11T20:06:01.872Z (25 days ago)
- Topics: amazon, amazon-api
- Language: PHP
- Homepage:
- Size: 1.62 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: .github/README.template.md
- Changelog: CHANGELOG.md
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