databasically / kcruby

The KC Ruby Group
http://kcruby.org
2 stars 4 forks source link

We have more than five members #2

Open darrencauthon opened 10 years ago

darrencauthon commented 10 years ago

the kansas city ruby meetup group kansas city mo - meetup-1

darrencauthon commented 10 years ago

Hmmm... this seems to be a URL that returns the json of all our users:

http://api.meetup.com/members.json/?group_urlname=kcruby&key=38a2a70114e565b3c155d919384a12

othatbrian commented 10 years ago

It turns out that only returns 200 members. The MeetUp API restricts you to 200 results per request and generally 200 req/hr (although that can change). Buried in here is the number of members:

http://api.meetup.com/2/groups?radius=25.0&order=id&group_urlname=kcruby&desc=false&offset=0&format=json&page=20&fields=&sig_id=11824281&sig=48b2206b2a1c5ab5a3d5ce9106325fcb887b182b

othatbrian commented 10 years ago

It looks like kcruby.org is just becoming a custom front end for MeetUp.com/kcruby, though...

darrencauthon commented 10 years ago

@othatbrian, ah, you bring up a good point. I took a peak at the API docs (http://www.meetup.com/meetup_api/docs/2/members/) and didn't find any way to get past the 200 limit, but their demo api query page provided the answer (http://www.meetup.com/meetup_api/console/?path=/2/members&member_id=self#browser).

So it looks like we have two options for getting the count... the group lookup query above. The link below can also be used to get the number, but someone would have to page through the results with the "offset" URL parameter.

http://api.meetup.com/2/members.json/?group_urlname=kcruby&key=38a2a70114e565b3c155d919384a12&offset=1

I'd opt for Brian's solution to get the number, but... I wonder if the list of members on our Meetup would be useful for any other enhancements to this application. Hmmmmmmmmmm

darrencauthon commented 10 years ago

It might look like our website is a front-end to Meetup, but... who knows how things will turn out in the future? Maybe some further enhancements to the site might change that?

:smiley: