| 1 | <?php |
||
| 11 | class Search extends Client |
||
| 12 | { |
||
| 13 | public $detail = null; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param $query |
||
| 17 | * @param int $limit |
||
| 18 | * @param array $params |
||
| 19 | * @return array|bool|float|int|string |
||
| 20 | */ |
||
| 21 | public function search($query, $limit = 10, $params = array()) |
||
| 22 | { |
||
| 23 | $params['query'] = urlencode($query); |
||
| 24 | $params['limit'] = (int) $limit; |
||
| 25 | |||
| 26 | return $this->get('search', $params); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function hasMorePages() |
||
| 33 | |||
| 34 | public function getNextPage() |
||
| 38 | |||
| 39 | public function getPreviousPage() |
||
| 43 | |||
| 44 | protected function getPage($direction = 'next') |
||
| 55 | } |
||
| 56 |