def get_event_photos(self, event_id): """ Get photos for the identified event. Parameters ---------- event_id ID of the event to get photos for. Returns ------- List of ``pythonkc_meetups.types.MeetupPhoto``. Exceptions ---------- * PythonKCMeetupsBadJson * PythonKCMeetupsBadResponse * PythonKCMeetupsMeetupDown * PythonKCMeetupsNotJson * PythonKCMeetupsRateLimitExceeded """ query = urllib.urlencode({'key': self._api_key, 'event_id': event_id}) url = '{0}?{1}'.format(PHOTOS_URL, query) data = self._http_get_json(url) photos = data['results'] return [parse_photo(photo) for photo in photos]
def get_events_photos(self, event_ids): """ Get photos for the identified events. Parameters ---------- event_ids List of IDs of events to get photos for. Returns ------- List of tuples of (event id, ``pythonkc_meetups.types.MeetupPhoto``). Exceptions ---------- * PythonKCMeetupsBadJson * PythonKCMeetupsBadResponse * PythonKCMeetupsMeetupDown * PythonKCMeetupsNotJson * PythonKCMeetupsRateLimitExceeded """ query = urllib.urlencode({'key': self._api_key, 'event_id': ','.join(event_ids)}) url = '{0}?{1}'.format(PHOTOS_URL, query) data = self._http_get_json(url) photos = data['results'] return [(photo['photo_album']['event_id'], parse_photo(photo)) for photo in photos]
def get_events_photos(self, event_ids): """ Get photos for the identified events. Parameters ---------- event_ids List of IDs of events to get photos for. Returns ------- List of tuples of (event id, ``pythonkc_meetups.types.MeetupPhoto``). Exceptions ---------- * PythonKCMeetupsBadJson * PythonKCMeetupsBadResponse * PythonKCMeetupsMeetupDown * PythonKCMeetupsNotJson * PythonKCMeetupsRateLimitExceeded """ query = urllib.urlencode({ 'key': self._api_key, 'event_id': ','.join(event_ids) }) url = '{0}?{1}'.format(PHOTOS_URL, query) data = self._http_get_json(url) photos = data['results'] return [(photo['photo_album']['event_id'], parse_photo(photo)) for photo in photos]