Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 28th, 2013  |  syntax: Ruby  |  size: 0.33 KB  |  views: 30  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. require 'uri'
  2. require 'net/http'
  3.  
  4. g_api = "http://www.googleapis.com/"
  5. tableId = 'STRING CONTAINING TABLE ID'
  6. styleId = '4'
  7. key = 'STRING CONTAINING MY FUSION TABLES API KEY'
  8.  
  9. google_api = Net::HTTP.new 'www.googleapis.com'
  10. get_req = google_api.get "/fusiontables/v1/tables/#{tableId}/styles?key=#{key}"
  11.  
  12. puts get_req.body
clone this paste RAW Paste Data