Skip to content

Instantly share code, notes, and snippets.

@Busta117
Created November 12, 2010 04:40
Show Gist options
  • Save Busta117/673733 to your computer and use it in GitHub Desktop.
Save Busta117/673733 to your computer and use it in GitHub Desktop.
def algo(env)
data_raw = open('http://spreadsheets.google.com/tq?key=0AsTunpthKrMxdEp5R1loYjBBcVhNQWVEc1BUZmZ1QUE&pub=1')
data = data_raw.read
data = data.split('(')[1].split(")")[0]
data = data.gsub("'", '"')
data = data.gsub(/([a-z]+):/, '"\1":')
result = JSON.parse(data)
puts "\n\n\n"
puts "\n\n\n"
puts"\n\n\n\n"
puts result["table"]["rows"][0]["c"].inspect
puts "\n\n\nchao"
[200, {"Content-Type" => "text/plain"}, "alohaaa"]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment