public function getRoundDrivers($year, $round) { $query = new ErgastQuery(); $query->setDataType(ApiTypes::$DRIVER); $query->specifyYear($year); $query->specifyRound($round); $response = $this->makeRequest($query); return $this->formatDriverCollection($response->DriverTable->Driver); }
/** * @param $year * @param $round * @return mixed */ public function getRoundLaps($year, $round) { $query = new ErgastQuery(); $query->setDataType(ApiTypes::$LAP); $query->specifyYear($year); $query->specifyRound($round); $response = $this->makeRequest($query); return $this->formatLapsCollection($response->RaceTable->Race); }
/** * @param $year * @param $round * @return mixed */ public function getRound($year, $round) { //test $query = new ErgastQuery(); $query->setDataType(ApiTypes::$ROUND); $query->specifyYear($year); $query->specifyRound($round); $results = $this->makeRequest($query); return $this->formatRound($results->RaceTable->Race); }
public function getSeason($year) { $query = new ErgastQuery(); $query->specifyYear($year); $response = $this->makeRequest($query); }