Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Commit

Permalink
- Get Rid of AWS Dependency
Browse files Browse the repository at this point in the history
- Fix Signature
- Improve guzzle version compatibility
  • Loading branch information
ClouSale committed Feb 1, 2021
1 parent f05eced commit 4386497
Show file tree
Hide file tree
Showing 748 changed files with 11,453 additions and 21,703 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is an API Binding in PHP for the new Amazon Selling Partner API.

This library is based on the output of `swagger-codegen` with the [OpenAPI files provided by Amazon](https://github.com/amzn/selling-partner-api-models/tree/main/models) and has been modified by the contributors.

The purpose of this package is to have an easy way of getting started with the Amazon Selling Partner API through a simple composer package
The purpose of this package is to have an easy way of getting started with the Amazon Selling Partner API through a simple composer package.

# Requirements

Expand All @@ -25,15 +25,15 @@ composer require clousale/amazon-sp-api-php

You can find detailed documentation for this PHP Library in the [`docs/Api` directory](https://github.com/clousale/amazon-sp-api-php/tree/master/docs/Api) (Please note: Namespaces and other classes could have been changed)

You can find general information about the Amazon Selling Partner API on [the official Amazon Developer Website](https://developer.amazonservices.com)
You can find general information about the Amazon Selling Partner API on [the official Amazon Developer Website](https://developer.amazonservices.com).

# Examples

These are simple examples, just to show you how to get started calling the API.

## IAM Role

For when you entered the IAM Role ARN in your developer profile
For when you entered the IAM Role ARN in your developer profile:

```php
<?php
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^6.2",
"aws/aws-sdk-php": "^3.172"
"guzzlehttp/guzzle": "^6.2|^7.0"
},
"require-dev": {
"roave/security-advisories": "dev-master",
Expand Down
41 changes: 10 additions & 31 deletions lib/Api/AuthorizationApi.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
<?php
/**
* AuthorizationApi
* PHP version 5.
* AuthorizationApi.
*
* @category Class
*
* @author Swagger Codegen team
*
* @see https://github.com/swagger-api/swagger-codegen
* @author Stefan Neuhaus / ClouSale
*/

/**
Expand All @@ -16,36 +11,24 @@
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
*
* OpenAPI spec version: v1
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.20
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

namespace ClouSale\AmazonSellingPartnerAPI\Api;

use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use InvalidArgumentException;
use ClouSale\AmazonSellingPartnerAPI\ApiException;
use ClouSale\AmazonSellingPartnerAPI\Configuration;
use ClouSale\AmazonSellingPartnerAPI\HeaderSelector;
use ClouSale\AmazonSellingPartnerAPI\Helpers\SellingPartnerApiRequest;
use ClouSale\AmazonSellingPartnerAPI\Models\Authorization\GetAuthorizationCodeResponse;
use ClouSale\AmazonSellingPartnerAPI\ObjectSerializer;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use InvalidArgumentException;

/**
* AuthorizationApi Class Doc Comment.
*
* @category Class
*
* @author Swagger Codegen team
*
* @see https://github.com/swagger-api/swagger-codegen
* @author Stefan Neuhaus / ClouSale
*/
class AuthorizationApi
{
Expand All @@ -66,12 +49,8 @@ class AuthorizationApi
*/
protected $headerSelector;

/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
*/
public function __construct(Configuration $config) {
public function __construct(Configuration $config)
{
$this->client = new Client();
$this->config = $config;
$this->headerSelector = new HeaderSelector();
Expand All @@ -95,7 +74,7 @@ public function getConfig()
* @param string $mws_auth_token The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore. (required)
*
* @throws InvalidArgumentException
* @throws ApiException on non-2xx response
* @throws ApiException on non-2xx response
*
* @return GetAuthorizationCodeResponse
*/
Expand All @@ -116,7 +95,7 @@ public function getAuthorizationCode($selling_partner_id, $developer_id, $mws_au
* @param string $mws_auth_token The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore. (required)
*
* @throws InvalidArgumentException
* @throws ApiException on non-2xx response
* @throws ApiException on non-2xx response
*
* @return array of \ClouSale\AmazonSellingPartnerAPI\Models\Authorization\GetAuthorizationCodeResponse, HTTP status code, HTTP response headers (array of strings)
*/
Expand Down
39 changes: 9 additions & 30 deletions lib/Api/CatalogApi.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
<?php
/**
* CatalogApi
* PHP version 5.
* CatalogApi.
*
* @category Class
*
* @author Swagger Codegen team
*
* @see https://github.com/swagger-api/swagger-codegen
* @author Stefan Neuhaus / ClouSale
*/

/**
Expand All @@ -16,22 +11,10 @@
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
*
* OpenAPI spec version: v0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.20
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

namespace ClouSale\AmazonSellingPartnerAPI\Api;

use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Psr7\Request;
use InvalidArgumentException;
use ClouSale\AmazonSellingPartnerAPI\ApiException;
use ClouSale\AmazonSellingPartnerAPI\Configuration;
use ClouSale\AmazonSellingPartnerAPI\HeaderSelector;
Expand All @@ -40,15 +23,15 @@
use ClouSale\AmazonSellingPartnerAPI\Models\Catalog\ListCatalogCategoriesResponse;
use ClouSale\AmazonSellingPartnerAPI\Models\Catalog\ListCatalogItemsResponse;
use ClouSale\AmazonSellingPartnerAPI\ObjectSerializer;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Psr7\Request;
use InvalidArgumentException;

/**
* CatalogApi Class Doc Comment.
*
* @category Class
*
* @author Swagger Codegen team
*
* @see https://github.com/swagger-api/swagger-codegen
* @author Stefan Neuhaus / ClouSale
*/
class CatalogApi
{
Expand All @@ -69,12 +52,8 @@ class CatalogApi
*/
protected $headerSelector;

/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
*/
public function __construct(Configuration $config) {
public function __construct(Configuration $config)
{
$this->client = new Client();
$this->config = $config;
$this->headerSelector = new HeaderSelector();
Expand Down
Loading

0 comments on commit 4386497

Please sign in to comment.