Skip to content

Commit 637121c

Browse files
committed
Merge pull request #2 from pythonkc/master
Pull changes from pythonkc fork so that we can transfer the main (pre-forked) repo to the group's account
2 parents 61cd072 + 24f19b3 commit 637121c

File tree

5 files changed

+33
-10
lines changed

5 files changed

+33
-10
lines changed

docs/changelog.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@ Changelog
44
Releases
55
--------
66

7-
* `Release 0.0.2 - TBD`_
7+
* `Release 0.0.3 - August 13, 2011`_
8+
* `Release 0.0.2 - August 13, 2011`_
89
* `Release 0.0.1 - August 7, 2011`_
910

10-
Release 0.0.2 - TBD
11-
-------------------
11+
Release 0.0.3 - August 13, 2011
12+
-------------------------------
13+
14+
* Added attendees to past events by default.
15+
16+
Release 0.0.2 - August 13, 2011
17+
-------------------------------
1218

1319
* Added ``PythonKCMeetups.get_event_attendees``
1420

pythonkc_meetups/client.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,18 @@ def get_past_events(self):
9595
9696
"""
9797

98+
def get_attendees(event):
99+
return (self.get_event_attendees(event['id'])
100+
if 'id' in event else None)
101+
98102
query = urllib.urlencode({'key': self._api_key,
99103
'group_urlname': GROUP_URLNAME,
100104
'status': 'past',
101105
'desc': 'true'})
102106
url = '{0}?{1}'.format(EVENTS_URL, query)
103107
data = self._http_get_json(url)
104108
events = data['results']
105-
return [parse_event(event) for event in events]
109+
return [parse_event(event, get_attendees(event)) for event in events]
106110

107111
def get_event_attendees(self, event_id):
108112
"""

pythonkc_meetups/parsers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import datetime
1616

1717

18-
def parse_event(data):
18+
def parse_event(data, attendees=None):
1919
"""
2020
Parse a ``MeetupEvent`` from the given response data.
2121
@@ -35,7 +35,8 @@ def parse_event(data):
3535
maybe_rsvp_count=data.get('maybe_rsvp_count', None),
3636
event_url=data.get('event_url', None),
3737
photo_url=data.get('photo_url', None),
38-
venue=parse_venue(data.get('venue', None))
38+
venue=parse_venue(data.get('venue', None)),
39+
attendees=attendees
3940
)
4041

4142

pythonkc_meetups/types.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
URL of the Meetup event page.
3131
photo_url
3232
URL of the event photo.
33+
attendees
34+
List of ``MeetupMember`` that attended this event if it was in the past.
3335
3436
MeetupVenue
3537
-----------
@@ -84,7 +86,8 @@
8486

8587
MeetupEvent = namedtuple('MeetupEvent',
8688
['id', 'name', 'description', 'time', 'status', 'venue',
87-
'yes_rsvp_count', 'maybe_rsvp_count', 'event_url', 'photo_url'])
89+
'yes_rsvp_count', 'maybe_rsvp_count', 'event_url', 'photo_url',
90+
'attendees'])
8891

8992
MeetupVenue = namedtuple('MeetupVenue',
9093
['id', 'name', 'address_1', 'address_2', 'address_3', 'city', 'state',

setup.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,22 @@
77

88
setup(
99
name='pythonkc-meetups',
10-
version='0.0.2',
10+
version='0.0.3',
1111
description='Provides PythonKC Meetup.com events.',
1212
license='MIT',
13-
url='https://github.com/estebistec/pythonkc-meetups',
13+
url='https://github.com/pythonkc/pythonkc-meetups',
1414
packages=find_packages(),
1515
install_requires=['distribute>=0.6.14', 'httplib2>=0.7.1',
1616
'mimeparse>=0.1.3', 'python-dateutil>=1.5,<2'],
1717
author='Steven Cummings',
18-
author_email='estebistec@gmail.com'
18+
author_email='estebistec@gmail.com',
19+
classifiers=[
20+
'Development Status :: 4 - Beta',
21+
'License :: OSI Approved :: MIT License',
22+
'Programming Language :: Python',
23+
'Programming Language :: Python :: 2.6',
24+
'Programming Language :: Python :: 2.7',
25+
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
26+
'Topic :: Software Development :: Libraries'
27+
]
1928
)

0 commit comments

Comments
 (0)