Skip to content

Instantly share code, notes, and snippets.

@themoxman
Created August 12, 2014 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save themoxman/50e50f7eb1b36e60be06 to your computer and use it in GitHub Desktop.
Save themoxman/50e50f7eb1b36e60be06 to your computer and use it in GitHub Desktop.
require "json"
require "nokogiri"
require "open-uri"
require "pry"
require "httparty"
response = HTTParty.get("http://api.meetup.com/2/rsvps?event_id=195138082&order=event&rsvp=yes&desc=false&offset=0&photo-host=public&format=json&page=500&fields=&sig_id=38456672&sig=c4193d8a8fa47590c330f861d061cc6bf3d0d7b0")
thing = response["results"].inject({}) do |memo, result|
first_name, last_name = result["member"]["name"].split(" ")
memo[last_name] = [first_name, result["member_photo"]["thumb_link"]]
memo
end.sort_by { |key, value| key.to_s }
require "pry"
binding.pry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment