Skip to content

Instantly share code, notes, and snippets.

@themoxman
Created August 12, 2014 20:06
Show Gist options
  • Select an option

  • Save themoxman/50e50f7eb1b36e60be06 to your computer and use it in GitHub Desktop.

Select an option

Save themoxman/50e50f7eb1b36e60be06 to your computer and use it in GitHub Desktop.

Revisions

  1. themoxman created this gist Aug 12, 2014.
    18 changes: 18 additions & 0 deletions philly.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    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