PHP code example of vt-parhomenko / olx-ua-api-sdk

1. Go to this page and download the library: Download vt-parhomenko/olx-ua-api-sdk 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/ */

    

vt-parhomenko / olx-ua-api-sdk example snippets

 


use Parhomenko\Olx\OlxFactory;

$olx = OlxFactory::get( "ua", [
    "client_id"=> 'client_id',
    "client_secret"=> 'client_secret',
    'access_token' => 'access_token',
    'refresh_token' => 'refresh_token',
    'token_type' => 'token_type',
    'scope' => 'scope'
]);

$advert_data = [
//advert data
];

// create new advert
$olx->adverts()->create( $advert_data );