ExMicrolink (ex_microlink v0.1.1) View Source

Documentation for ExMicrolink.

Link to this section Summary

Link to this section Functions

Queries the Microlink API for link daa

Examples

iex> ExMicrolink.run(%{url: "https://en.wikipedia.org/wiki/Richard_Feynman"})
{
  :ok,
  %ExMicrolink.Response{
    author: "Contributors to Wikimedia projects",
    content_length: 109606,
    content_type: "text/html; charset=UTF-8",
    date: "2021-11-25T23:05:20.000Z",
    description: "Richard Feynman",
    error: nil,
    iframe: nil,
    image: %{
      height: 396,
      size: 55543,
      size_pretty: "55.5 kB",
      type: "jpg",
      url: "https://upload.wikimedia.org/wikipedia/en/4/42/Richard_Feynman_Nobel.jpg",
      width: 280
    },
    lang: "en",
    logo: %{
      height: 160,
      size: 1313,
      size_pretty: "1.31 kB",
      type: "png",
      url: "https://en.wikipedia.org/static/apple-touch/wikipedia.png",
      width: 160
    },
    publisher: "Wikimedia Foundation, Inc.",
    screenshot: nil,
    status: 200,
    title: "Richard Feynman - Wikipedia",
    url: "https://en.wikipedia.org/wiki/Richard_Feynman"
  }
}
Link to this function

transform_to_response(resp, url)

View Source