discourse/lib/oneboxer/ted_onebox.rb
2013-02-05 14:16:51 -05:00

10 lines
271 B
Ruby

require_dependency 'oneboxer/oembed_onebox'
module Oneboxer
class TedOnebox < OembedOnebox
matcher /^https?\:\/\/(www\.)?ted\.com\/talks\/.*$/
def oembed_endpoint
"http://www.ted.com/talks/oembed.json?url=#{BaseOnebox.uriencode(@url)}"
end
end
end