This is Swappy's REST API. See below for all available endpoints. This is an alpha version and might still be subject to change
This PHP package is automatically generated by the Swagger Codegen project:
- 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
PHP 5.4.0 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/swappycom/php-client.git"
}
],
"require": {
"swappycom/php-client": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit lib/Tests
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth
Swappy\Configuration::getDefaultConfiguration()->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;
}
?>
All URIs are relative to https://api.swappy.com/
Class | Method | HTTP request | Description |
---|---|---|---|
BulkApi | createBulkJob | POST /v1/bulkjobs | |
BulkApi | getBulkJob | GET /v1/bulkjobs/{id} | |
BulkApi | getBulkJobResult | GET /v1/bulkjobs/{id}/results | |
DataApi | getCategories | GET /v1/categories | |
DataApi | getCategory | GET /v1/categories/{id} | |
DataApi | getDurations | GET /v1/durations | |
DataApi | getOptions | GET /v1/options | |
DataApi | getShippingMethods | GET /v1/shippingmethods | |
MiscApi | getSoftwareVersion | GET /v1/version | |
OauthApi | getMe | GET /v1/me | |
OauthApi | getMyAddresses | GET /v1/me/addresses | |
OauthApi | oauth2AuthorizeGet | GET /oauth2/authorize | |
OauthApi | oauth2TokenPost | POST /oauth2/token | |
ProductsApi | createProduct | POST /v1/products | |
ProductsApi | endProduct | DELETE /v1/products/{id} | |
ProductsApi | getProduct | GET /v1/products/{id} | |
ProductsApi | updateProduct | PATCH /v1/products/{id} | |
ProductsApi | uploadPicture | POST /v1/pictures |
- Address
- BulkJob
- BulkJobResult
- Category
- Delivery
- DeliveryType
- Duration
- Error
- FieldError
- InlineResponse200
- InlineResponse2001
- Live
- Member
- Option
- Payment
- Product
- ProductBulkResponse
- ProductEstimate
- ProductImage
- ProductOffer
- ProductTaxes
- ShippingMethod
- ShortAddress
- ShortMember
- ShortProduct
- ShortProductOffer
- TempImage
- ValidationError
- 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