Furlex v0.3.1 Furlex.Oembed View Source

A module for managing oembed data

Link to this section Summary

Functions

Returns an Oembed endpoint for the given url

Fetches the list of Oembed providers

Link to this section Functions

Link to this function endpoint_from_url(url, params \\ %{"format" => "json"}) View Source
endpoint_from_url(String.t, Map.t) ::
  {:ok, String.t} |
  {:error, Atom.t}

Returns 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”}

Link to this function fetch_providers(type \\ :soft) View Source
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.