module Oembed::Client

Attributes

http[W]

Public Instance Methods

endpoint_uri() click to toggle source
# File lib/oembed/client.rb, line 10
def endpoint_uri
  raise NotImplementedError
end
fetch(resource_uri, params = {}) click to toggle source
# File lib/oembed/client.rb, line 18
def fetch(resource_uri, params = {})
  begin
    fetch!(resource_uri, params)
  rescue Oembed::Error
    nil
  end
end
fetch!(resource_uri, params = {}) click to toggle source
# File lib/oembed/client.rb, line 26
def fetch!(resource_uri, params = {})
  uri = Oembed::Uri.new(endpoint_uri, resource_uri, params)
  http.get(uri.to_s)
end
http() click to toggle source
# File lib/oembed/client.rb, line 14
def http
  @http ||= Oembed::Http.new
end