Skip to content

Instantly share code, notes, and snippets.

@jqr
Created May 6, 2009 23:50
Show Gist options
  • Save jqr/107820 to your computer and use it in GitHub Desktop.
Save jqr/107820 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'httparty'
zip_code = 46220
theater_list = HTTParty.get("http://new.api.movies.yahoo.com/v2/listTheatersByPostalCode?pcode=#{zip_code}&count=20&yprop=msapi")
theater_list['TheaterList']['Theater'].each do |theater|
puts "=== " + theater['Name'] + " " + "=" * 50
theater['MovieList']['Movie'].each do |movie|
puts " " + movie['movie:Title']
puts " " + movie['Shows']['Time'].collect { |t| Time.parse(t).strftime('%I:%M') }.join(', ')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment