Download the PHP package retailcrm/aliexpress-top-client without Composer

On this page you can find all versions of the php package retailcrm/aliexpress-top-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package aliexpress-top-client

Build Status Coverage Latest stable PHP from Packagist

AliExpress TOP API client

API client implementation for AliExpress TOP.

Usage

  1. 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.

  1. Instantiate client using TopClientFactory:

  2. Create and fill request data. All requests and responses use the same naming: part of the namespace is the first word in the request name, and everything else is in the request DTO class name. Requests live under RetailCrm\Model\Request namespace, and responses can be found in the RetailCrm\Model\Response namespace. Let's use taobao.httpdns.get request as an example. It's first word is the taobao, so, this request can be found under RetailCrm\Model\Request\Taobao namespace, and it's class name is HttpDnsGetRequest. You can instantiate it with this code:

  3. Send request using TopClient::sendRequest or TopClient::sendAuthenticatedRequest (you can't send authenticated request using client without authenticator). taobao.httpdns.get can be sent like this:

This particular request doesn't require authorization, so, it can be sent via TopClient::sendRequest method. For any other requests which require authorization you must use TopClient::sendAuthenticatedRequest method (an example of such request would be aliexpress.solution.seller.category.tree.query, which class FQN is \RetailCrm\Model\Request\AliExpress\SolutionSellerCategoryTreeQuery).

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 TopClientFactory looks like this:

In fact, TopClientFactory works just like this under the hood.


All versions of aliexpress-top-client with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3.0
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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package retailcrm/aliexpress-top-client contains the following files

Loading the files please wait ....