PHP code example of mnastalski / baselinker-php

1. Go to this page and download the library: Download mnastalski/baselinker-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mnastalski / baselinker-php example snippets


use Baselinker\Baselinker;

$baselinker = new Baselinker([
    'token' => '...',
]);

$response = $baselinker->orders()->getOrders([
    'date_from' => 1609506671,
    'get_unconfirmed_orders' => true,
]);

$response->toArray();

/*
    [
        'status' => 'SUCCESS',
        'orders' => [
            [
                    'order_id' => '123456',
                    ...
            ],
            ...
        ]
    ]
*/

$orders = $response->getParameter('orders');

/*
    [
        [
                'order_id' => '123456',
                ...
        ],
        ...
    ]
*/
shell script
composer