++ed by:
KEEDI

1 PAUSE user
1 non-PAUSE user.

Jan Henning Thorsen

NAME

LinkEmbedder - Embed / expand oEmbed resources and other URL / links

SYNOPSIS

  use LinkEmbedder;

  my $embedder = LinkEmbedder->new;
  my $link     = $embedder->get("http://xkcd.com/927");
  print $link->html;

DESCRIPTION

LinkEmbedder is a module that can expand an URL into a rich HTML snippet or simply to extract information about the URL.

Note that this module is currently EXPERIMENTAL. It will replace Mojolicious::Plugin::LinkEmbedder when it gets stable.

These web pages are currently supported:

ATTRIBUTES

ua

  $ua = $self->ua;

Holds a Mojo::UserAgent object.

  $hash_ref = $self->url_to_link;

Holds a mapping between host names and link class to use.

METHODS

get

  $self = $self->get($url, sub { my ($self, $link) = @_; });
  $link = $self->get($url);

Used to construct a new LinkEmbedder::Link object and retrieve information about the URL.

serve

  $self = $self->serve(Mojolicious::Controller->new, $url);

Used as a helper for Mojolicious web applications to reply to an oEmbed request.

AUTHOR

Jan Henning Thorsen

COPYRIGHT AND LICENSE

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.