Code Monkey home page Code Monkey logo

webservice-embedly's Introduction

WebService::Embedly -- a Perl interface to Embed.ly services

WebService::Embedly is a very simple module for accessing metadata on embedded content through Embed.ly.

Module dependencies:

  • Carp
  • JSON
  • LWP::UserAgent
  • URI
  • URI::Escape

Examples

Simple:

my $e = new WebService::Embedly(key => "api key goes here");
my $r = $e->oembed("http://vimeo.com/18150336");
print "Video title is: ", $r->[0]->{'title'}, "\n";

Multiple URLs are simple too!

$r = $e->oembed(["http://vimeo.com/18150336", "http://www.youtube.com/watch?v=dQw4w9WgXcQ"]);

Need to provide options?

$r = $e->oembed({ url => "http://www.youtube.com/watch?v=dQw4w9WgXcQ",
                  maxwidth => 480 });

The return value is an array reference, with one array element for each URL passed in.

Endpoints

The oembed, preview, and objectify endpoints are supported.

Installation

To install this module, run the following commands:

perl Makefile.PL
make
make test
make install

Support

Check out the GitHub page.

Credits

Written with one eye on the Embed.ly library for PHP.

Partly funded by the fine folks at The Tyee. Thanks to the Embed.ly folks for providing a full-access dev account too!

Copyright (c) 2011, Greg Heo ([email protected]). Released under the MIT license (see MIT-LICENSE).

webservice-embedly's People

Contributors

gregheo avatar

Watchers

Revlin John avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.