Download the PHP package hashtages/allegro-api-client-php without Composer
On this page you can find all versions of the php package hashtages/allegro-api-client-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package allegro-api-client-php
Allegro Api PHP Client
Helper model and connector classes for allegro integration.
Parts of the library is automatically generated by the OpenAPI Generator project using swagger definition from allegro:
https://developer.allegro.pl/swagger.yaml
Installation with composer
Api documentation
This package was implemented according to:
https://developer.allegro.pl/documentation/
Usage
OAuth
Implementation OAuth according to https://developer.allegro.pl/auth/
1 Stage: Get code from callback
2 Stage: Get tokens from callback after authorization - e.g. http://uri.where.is.sent.callback/authorization_callback
Make controller under your callback url, allegro will send you tokens after login.
3 Stage: Use received access token in every request
Refresh token
To refresh allegro token you might need get current token from your repository
Code Notice: Best way to use authenticator and AllegroApi classes is Dependency Injection. To define configuration(\AllegroApi\Configuration) you can use factory pattern.
Development
Generate php classes using openapi-generator
ATTENTION!
Please look at commit 070d13ed2d031c8361597aead4071a78b6317ba6 in this repo. Package openapi-generator always generate wrong CategoryParameters.php. You have to fix it every time you regenerate this code.
To generate new clients and models run:
All versions of allegro-api-client-php with dependencies
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^6.2