PHP code example of amattu2 / golo365-wrapper

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

    

amattu2 / golo365-wrapper example snippets


/**
 * Class Constructor
 *
 * @param  ?string $serial_no reporting device serial number
 * @param  ?string $service Golo365 service ait|aitus
 * @author Alec M.
 * @since  1.0.0
 */
public function __construct(string $serial_no = "", string $service = "aitus")

/**
 * Set or Remove the Device Serial Number
 *
 * @param  ?string $serial_no
 * @return self
 * @since  1.0.0
 */
public function setSerialNo(string $serial_no = "") : self

/**
 * Set or Remove the Report Listing Size Limit
 *
 * @param  ?integer $size
 * @return self
 * @since  1.0.0
 */
public function setListSize(int $size = 0) : self

/**
 * Fetch Diagnostic Scan History by VIN
 *
 * Note:
 * (1) If the serial_no variable is not empty,
 *     it will be used to limit results to that
 *     specific device
 *
 * @param  string $vin VIN to search
 * @param  mixed $page page number to fetch
 * @return Array of diagnostic scan history
 * @throws \TypeError
 * @throws \InvalidArgumentException
 * @since  1.0.0
 */
public function reportListByVIN(string $VIN, $page = "") : array

Array
(
  [0] => Array
  (
    [record_id] => int
    [serial_no] => int
    [date] => Y-m-d H:i:s
    [VIN] => string
    [plate_number] => string
    [url] => string
    [type] => string
    [_raw] => Closure
    [_reportDetail] => Closure
  )

  // ... repeating

)

/**
 * Fetch Diagnostic Scan History by License Plate Number
 *
 * Note:
 * (1) If the serial_no variable is not empty,
 *     it will be used to limit results to that
 *     specific device
 *
 * @param  string $plate_number License Plate # to search
 * @param  mixed $page page number to fetch
 * @return Array of diagnostic scan history
 * @throws \TypeError
 * @throws \InvalidArgumentException
 * @since  1.0.0
 */
public function reportListByPlateNumber(string $plate_number, $page = "") : array

Array
(
  [0] => Array
  (
    [record_id] => int
    [serial_no] => int
    [date] => Y-m-d H:i:s
    [VIN] => string
    [plate_number] => string
    [url] => string
    [type] => string
    [_raw] => Closure
    [_reportDetail] => Closure
  )

  // ... repeating

)

/**
 * Fetch Diagnostic Scan History by Serial Number
 *
 * @param mixed $page page number to fetch
 */
public function reportList($page = "") : array

Array
(
  [0] => Array
  (
    [record_id] => int
    [serial_no] => int
    [date] => Y-m-d H:i:s
    [VIN] => string
    [plate_number] => string
    [url] => string
    [type] => string
    [_raw] => Closure
    [_reportDetail] => Closure
  )

  // ... repeating

)

/**
 * Fetch additional details about a diagnostic scan
 *
 * @param  int $record_id
 * @param  string $type
 * @return array
 * @throws \TypeError
 * @throws \InvalidArgumentException
 * @since  1.0.0
 */
public function reportDetail(int $record_id, string $type) : array

Array
(
  [software_version] => string
  [software_package] => string
  [system_list] => Array
  (
    [0] => Array
    (
        [system_uid] => padded int
        [system] => string
        [name_id] => int
        [is_new_sys] => int
    )
  )
  [_raw] => Closure Object
)

/**
 * Fetch a License Plate by the VIN Number
 *
 * @param  string $VIN the vehicle VIN number to search a plate for
 * @return array
 * @throws \InvalidArgumentException
 * @since  1.0.0
 */
public function getPlateByVIN(string $VIN) : array

Array
(
  [VIN] => string
  [plate_number] => string
  [_raw] => Closure Object
)

/**
 * Fetch the VIN by License Plate
 *
 * @param  string $plate_number License Plate # to search
 * @return array
 * @throws TypeError
 * @throws InvalidArgumentException
 * @since  1.0.0
 */
public function getVINByPlateNumber(string $plate_number) : array

Array
(
  [VIN] => string
  [plate_number] => string
  [_raw] => Closure Object
)