Skip to content

Instantly share code, notes, and snippets.

@alobato
Forked from grantmichaels/Reddit_API.rb
Created January 6, 2011 22:38
Show Gist options
  • Save alobato/768747 to your computer and use it in GitHub Desktop.
Save alobato/768747 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