Fetch RSVPs from Meetup for further processing

I’m running a couple of demos on how and why to use AWS Athena on a Meetup event tonight here at my hometown of Valencia. Before you start arguing about AWS services being closed source, note that Athena is “just” an hosted version of Apache Hive. Like pretty much every AWS service is a hosted version of a famous FOSS project.
One of the demos is about fetching the RSVP list and process it from a JSON source to a basic \t separated text file to be further read by Athena.
First thing is to get your Meetup API key in order to interact with Meetup’s API. Once done, you can proceed using, for example, curl:

$ api_key="b00bf00fefe1234567890"
$ event_id="1234567890"
$ meetup_url="https://api.meetup.com/2/rsvps"
$ curl -o- -s "${meetup_url}?key=${api_key}&event_id=${event_id}&order=name"

There you will receive, in a shiny JSON format, all the informations about the event attendees.
Now a little bit of post processing, as I said, for the purpose of my demo, I’d like to make those datas more human readable, so I’ll process the JSON output with the tool we hate to love, jq:

$ curl -o- -s "${meetup_url}?key=${api_key}&event_id=${event_id}&order=name" |
jq -r '.results[] | select(.response == "yes") | .member.name + "\t" + .member_photo.photo_link + "\t"+ .venue.country + "\t" + .venue.city'

In this perfectly clear set of jq commands (cough cough), we fetch the results[] section, select only entries whose response value is set to yes (coming to the event) and filter out the name, photo link, country and city.

There you go, extract and analyse your Meetup datas the way you like!