Retrieves the Vehicles that belong to a specific partID
<?php require_once('libraries/happpi/LoadAll.php'); // points to the LoadAll.php file for loading the library. // once the library is required, you can now use one of the main "interaction" classes. // These interaction classes contain methods that get information from our REST API and // converts them to PHP objects for you to use. $Vehicle = new CurtVehicle(); // create new vehicle object to gain access to its functions. echo "<h2>Vehicles that Part #: 11000 belongs to.</h2>"; $listOfVehicles = $Vehicle->getPartVehicles(11000); // call getPartVehicles to get an array of CurtVehicles foreach($listOfVehicles as $vehicleObj){ // step through the list of vehicles echo $vehicleObj->getVehicleID(); // display each vehicle ID that has the part 11000 echo "<br />"; } ?>