PHP code example of indielab / autoscout24

1. Go to this page and download the library: Download indielab/autoscout24 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/ */

    

indielab / autoscout24 example snippets


// setup client object
$client = new Client($cuid, $memberId);

// generate query object
$query = new VehicleQuery();
$query->setClient($client);
foreach ($cars->find() as $car) {
    $car->getTypeNameFull();
}

$client = new Client($cuid, $memberId);
$cars = (new VehicleQuery())->setClient($client)->find();
foreach ($cars as $car) {
    $car->getId();
}

$client = new Client($cuid, $memberId);
$cars = (new VehicleQuery())->setClient($client)->findAll();

$client = new Client($cuid, $memberId);
$car = (new VehicleQuery())->setClient($client)->findOne($carId);

$client = new Client($cuid, $memberId);
$cars = (new VehicleQuery())->setClient($client)->setVehicleSorting('price_desc')->find();

$client = new Clien($cuid, $memberId);
$data = (new MetaQuery())->setClient($client)->findPkw();

foreach ($data as $meta) {
    var_dump($meta->getParameterName(), $meta->getDescription());
}

$meta = (new MetaQuery())->setClient($this->client)->findPkw()->filter('sort');