conviu/allegro-api

This is the Allegro.pl API. You can find more information on https://developer.allegro.pl/about

dev-master 2024-09-20 07:00 UTC

This package is auto-updated.

Last update: 2024-09-20 07:00:43 UTC


README

This is the Allegro.pl API. You can find more information on https://developer.allegro.pl/about.

Installation & Usage

Requirements

PHP 7.2 and later.

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/conviu/allegro-api.git"
    }
  ],
  "require": {
    "conviu/allegro-api": "*@dev"
  }
}

Then run composer install

Your project is free to choose the http client of your choice Please require packages that will provide http client functionality: https://packagist.org/providers/psr/http-client-implementation https://packagist.org/providers/php-http/async-client-implementation https://packagist.org/providers/psr/http-factory-implementation

As an example:

composer require guzzlehttp/guzzle php-http/guzzle7-adapter http-interop/http-factory-guzzle

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

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 = AllegroApi\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new AllegroApi\Api\AdditionalServicesApi(
    // If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
    // This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
    new GuzzleHttp\Client(),
    $config
);
$additional_services_group_request = new \AllegroApi\Model\AdditionalServicesGroupRequest(); // \AllegroApi\Model\AdditionalServicesGroupRequest | Additional service group body

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

API Endpoints

All URIs are relative to https://api.allegro.pl

Models

Authorization

bearer-token-for-user

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://allegro.pl/auth/oauth/authorize
  • Scopes: N/A

bearer-token-for-application

  • Type: OAuth
  • Flow: application
  • Authorization URL: ``
  • Scopes: N/A

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: latest
    • Generator version: 7.6.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen