Skip to content

Instantly share code, notes, and snippets.

@grantmichaels
Forked from jagira/Reddit_API.rb
Created June 26, 2010 15:40
Show Gist options
  • Save grantmichaels/454138 to your computer and use it in GitHub Desktop.
Save grantmichaels/454138 to your computer and use it in GitHub Desktop.
require 'net/http'
require 'uri'
require 'rubygems'
require 'json'
reddit_api_url = "http://www.reddit.com/.json"
resp = Net::HTTP.get_response(URI.parse(reddit_api_url))
data = resp.body
result = JSON.parse(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment