Created
April 10, 2017 17:39
-
-
Save davibennun/9340ddccfcbb93e9470f989a75e717ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RequestItemsFromStore { | |
public function __construct(){ | |
$this->eBayService = new DavidSadler\Services\ShoppingService; | |
} | |
public function setStore($store){ | |
$this->storeName = $store; | |
} | |
public function getAllItems(){ | |
$totalPages = $this->eBayService->getPageCount($this->storeName); | |
$result = array(); | |
while($page <= $totalPages){ | |
$result[] = $this->getItemsFromPage($page); | |
$page++; | |
} | |
} | |
public function getItemsFromPage($pageNumber){ | |
return $this->eBayService->findItemsIneBayStores($this->storeName, $this->pageNnmber); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment