into an embedded representation of the resource e.g. magically display embedded video instead of link K. Puschke (Ruby Usergroup HH) oembed January 2013 4 / 17
embedding specs published in 2008 by Leah Culver (Pownce), Cal Henderson (Flickr), Mike Malone (Pownce), and Richard Crowley (OpenDNS) K. Puschke (Ruby Usergroup HH) oembed January 2013 6 / 17
param url optional additional params: maxwidth, maxheight, format response format xml or json K. Puschke (Ruby Usergroup HH) oembed January 2013 9 / 17
param url optional additional params: maxwidth, maxheight, format response format xml or json informs consumer how to embed, e.g. gives html snippet K. Puschke (Ruby Usergroup HH) oembed January 2013 9 / 17
in routes.rb to provide route to API endpoint your media item’s model needs a method for each field to be part of the oEmbed response, e.g. html, thumbnail_url,. . . K. Puschke (Ruby Usergroup HH) oembed January 2013 13 / 17
in routes.rb to provide route to API endpoint your media item’s model needs a method for each field to be part of the oEmbed response, e.g. html, thumbnail_url,. . . include OembedProviderEngine::OembedProvidable K. Puschke (Ruby Usergroup HH) oembed January 2013 13 / 17
in routes.rb to provide route to API endpoint your media item’s model needs a method for each field to be part of the oEmbed response, e.g. html, thumbnail_url,. . . include OembedProviderEngine::OembedProvidable call oembed_providable_as with media type, e.g. oembed_providable_as :video K. Puschke (Ruby Usergroup HH) oembed January 2013 13 / 17
response model has attributes for each field to be included into the response its initializer sets attributes to the respective values from the app’s media item K. Puschke (Ruby Usergroup HH) oembed January 2013 14 / 17
response model has attributes for each field to be included into the response its initializer sets attributes to the respective values from the app’s media item has methods to format the response K. Puschke (Ruby Usergroup HH) oembed January 2013 14 / 17
url parsed to determine media item model media item object initialized scoped response model created (if not already existing) K. Puschke (Ruby Usergroup HH) oembed January 2013 15 / 17
url parsed to determine media item model media item object initialized scoped response model created (if not already existing) response object initialized K. Puschke (Ruby Usergroup HH) oembed January 2013 15 / 17
url parsed to determine media item model media item object initialized scoped response model created (if not already existing) response object initialized response formatted and returned K. Puschke (Ruby Usergroup HH) oembed January 2013 15 / 17
handling of authorization caching improve test coverage, maybe migrate from shoulda to rspec K. Puschke (Ruby Usergroup HH) oembed January 2013 16 / 17
handling of authorization caching improve test coverage, maybe migrate from shoulda to rspec allow for custom fields to be added to the response K. Puschke (Ruby Usergroup HH) oembed January 2013 16 / 17
[email protected] github: https://github.com/xing/oembed_provider_engine . . . we are happy to accept pull requests K. Puschke (Ruby Usergroup HH) oembed January 2013 17 / 17