Skip to content

Commit

Permalink
Renamed parameter 2 to sc
Browse files Browse the repository at this point in the history
Renamed unused method to better reflect it usage
  • Loading branch information
Park0 authored Oct 18, 2023
1 parent 17b6d99 commit b1173df
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bridges/MarktplaatsBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class MarktplaatsBridge extends BridgeAbstract
'required' => false,
'title' => 'Include the raw data behind the content',
],
'2' => [
'sc' => [
'name' => 'Sub category',
'type' => 'number',
'required' => false,
Expand Down Expand Up @@ -132,8 +132,8 @@ public function collectData()
if (!is_null($this->getInput('c'))) {
$query .= '&l1CategoryId=' . $this->getInput('c');
}
if (!is_null($this->getInput('2'))) {
$query .= '&l2CategoryId=' . $this->getInput('2');
if (!is_null($this->getInput('sc'))) {
$query .= '&l2CategoryId=' . $this->getInput('sc');
}
$url = 'https://www.marktplaats.nl/lrp/api/search?query=' . urlencode($this->getInput('q')) . $query;
$jsonString = getSimpleHTMLDOM($url);
Expand Down Expand Up @@ -186,7 +186,10 @@ public function getName()
return parent::getName();
}

public static function getCategories()
/**
* Method can be used to scrape the subcategories from marktplaats
*/
public static function scrapeSubCategories()
{
$ids = [
'1',
Expand Down

0 comments on commit b1173df

Please sign in to comment.