2017 © Pedro Peláez
 

library php-client

image

swappycom/php-client

  • Thursday, December 1, 2016
  • by Korri
  • Repository
  • 1 Watchers
  • 0 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

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)

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

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

The Versions

01/12 2016

dev-master

9999999-dev http://www.swappy.com/

  Sources   Download

Apache V2

The Requires

  • php >=5.4
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php swagger sdk

01/12 2016

0.1.1

0.1.1.0 http://www.swappy.com/

  Sources   Download

Apache V2

The Requires

  • php >=5.4
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php swagger sdk

22/11 2016

0.1.0

0.1.0.0 http://www.swappy.com/

  Sources   Download

Apache V2

The Requires

  • php >=5.4
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php swagger sdk