SwaggerClient-php
This is Swappy's REST API. See below for all available endpoints. This is an alpha version and might still be subject to change, (*1)
This PHP package is automatically generated by the Swagger Codegen project:, (*2)
- API version: 0.1.1
- Package version: 0.1.0
- Build date: 2016-12-01T11:45:54.427-05:00
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
Requirements
PHP 5.4.0 and later, (*3)
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:, (*4)
{
"repositories": [
{
"type": "git",
"url": "https://github.com/swappycom/php-client.git"
}
],
"require": {
"swappycom/php-client": "*@dev"
}
}
Then run composer install
, (*5)
Manual Installation
Download the files and include autoload.php
:, (*6)
require_once('/path/to/SwaggerClient-php/autoload.php');
Tests
To run the unit tests:, (*7)
composer install
./vendor/bin/phpunit lib/Tests
Getting Started
Please follow the installation procedure and then run the following:, (*8)
setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swappy\Api\BulkApi();
$body = array(new Product()); // \Swappy\Api\Model\Product[] | Product list to be uploaded
$language = "language_example"; // string | Language for the response
try {
$result = $api_instance->createBulkJob($body, $language);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BulkApi->createBulkJob: ', $e->getMessage(), PHP_EOL;
}
?>
Documentation for API Endpoints
All URIs are relative to https://api.swappy.com/, (*9)
Documentation For Models
Documentation For Authorization
oauth
-
Type: OAuth
-
Flow: implicit
-
Authorization URL: https://api.swappy.com/oauth2/authorize
-
Scopes:
-
buy: Manage your purchases
-
sell: Create and manage your products
-
email: View you email address
-
addresses: Manage your postal adresses
Author