Skip to content

Commit

Permalink
Allow users to fetch dubizzle makes.
Browse files Browse the repository at this point in the history
  • Loading branch information
b4oshany committed Nov 14, 2015
1 parent 716bb9a commit f90a553
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Dubizzle/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,21 @@ class Category{



public function get_models($key = null){
$model_url = "https://dubai.dubizzle.com/classified/get_category_models/"
.$key."/";
public function get_models($key){
$model_url = "https://dubai.dubizzle.com/classified/get_category_models/$key/";
$data = $this->get_data($model_url, ["site" => 2, "s" => "MT"]);
$this->parseJSON($data);
return $this->models;
}

public function get_makes($key = 140){
$make_url = "https://dubai.dubizzle.com/classified/get_category_models/$key/";
$data = $this->get_data($make_url, ["sitre" => 2, "s" => "MT"]);
$this->parseJSON($data);
return $this->models;

}

private function parseHTML(){
# Clean HTML.
$purifier = new HTMLPurifier();
Expand Down

0 comments on commit f90a553

Please sign in to comment.