masnathan/aliexpress-affiliate-php

This package is abandoned and no longer maintained. No replacement package was suggested.

Aliexpress Affiliate Program API wrapper

0.0.1 2017-07-21 17:09 UTC

This package is auto-updated.

Last update: 2023-06-16 13:39:57 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]);