9orky/allegro-api

dev-main 2022-02-16 14:12 UTC

This package is not auto-updated.

Last update: 2024-11-22 01:44:20 UTC


README

https://developer.allegro.pl/about Documentation is generated from this OpenAPI 3.0 specification file.

This PHP package is automatically generated by the Swagger Codegen project:

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\AdditionalServicesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$body = new \Swagger\Client\Model\AdditionalServicesGroupRequest(); // \Swagger\Client\Model\AdditionalServicesGroupRequest | Additional service group body

try {
    $result = $apiInstance->createAdditionalServicesGroupUsingPOST($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdditionalServicesApi->createAdditionalServicesGroupUsingPOST: ', $e->getMessage(), PHP_EOL;
}

// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\AdditionalServicesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$group_id = "group_id_example"; // string | Additional Service Group ID.

try {
    $result = $apiInstance->getAdditionalServicesGroupUsingGET($group_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdditionalServicesApi->getAdditionalServicesGroupUsingGET: ', $e->getMessage(), PHP_EOL;
}

// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\AdditionalServicesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$offset = 0; // int | The offset of elements in the response.
$limit = 100; // int | The limit of elements in the response.

try {
    $result = $apiInstance->getListOfAdditionalServicesDefinitionsUsingGET($offset, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdditionalServicesApi->getListOfAdditionalServicesDefinitionsUsingGET: ', $e->getMessage(), PHP_EOL;
}

// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\AdditionalServicesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$offset = 0; // int | The offset of elements in the response.
$limit = 100; // int | The limit of elements in the response.

try {
    $result = $apiInstance->getListOfAdditionalServicesGroupsUsingGET($offset, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdditionalServicesApi->getListOfAdditionalServicesGroupsUsingGET: ', $e->getMessage(), PHP_EOL;
}

// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\AdditionalServicesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$body = new \Swagger\Client\Model\AdditionalServicesGroupRequest(); // \Swagger\Client\Model\AdditionalServicesGroupRequest | Additional service group body
$group_id = "group_id_example"; // string | Additional service group ID.

try {
    $result = $apiInstance->modifyAdditionalServicesGroupUsingPUT($body, $group_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdditionalServicesApi->modifyAdditionalServicesGroupUsingPUT: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

All URIs are relative to https://api.{environment}

Documentation For Models

Documentation For Authorization

bearer-token-for-application

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:

bearer-token-for-user

Author