PHP code example of isometriks / galves-api

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

    

isometriks / galves-api example snippets


use Galves\Api\Client;

$galves = new Client();

// Login to get authToken
$galves->login([
    'username' => 'some_username',
    'acctNo' => '123456',
]);

// Get years
$years = $galves->getYears(); // [1998, 1999, 2000, 2001, ...]

// Get Makes
$makes = $galves->getMakes(); // ['BMW', 'Ford', ...]

// Get Models
$models = $galves->getModels(1990, 'BMW'); // ['3 Series', '4 Series', ...]

// Get Styles
$styles = $galves->getStyles(1990, 'BMW', '3 Series'); // ['guid' => 'style', 'guid2' => 'style2']

// Get Vehicle
$vehicle = $galves->getVehicle($guid);

// Get Mileage Adjustment
$adjust = $galves->getMileageAdjustment($guid, 123456); // (int)-450