Skip to content

Commit

Permalink
Merge pull request #8 from liangshiqing/master
Browse files Browse the repository at this point in the history
New feature: get car models by engine code
  • Loading branch information
yeyanchao authored May 28, 2020
2 parents 3c68264 + 0cf7f9b commit dd7b654
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/CarModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,20 @@ public function __construct($client = null, $brandId = null, $subBrandId = null,
*
* (可选参数:yearId,capacityId)
*
* @param integer $yearId 年款Id
* @param integer $yearId 年款Id
* @param integer $displacement 排量Id
* @param integer $engineCodeId 发动机型号Id
* @param string $year_order 按年款的排序类型("ASC":正序;"DESC":倒序;默认为倒序,先显示最新的年款)
* @param integer $carType 车型库类型
* @return array carModels list
*/
public function getModels($yearId = null, $displacement = null, $year_order = null, $carType = 1)
public function getModels($yearId = null, $displacement = null, $engineCodeId = null, $year_order = null, $carType = 1)
{
if($yearId === '') $yearId = null;
if ($yearId === '') $yearId = null;
if ($displacement === '') $displacement = null;
if ($engineCodeId === '') $engineCodeId = null;

if($displacement === '') $displacement = null;
return $this->call('', ['year_id' => $yearId, 'displacement_id' => $displacement, 'year_order' => $year_order, 'car_type' => $carType]);
return $this->call('', ['year_id' => $yearId, 'displacement_id' => $displacement, 'engine_code_id' => $engineCodeId, 'year_order' => $year_order, 'car_type' => $carType]);
}

/**
Expand Down

0 comments on commit dd7b654

Please sign in to comment.