| 1 | <?php |
||
| 10 | class MeetupApiService |
||
| 11 | { |
||
| 12 | private $httpClient; |
||
| 13 | private $key; |
||
| 14 | |||
| 15 | const API_URL = 'https://api.meetup.com/2/rsvps?event_id=%s&key=%s'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * MeetupApiService constructor. |
||
| 19 | * |
||
| 20 | * @param $key |
||
| 21 | */ |
||
| 22 | public function __construct($key) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * If something goes wrong on the meetup.com API |
||
| 30 | * we want to continue and render our page anyway. |
||
| 31 | * |
||
| 32 | * @param $eventUrl URL from meetup.com web site |
||
| 33 | * |
||
| 34 | * @return array |
||
| 35 | */ |
||
| 36 | public function getAttendees($eventUrl) |
||
| 57 | } |
||
| 58 |