Download the PHP package bbcreation/allegro-api without Composer
On this page you can find all versions of the php package bbcreation/allegro-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bbcreation/allegro-api
More information about bbcreation/allegro-api
Files in bbcreation/allegro-api
Informations about the package allegro-api
PHP Allegro API
Allegro API client library, written with PHP.
Requirements
- PHP >= 5.6 || PHP >= 7.0
- HTTP client
Features
- REST and SOAP WebApi
- Sandbox support
- Auto-complete
- PSR compatible
Installation
Via Composer:
Library is build on top of HTTPlug, we need to install HTTP client.
Developer Documentation
https://developer.allegro.pl/documentation/
Usage of client
Authentication with OAuth
We have $token->access_token
for authenticate all our future requests.
See example.
Client credentials flow
In order to access to public available resources such as categories or offers use client credentials flow:
Device flow
To use browserless device flow use getAuthUserCode()
method to get user_code
and verification uri:
and then after user authenticate device you can fetch acces_token
:
Making Requests
Making SOAP Requests
Sandbox
In order to use Sandbox environment just set Credentials
property $sandbox
to true.
Cache usage
Use any PSR-6 compatible library to cache requests.
In this example we use Symfony Cache, to install just run:
See example.
Logger
Use any PSR-3 logger library for example Monolog, to install just run:
See example.
Customization
Thanks to HTTPlug library can be customized easily, for example to set language use HeaderDefaultsPlugin plugin:
See full list of available HTTPlug plugins.
TO-DO
- Tests
- Documentation
Contributing
Feel free to contribute.
Credits
API client build on top of HTTPlug and inspired by KnpLabs GitHub client.
Soap types generated by wsdl2phpgenerator library.
All versions of allegro-api with dependencies
psr/http-message Version ^1.0
psr/cache Version ^1.0
php-http/httplug Version ^1.1
php-http/discovery Version ^1.0
php-http/client-common Version ^1.6
ramsey/uuid Version ^3.0