masnathan/aliexpress-affiliate-php

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Aliexpress Affiliate Program API wrapper

0.0.1 2017-07-21 17:09 UTC

This package is auto-updated.

Last update: 2021-05-16 09:01:35 UTC


README

Usage

<?php

$client = new \MASNathan\AliExpress\Client(12345);
$aliExpress = new MASNathan\AliExpress\AliExpress($client);

$request = new \MASNathan\AliExpress\Request\ListPromotionProductRequest();

$request
    ->setFields([
        'totalResults',
        'productId',
        'productTitle',
        'productUrl',
        'imageUrl',
        'originalPrice',
        'salePrice',
        //'discount',
        'evaluateScore',
        'commission',
        'commissionRate',
        '30daysCommission',
        'volume',
        'packageType',
        'lotNum',
        'validTime',
        'localPrice',
        //'allImageUrls',
    ])
    ->setKeywords('spinner')
    ->setPageSize(1)
    ->setHighQualityItems(true);

$result = $aliExpress->request($request);

dump($result['products'][0]);