View Source Unfurl.Oembed (Unfurl v0.6.0)
A module for managing oembed data
Summary
Functions
Returns a specification to start this module under a supervisor.
Looks for an oembed link in the HTML of the given url and fetches it
Returns an Oembed endpoint for the given url
Fetches oembed data for the given url if it comes from a known provider
Fetches the list of Oembed providers
Callback implementation for GenServer.init/1
.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Looks for an oembed link in the HTML of the given url and fetches it
endpoint_from_url(url, params \\ %{"format" => "json"}, opts \\ [])
View SourceReturns an Oembed endpoint for the given url
Examples
iex> Oembed.endpoint_from_url "https://vimeo.com/88856141"
iex> Oembed.endpoint_from_url "https://vimeo.com/88856141", %{"format" => "xml"}
Fetches oembed data for the given url if it comes from a known provider
@spec fetch_providers(Atom.t()) :: {:ok, List.t()} | {:error, Atom.t()}
Fetches the list of Oembed providers
Soft fetch will fetch cached providers. Hard fetch requests providers from oembed.com and purges the cache.
Callback implementation for GenServer.init/1
.