Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Confluence Embed.ly Addon for OnDemand

Confluence Embed.ly Addon for OnDemand

Lightning talk about the Confluence Embed.ly add on for OnDemand.

Avatar for Matthew Jensen

Matthew Jensen

June 27, 2014

Other Decks in Technology

Transcript

  1. oembed http://oembed.com/ oEmbed is a format for allowing an embedded

    representation of a URL on third party sites. The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the resource directly.
  2. { "version": "1.0", "type": "photo", "width": 240, "height": 160, "title":

    "ZB8T0193", "url": "http://farm4.static.flickr.com/3123/2341623661_7c99f48bbf_m.jpg", "author_name": "Bees", "author_url": "http://www.flickr.com/photos/bees/", "provider_name": "Flickr", "provider_url": "http://www.flickr.com/" }
  3. { "provider_url": "https://www.atlassian.com", "description": "Millions of users globally rely on

    Atlassian products every day for…” "title": "Software Development and Collaboration Tools | Atlassian", "url": "https://www.atlassian.com/", "thumbnail_width": 1953, "thumbnail_url": "https://www.atlassian.com/docroot/wac/resources/wac/img/hubspot_photo.jpg", "version": "1.0", "provider_name": "Atlassian", "type": "link", "thumbnail_height": 870 }
  4. The Add On http://bitbucket.org/mjensen/embedly-addon The Confluence Embedly Add On uses

    the embed.ly service to embed many different types of content on a Confluence page.
  5. var apiUrl = "https://api.embed.ly/1/oembed?url=" + url; $.get(apiUrl, function (data) {

    var body = $("body"); switch (data.type) { case "photo": body.append("<img src=\"" + data.url + "\">"); AP.resize(); break; case "video": case "rich": body.append($(data.html)); AP.resize(data.width, data.height); break; case "link": default: body.append("<a target=\"_new\" title=\"" + data.title + "\" href=\"" + data.url + "\">"+data.title+"</a>"); AP.resize(); break; } })
  6. • On Marketplace (/)! • On Pug (/)! • In

    Use (x)! • On EAC (?) Status