OpenGraph (ogp v1.0.0)

Link to this section Summary

Functions

Fetch URL and parse Open Graph protocol.

Parse Open Graph protocol.

Link to this section Types

Specs

t() :: %OpenGraph{
  audio: value(),
  description: value(),
  determiner: value(),
  image: value(),
  locale: value(),
  site_name: value(),
  title: value(),
  type: value(),
  url: value(),
  video: value()
}

Specs

value() :: String.t() | nil

Link to this section Functions

Specs

fetch(String.t()) :: t()

Fetch URL and parse Open Graph protocol.

Returns %OpenGraph{}.

Specs

parse(String.t()) :: t()

Parse Open Graph protocol.

Returns %OpenGraph{}.

Examples

iex> OpenGraph.parse("<meta property='og:title' content='GitHub' />")
%OpenGraph{title: "GitHub"}