1 | <?php |
||
17 | final class EventListCrawler extends AbstractCrawler implements EventListCrawlerInterface |
||
18 | { |
||
19 | private const BASE_URL = 'https://www.last.fm/events'; |
||
20 | |||
21 | /** |
||
22 | * {@inheritdoc} |
||
23 | */ |
||
24 | public function getEvents(GeoLocation $location, $radius = 100, int $page = 1): array |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function getPages(GeoLocation $location, $radius = 100): int |
||
60 | |||
61 | /** |
||
62 | * @param Crawler $node |
||
63 | * @param DateTime $datetime |
||
64 | * |
||
65 | * @return array |
||
66 | */ |
||
67 | private function crawlEventListGroup(Crawler $node, DateTime $datetime): array |
||
75 | |||
76 | /** |
||
77 | * @param GeoLocation $location |
||
78 | * @param int $radius |
||
79 | * @param int $page |
||
80 | * |
||
81 | * @return Crawler|null |
||
82 | */ |
||
83 | private function crawlUrl(GeoLocation $location, int $radius, int $page = 1): ?Crawler |
||
94 | } |
||
95 |