Skip to content

Instantly share code, notes, and snippets.

@capoferro
Created April 14, 2011 19:59
Show Gist options
  • Save capoferro/920343 to your computer and use it in GitHub Desktop.
Save capoferro/920343 to your computer and use it in GitHub Desktop.
require 'rest_client'
require 'uri'
require 'pp'
require 'addressable/uri'
key = 'w9fvwkgv2yj2taw9xjx5qcqz'
uri = Addressable::URI.parse('http://api.rottentomatoes.com/api/public/v1.0/movies.json')
uri.query_values = {q: 'M. Night Shyamalan', apikey: key}
pp RestClient.get(uri.to_s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment