Download the PHP package oxy-coach/aliexpress-api-client-local without Composer
On this page you can find all versions of the php package oxy-coach/aliexpress-api-client-local. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download oxy-coach/aliexpress-api-client-local
More information about oxy-coach/aliexpress-api-client-local
Files in oxy-coach/aliexpress-api-client-local
Package aliexpress-api-client-local
Short Description API client implementation for new AliExpress API version.
License MIT
Homepage http://www.retailcrm.pro/
Informations about the package aliexpress-api-client-local
AliExpress API client for new API version
API client implementation for AliExpress local API.
Usage
- This library uses
php-http/httplug
under the hood. If you don't want to bother with details, just install library and it's dependencies via Composer:
Details about those third-party libraries and why you need to install them can be found here.
-
Instantiate client using
ClientFactory
: -
Create and fill request data. All requests and responses use the same naming. Requests live under
RetailCrm\Model\Request
namespace, and responses can be found in theRetailCrm\Model\Response
namespace. For example, you can instantiate an order list request with this code: - Send request using
Client::sendRequest
like this:
Each request uses provided jwt
token for authorization.
Friendly note. Use response type annotations. Both client methods which returns responses actually returns ResponseInterface
(not the PSR one). Actual response type will be determined by the request model. Your IDE will not recognize any response options unless you put a proper type annotation for the response variable.
Customization
This library uses Container pattern under the hood. You can pass additional dependencies using ContainerBuilder
. For example:
Logger should implement Psr\Log\LoggerInterface
(PSR-3), HTTP client should implement Psr\Http\TopClient\TopClientInterface
(PSR-18), HTTP objects must be compliant to PSR-7.
You can use your own container if you want to - it must be compliant to PSR-11. This is strongly discouraged because it'll be much easier to just integrate library with your own application, and your own DI system.
The simplest example of client initialization without using ClientFactory
looks like this:
In fact, ClientFactory
works just like this under the hood.
All versions of aliexpress-api-client-local with dependencies
ext-curl Version *
ext-json Version *
psr/log Version ^1.1
doctrine/cache Version ^1.10
jms/serializer Version ^3.9
symfony/validator Version ^4.1|^5.1
doctrine/annotations Version ^1.10
psr/http-client Version ^1.0
psr/http-message Version ^1.0
php-http/client-implementation Version ^1.0
php-http/httplug Version ^2.2
php-http/message-factory Version ^1.0
php-http/discovery Version ^1.12
php-http/multipart-stream-builder Version ^1.1
symfony/expression-language Version ^4.1|^5.1
psr/cache Version ^1.0
cache/array-adapter Version ^1.0