'https://www.googleapis.com/youtube/v3/search'
ENV['API_KEY']
11 12 13 14 15
# File 'lib/ytsearch.rb', line 11 def self.search(options={}) query = options.map{|k,v| "#{k}=#{v}"}.join('&') response = URI.open("#{API_URL}?key=#{API_KEY}&#{query}").read response = JSON.parse(response) end