module Oembedr

Constants

VERSION

Public Class Methods

fetch(url, options = {}) click to toggle source

Convience method: fetch me an oembed!

Example:

Oembedr.fetch("http://www.youtube.com/watch?v=b9XsTtFu64Y")
Oembedr.fetch("http://www.youtube.com/watch?v=b9XsTtFu64Y",
                :params => { :maxwidth => "150", :maxheight => "100" })

@return Faraday::Response or raises error

# File lib/oembedr.rb, line 19
def self.fetch url, options = {}
  client = Oembedr::Client.new(url)
  if client.ready?
    client.get(options)
  else
    false
  end
end