SlideShare ist ein Scribd-Unternehmen logo
1 von 58
Downloaden Sie, um offline zu lesen
oEmbed
                                       on rails


                                  Kerstin Puschke

                                 Ruby Usergroup Hamburg


                                    January 2013




K. Puschke (Ruby Usergroup HH)           oembed           January 2013   1 / 17
License




CC BY-SA 3.0
Creative Commons
Attribution ShareAlike 3.0
http://creativecommons.org/licenses/by-sa/3.0/




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   2 / 17
Who am I




     software engineer at XING




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   3 / 17
Who am I




     software engineer at XING
     perl and rails




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   3 / 17
Who am I




     software engineer at XING
     perl and rails
     @titanoboa42 on twitter




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   3 / 17
Who am I




     software engineer at XING
     perl and rails
     @titanoboa42 on twitter
     titanoboa on github




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   3 / 17
Who am I




     software engineer at XING
     perl and rails
     @titanoboa42 on twitter
     titanoboa on github
     titanoboa on stackoverflow




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   3 / 17
third-party media embedding




Automated third-party media embedding
turn a url 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
third-party media embedding




     screenscraping is a maintenance nightmare




K. Puschke (Ruby Usergroup HH)   oembed          January 2013   5 / 17
third-party media embedding




     screenscraping is a maintenance nightmare
     provider specific APIs:
     additional effort for each additional provider




K. Puschke (Ruby Usergroup HH)     oembed             January 2013   5 / 17
third-party media embedding




     screenscraping is a maintenance nightmare
     provider specific APIs:
     additional effort for each additional provider
     oEmbed standardizes embedding




K. Puschke (Ruby Usergroup HH)     oembed             January 2013   5 / 17
oEmbed




     open embed format




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   6 / 17
oEmbed




     open embed format
     open web standard for third-party media embedding




K. Puschke (Ruby Usergroup HH)   oembed                  January 2013   6 / 17
oEmbed




     open embed format
     open web standard for third-party media embedding
     specs published in 2008




K. Puschke (Ruby Usergroup HH)   oembed                  January 2013   6 / 17
oEmbed




     open embed format
     open web standard for third-party media 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
oEmbed providers



     youtube




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   7 / 17
oEmbed providers



     youtube
     vimeo




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   7 / 17
oEmbed providers



     youtube
     vimeo
     flickr




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   7 / 17
oEmbed providers



     youtube
     vimeo
     flickr
     twitter




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   7 / 17
oEmbed providers



     youtube
     vimeo
     flickr
     twitter
     slideshare




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   7 / 17
oEmbed providers



     youtube
     vimeo
     flickr
     twitter
     slideshare
     speakerdeck




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   7 / 17
oEmbed providers



     youtube
     vimeo
     flickr
     twitter
     slideshare
     speakerdeck
     intermediaries, e.g. embed.ly




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   7 / 17
oEmbed consumers




     drupal




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   8 / 17
oEmbed consumers




     drupal
     wordpress




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   8 / 17
oEmbed consumers




     drupal
     wordpress
     elgg




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   8 / 17
oEmbed consumers




     drupal
     wordpress
     elgg
     diaspora




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   8 / 17
oEmbed consumers




     drupal
     wordpress
     elgg
     diaspora
     xing




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   8 / 17
oEmbed spec




     http GET request to API endpoint with query param url




K. Puschke (Ruby Usergroup HH)   oembed                January 2013   9 / 17
oEmbed spec




     http GET request to API endpoint with query param url
     optional additional params: maxwidth, maxheight, format




K. Puschke (Ruby Usergroup HH)   oembed                  January 2013   9 / 17
oEmbed spec




     http GET request to API endpoint with query param url
     optional additional params: maxwidth, maxheight, format
     response format xml or json




K. Puschke (Ruby Usergroup HH)     oembed                January 2013   9 / 17
oEmbed spec




     http GET request to API endpoint with query 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
Example: video
http://www.youtube.com
/oembed?url=http://www.youtube.com/watch?v=zwk1KvnZxGw
{
       "author_name": "XINGcom",
       "html": "<iframe width="480" height="270" src=
       "version": "1.0",
       "author_url": "http://www.youtube.com/user/XING...
       "thumbnail_width": 480,
       "height": 270,
       "provider_url": "http://www.youtube.com/",
       "type": "video",
       "width": 480,
       "thumbnail_height": 360,
       "thumbnail_url": "http://i3.ytimg.com/vi/...
       "provider_name": "YouTube",
       "title": "Was ist XING?"
}
K. Puschke (Ruby Usergroup HH)   oembed          January 2013   10 / 17
Example response: photo
{      "type": "photo",
       "title": "Ba...
       "author_name": "...
       "author_url": "http://www.flickr.com/photos/...
       "width": "1024",
       "height": "768",
       "url": "http://farm4.staticflickr.com/3040/2362...
       "web_page": "http://www.flickr.com/photos/be...
       "thumbnail_url": "http://farm4.staticfli...
       "thumbnail_width": 75,
       "thumbnail_height": 75,
       "web_page_short_url": "http://flic.kr/p/4...
       "license": "All Rights Reserved",
       "version": "1.0",
       "cache_age": 3600,
       "provider_name": "Flickr",
K. Puschke (Ruby Usergroup HH)   oembed      January 2013   11 / 17
oEmbed gems




     quite a few consumer gems




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   12 / 17
oEmbed gems




     quite a few consumer gems
     oembed-provider (rails 2 only)




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   12 / 17
oEmbed gems




     quite a few consumer gems
     oembed-provider (rails 2 only)
     oembed-provider-engine (rails 3 only)
     mountable rails 3 engine, heavily based on oembed-provider




K. Puschke (Ruby Usergroup HH)   oembed                January 2013   12 / 17
oembed-provider-engine
turning your app into an oEmbed provider




      mount OembedProviderEngine::Engine in routes.rb
      to provide route to API endpoint




 K. Puschke (Ruby Usergroup HH)        oembed   January 2013   13 / 17
oembed-provider-engine
turning your app into an oEmbed provider




      mount OembedProviderEngine::Engine in routes.rb
      to provide route to API endpoint
      your media item’s model




 K. Puschke (Ruby Usergroup HH)        oembed   January 2013   13 / 17
oembed-provider-engine
turning your app into an oEmbed provider




      mount OembedProviderEngine::Engine 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
oembed-provider-engine
turning your app into an oEmbed provider




      mount OembedProviderEngine::Engine 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
oembed-provider-engine
turning your app into an oEmbed provider




      mount OembedProviderEngine::Engine 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
oembed-provider-engine
inner workings




      oembed_providable_as creates scoped OembedResponse
      model, e.g. MediaItem::OembedResponse




 K. Puschke (Ruby Usergroup HH)   oembed        January 2013   14 / 17
oembed-provider-engine
inner workings




      oembed_providable_as creates scoped OembedResponse
      model, e.g. MediaItem::OembedResponse
      response model has attributes for each field to be included into
      the response




 K. Puschke (Ruby Usergroup HH)   oembed                   January 2013   14 / 17
oembed-provider-engine
inner workings




      oembed_providable_as creates scoped OembedResponse
      model, e.g. MediaItem::OembedResponse
      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
oembed-provider-engine
inner workings




      oembed_providable_as creates scoped OembedResponse
      model, e.g. MediaItem::OembedResponse
      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
oembed-provider-engine
inner workings




      API endpoint routes to engine’s controller




 K. Puschke (Ruby Usergroup HH)    oembed          January 2013   15 / 17
oembed-provider-engine
inner workings




      API endpoint routes to engine’s controller
      param url parsed to determine media item model




 K. Puschke (Ruby Usergroup HH)    oembed              January 2013   15 / 17
oembed-provider-engine
inner workings




      API endpoint routes to engine’s controller
      param 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
oembed-provider-engine
inner workings




      API endpoint routes to engine’s controller
      param 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
oembed-provider-engine
inner workings




      API endpoint routes to engine’s controller
      param 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
oembed-provider-engine
todo




       still very rails 2-ish :-( needs polishing




 K. Puschke (Ruby Usergroup HH)       oembed        January 2013   16 / 17
oembed-provider-engine
todo




       still very rails 2-ish :-( needs polishing
       proper handling of authorization




 K. Puschke (Ruby Usergroup HH)       oembed        January 2013   16 / 17
oembed-provider-engine
todo




       still very rails 2-ish :-( needs polishing
       proper handling of authorization
       caching




 K. Puschke (Ruby Usergroup HH)       oembed        January 2013   16 / 17
oembed-provider-engine
todo




       still very rails 2-ish :-( needs polishing
       proper handling of authorization
       caching
       improve test coverage, maybe migrate from shoulda to rspec




 K. Puschke (Ruby Usergroup HH)       oembed             January 2013   16 / 17
oembed-provider-engine
todo




       still very rails 2-ish :-( needs polishing
       proper 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
Feedback & Co




Questions, comments,. . .
     twitter: @titanoboa42




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   17 / 17
Feedback & Co




Questions, comments,. . .
     twitter: @titanoboa42
     email: kerstin.puschke@xing.com




K. Puschke (Ruby Usergroup HH)   oembed   January 2013   17 / 17
Feedback & Co




Questions, comments,. . .
     twitter: @titanoboa42
     email: kerstin.puschke@xing.com
     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

Weitere ähnliche Inhalte

Andere mochten auch

TestDisk User Manual
TestDisk User ManualTestDisk User Manual
TestDisk User Manual
Rockety Ryder
 
Windows command prompt a to z
Windows command prompt a to zWindows command prompt a to z
Windows command prompt a to z
Subuh Kurniawan
 

Andere mochten auch (20)

In der Ruhe liegt die Kraft
In der Ruhe liegt die KraftIn der Ruhe liegt die Kraft
In der Ruhe liegt die Kraft
 
TestDisk User Manual
TestDisk User ManualTestDisk User Manual
TestDisk User Manual
 
Linux slides fort_2013_upload
Linux slides fort_2013_uploadLinux slides fort_2013_upload
Linux slides fort_2013_upload
 
NoSQL und CouchDB
NoSQL und CouchDBNoSQL und CouchDB
NoSQL und CouchDB
 
Behind the scenes of a grown-up web application
Behind the scenes of a grown-up web applicationBehind the scenes of a grown-up web application
Behind the scenes of a grown-up web application
 
Grundlagen der Kommandozeile unter Unix/Linux (Handout)
Grundlagen der Kommandozeile unter Unix/Linux (Handout)Grundlagen der Kommandozeile unter Unix/Linux (Handout)
Grundlagen der Kommandozeile unter Unix/Linux (Handout)
 
Rsyslog - Deutsche Qualitätsarbeit für Linux
Rsyslog - Deutsche Qualitätsarbeit für LinuxRsyslog - Deutsche Qualitätsarbeit für Linux
Rsyslog - Deutsche Qualitätsarbeit für Linux
 
NoSQL-Datenbanken am Beispiel CouchDB
NoSQL-Datenbanken am Beispiel CouchDBNoSQL-Datenbanken am Beispiel CouchDB
NoSQL-Datenbanken am Beispiel CouchDB
 
Grundlagen der Kommandozeile unter Unix/Linux (Folien)
Grundlagen der Kommandozeile unter Unix/Linux (Folien)Grundlagen der Kommandozeile unter Unix/Linux (Folien)
Grundlagen der Kommandozeile unter Unix/Linux (Folien)
 
Einstieg in relationale Datenbanken mit MySQL (Handout)
Einstieg in relationale Datenbanken mit MySQL (Handout)Einstieg in relationale Datenbanken mit MySQL (Handout)
Einstieg in relationale Datenbanken mit MySQL (Handout)
 
Einstieg in relationale Datenbanken mit MySQL (Folien)
Einstieg in relationale Datenbanken mit MySQL (Folien)Einstieg in relationale Datenbanken mit MySQL (Folien)
Einstieg in relationale Datenbanken mit MySQL (Folien)
 
Linux monitoring
Linux monitoringLinux monitoring
Linux monitoring
 
Nmon Analysis - Performance monitoring tool for LINUX and AIX
Nmon Analysis - Performance monitoring tool for LINUX and AIXNmon Analysis - Performance monitoring tool for LINUX and AIX
Nmon Analysis - Performance monitoring tool for LINUX and AIX
 
3 infomeeting
3 infomeeting3 infomeeting
3 infomeeting
 
Extreme Linux Performance Monitoring and Tuning
Extreme Linux Performance Monitoring and TuningExtreme Linux Performance Monitoring and Tuning
Extreme Linux Performance Monitoring and Tuning
 
Windows command prompt a to z
Windows command prompt a to zWindows command prompt a to z
Windows command prompt a to z
 
Webentwicklung mit PHP und MySQL
Webentwicklung mit PHP und MySQLWebentwicklung mit PHP und MySQL
Webentwicklung mit PHP und MySQL
 
Linux monitoring and Troubleshooting for DBA's
Linux monitoring and Troubleshooting for DBA'sLinux monitoring and Troubleshooting for DBA's
Linux monitoring and Troubleshooting for DBA's
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux Troubleshooting
 
Course on Ehtical Hacking - Introduction
Course on Ehtical Hacking - IntroductionCourse on Ehtical Hacking - Introduction
Course on Ehtical Hacking - Introduction
 

Ähnlich wie oEmbed (on rails)

Building your API utility belt (Keith Casey)
Building your API utility belt (Keith Casey)Building your API utility belt (Keith Casey)
Building your API utility belt (Keith Casey)
Future Insights
 
Apache Geode: an efficient alternative to Kafka-Storm-Spark for Data Analytic
Apache Geode: an efficient alternative to Kafka-Storm-Spark for Data AnalyticApache Geode: an efficient alternative to Kafka-Storm-Spark for Data Analytic
Apache Geode: an efficient alternative to Kafka-Storm-Spark for Data Analytic
VMware Tanzu
 
In graph we trust: Microservices, GraphQL and security challenges
In graph we trust: Microservices, GraphQL and security challengesIn graph we trust: Microservices, GraphQL and security challenges
In graph we trust: Microservices, GraphQL and security challenges
Mohammed A. Imran
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScript
Oleg Podsechin
 

Ähnlich wie oEmbed (on rails) (20)

Designing an API
Designing an APIDesigning an API
Designing an API
 
Adaptive podcasting 2022 for Bristol+Bath
Adaptive podcasting 2022 for Bristol+BathAdaptive podcasting 2022 for Bristol+Bath
Adaptive podcasting 2022 for Bristol+Bath
 
Distributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldDistributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component world
 
Mediamosa: Open source video backend
Mediamosa: Open source video backendMediamosa: Open source video backend
Mediamosa: Open source video backend
 
Mediamosa Open source video backend
Mediamosa Open source video backendMediamosa Open source video backend
Mediamosa Open source video backend
 
How to Build a Custom Plugin in Rundeck
How to Build a Custom Plugin in RundeckHow to Build a Custom Plugin in Rundeck
How to Build a Custom Plugin in Rundeck
 
Building your API utility belt (Keith Casey)
Building your API utility belt (Keith Casey)Building your API utility belt (Keith Casey)
Building your API utility belt (Keith Casey)
 
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
 
Apache Geode: an efficient alternative to Kafka-Storm-Spark for Data Analytic
Apache Geode: an efficient alternative to Kafka-Storm-Spark for Data AnalyticApache Geode: an efficient alternative to Kafka-Storm-Spark for Data Analytic
Apache Geode: an efficient alternative to Kafka-Storm-Spark for Data Analytic
 
DevSecCon Singapore 2018 - in graph we trust By Imran Mohammed
DevSecCon Singapore 2018 - in graph we trust By Imran MohammedDevSecCon Singapore 2018 - in graph we trust By Imran Mohammed
DevSecCon Singapore 2018 - in graph we trust By Imran Mohammed
 
In graph we trust: Microservices, GraphQL and security challenges
In graph we trust: Microservices, GraphQL and security challengesIn graph we trust: Microservices, GraphQL and security challenges
In graph we trust: Microservices, GraphQL and security challenges
 
What plugins are out there?
What plugins are out there?What plugins are out there?
What plugins are out there?
 
DevDay 2018: Ulrich Deiters - Offline First - kein Netz, kein Fehler, zufried...
DevDay 2018: Ulrich Deiters - Offline First - kein Netz, kein Fehler, zufried...DevDay 2018: Ulrich Deiters - Offline First - kein Netz, kein Fehler, zufried...
DevDay 2018: Ulrich Deiters - Offline First - kein Netz, kein Fehler, zufried...
 
MALT Wiki and oEmbed
MALT Wiki and oEmbedMALT Wiki and oEmbed
MALT Wiki and oEmbed
 
Using hapi plugins to version your API (hapiDays 2014)
Using hapi plugins to version your API (hapiDays 2014)Using hapi plugins to version your API (hapiDays 2014)
Using hapi plugins to version your API (hapiDays 2014)
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Under the Hood of Reactive Data Access (1/2)
Under the Hood of Reactive Data Access (1/2)Under the Hood of Reactive Data Access (1/2)
Under the Hood of Reactive Data Access (1/2)
 
Open Innovation means Open Source
Open Innovation means Open SourceOpen Innovation means Open Source
Open Innovation means Open Source
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScript
 
Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16
 

Kürzlich hochgeladen

Sample sample sample sample sample sample
Sample sample sample sample sample sampleSample sample sample sample sample sample
Sample sample sample sample sample sample
Casey Keith
 
🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...
🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...
🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...
Apsara Of India
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
Casey Keith
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
Casey Keith
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
Casey Keith
 
Sample sample sample sample sample sample
Sample sample sample sample sample sampleSample sample sample sample sample sample
Sample sample sample sample sample sample
Casey Keith
 

Kürzlich hochgeladen (20)

Sample sample sample sample sample sample
Sample sample sample sample sample sampleSample sample sample sample sample sample
Sample sample sample sample sample sample
 
Hire 💕 8617697112 Chamba Call Girls Service Call Girls Agency
Hire 💕 8617697112 Chamba Call Girls Service Call Girls AgencyHire 💕 8617697112 Chamba Call Girls Service Call Girls Agency
Hire 💕 8617697112 Chamba Call Girls Service Call Girls Agency
 
Genuine 8250077686 Hot and Beautiful 💕 Bhavnagar Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Bhavnagar Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Bhavnagar Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Bhavnagar Escorts call Girls
 
Papi kondalu Call Girls 8250077686 Service Offer VIP Hot Model
Papi kondalu Call Girls 8250077686 Service Offer VIP Hot ModelPapi kondalu Call Girls 8250077686 Service Offer VIP Hot Model
Papi kondalu Call Girls 8250077686 Service Offer VIP Hot Model
 
WhatsApp Chat: 📞 8617697112 Independent Call Girls in Darjeeling
WhatsApp Chat: 📞 8617697112 Independent Call Girls in DarjeelingWhatsApp Chat: 📞 8617697112 Independent Call Girls in Darjeeling
WhatsApp Chat: 📞 8617697112 Independent Call Girls in Darjeeling
 
Hire 8617697112 Call Girls Udhampur For an Amazing Night
Hire 8617697112 Call Girls Udhampur For an Amazing NightHire 8617697112 Call Girls Udhampur For an Amazing Night
Hire 8617697112 Call Girls Udhampur For an Amazing Night
 
High Profile 🔝 8250077686 📞 Call Girls Service in Siri Fort🍑
High Profile 🔝 8250077686 📞 Call Girls Service in Siri Fort🍑High Profile 🔝 8250077686 📞 Call Girls Service in Siri Fort🍑
High Profile 🔝 8250077686 📞 Call Girls Service in Siri Fort🍑
 
Siliguri Call Girls 8250077686 Service Offer VIP Hot Model
Siliguri Call Girls 8250077686 Service Offer VIP Hot ModelSiliguri Call Girls 8250077686 Service Offer VIP Hot Model
Siliguri Call Girls 8250077686 Service Offer VIP Hot Model
 
🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...
🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...
🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...
 
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call Girls
 
Genuine 8250077686 Hot and Beautiful 💕 Diu Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Diu Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Diu Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Diu Escorts call Girls
 
Discover Mathura And Vrindavan A Spritual Journey.pdf
Discover Mathura And Vrindavan A Spritual Journey.pdfDiscover Mathura And Vrindavan A Spritual Journey.pdf
Discover Mathura And Vrindavan A Spritual Journey.pdf
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
Genuine 9332606886 Hot and Beautiful 💕 Pune Escorts call Girls
Genuine 9332606886 Hot and Beautiful 💕 Pune Escorts call GirlsGenuine 9332606886 Hot and Beautiful 💕 Pune Escorts call Girls
Genuine 9332606886 Hot and Beautiful 💕 Pune Escorts call Girls
 
Night 7k to 12k Daman Call Girls 👉👉 8617697112⭐⭐ 100% Genuine Escort Service ...
Night 7k to 12k Daman Call Girls 👉👉 8617697112⭐⭐ 100% Genuine Escort Service ...Night 7k to 12k Daman Call Girls 👉👉 8617697112⭐⭐ 100% Genuine Escort Service ...
Night 7k to 12k Daman Call Girls 👉👉 8617697112⭐⭐ 100% Genuine Escort Service ...
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
Sample sample sample sample sample sample
Sample sample sample sample sample sampleSample sample sample sample sample sample
Sample sample sample sample sample sample
 
Genuine 8250077686 Hot and Beautiful 💕 Amaravati Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Amaravati Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Amaravati Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Amaravati Escorts call Girls
 
Bhubaneswar Call Girls 8250077686 Service Offer VIP Hot Model
Bhubaneswar Call Girls 8250077686 Service Offer VIP Hot ModelBhubaneswar Call Girls 8250077686 Service Offer VIP Hot Model
Bhubaneswar Call Girls 8250077686 Service Offer VIP Hot Model
 

oEmbed (on rails)

  • 1. oEmbed on rails Kerstin Puschke Ruby Usergroup Hamburg January 2013 K. Puschke (Ruby Usergroup HH) oembed January 2013 1 / 17
  • 2. License CC BY-SA 3.0 Creative Commons Attribution ShareAlike 3.0 http://creativecommons.org/licenses/by-sa/3.0/ K. Puschke (Ruby Usergroup HH) oembed January 2013 2 / 17
  • 3. Who am I software engineer at XING K. Puschke (Ruby Usergroup HH) oembed January 2013 3 / 17
  • 4. Who am I software engineer at XING perl and rails K. Puschke (Ruby Usergroup HH) oembed January 2013 3 / 17
  • 5. Who am I software engineer at XING perl and rails @titanoboa42 on twitter K. Puschke (Ruby Usergroup HH) oembed January 2013 3 / 17
  • 6. Who am I software engineer at XING perl and rails @titanoboa42 on twitter titanoboa on github K. Puschke (Ruby Usergroup HH) oembed January 2013 3 / 17
  • 7. Who am I software engineer at XING perl and rails @titanoboa42 on twitter titanoboa on github titanoboa on stackoverflow K. Puschke (Ruby Usergroup HH) oembed January 2013 3 / 17
  • 8. third-party media embedding Automated third-party media embedding turn a url 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
  • 9. third-party media embedding screenscraping is a maintenance nightmare K. Puschke (Ruby Usergroup HH) oembed January 2013 5 / 17
  • 10. third-party media embedding screenscraping is a maintenance nightmare provider specific APIs: additional effort for each additional provider K. Puschke (Ruby Usergroup HH) oembed January 2013 5 / 17
  • 11. third-party media embedding screenscraping is a maintenance nightmare provider specific APIs: additional effort for each additional provider oEmbed standardizes embedding K. Puschke (Ruby Usergroup HH) oembed January 2013 5 / 17
  • 12. oEmbed open embed format K. Puschke (Ruby Usergroup HH) oembed January 2013 6 / 17
  • 13. oEmbed open embed format open web standard for third-party media embedding K. Puschke (Ruby Usergroup HH) oembed January 2013 6 / 17
  • 14. oEmbed open embed format open web standard for third-party media embedding specs published in 2008 K. Puschke (Ruby Usergroup HH) oembed January 2013 6 / 17
  • 15. oEmbed open embed format open web standard for third-party media 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
  • 16. oEmbed providers youtube K. Puschke (Ruby Usergroup HH) oembed January 2013 7 / 17
  • 17. oEmbed providers youtube vimeo K. Puschke (Ruby Usergroup HH) oembed January 2013 7 / 17
  • 18. oEmbed providers youtube vimeo flickr K. Puschke (Ruby Usergroup HH) oembed January 2013 7 / 17
  • 19. oEmbed providers youtube vimeo flickr twitter K. Puschke (Ruby Usergroup HH) oembed January 2013 7 / 17
  • 20. oEmbed providers youtube vimeo flickr twitter slideshare K. Puschke (Ruby Usergroup HH) oembed January 2013 7 / 17
  • 21. oEmbed providers youtube vimeo flickr twitter slideshare speakerdeck K. Puschke (Ruby Usergroup HH) oembed January 2013 7 / 17
  • 22. oEmbed providers youtube vimeo flickr twitter slideshare speakerdeck intermediaries, e.g. embed.ly K. Puschke (Ruby Usergroup HH) oembed January 2013 7 / 17
  • 23. oEmbed consumers drupal K. Puschke (Ruby Usergroup HH) oembed January 2013 8 / 17
  • 24. oEmbed consumers drupal wordpress K. Puschke (Ruby Usergroup HH) oembed January 2013 8 / 17
  • 25. oEmbed consumers drupal wordpress elgg K. Puschke (Ruby Usergroup HH) oembed January 2013 8 / 17
  • 26. oEmbed consumers drupal wordpress elgg diaspora K. Puschke (Ruby Usergroup HH) oembed January 2013 8 / 17
  • 27. oEmbed consumers drupal wordpress elgg diaspora xing K. Puschke (Ruby Usergroup HH) oembed January 2013 8 / 17
  • 28. oEmbed spec http GET request to API endpoint with query param url K. Puschke (Ruby Usergroup HH) oembed January 2013 9 / 17
  • 29. oEmbed spec http GET request to API endpoint with query param url optional additional params: maxwidth, maxheight, format K. Puschke (Ruby Usergroup HH) oembed January 2013 9 / 17
  • 30. oEmbed spec http GET request to API endpoint with query param url optional additional params: maxwidth, maxheight, format response format xml or json K. Puschke (Ruby Usergroup HH) oembed January 2013 9 / 17
  • 31. oEmbed spec http GET request to API endpoint with query 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
  • 32. Example: video http://www.youtube.com /oembed?url=http://www.youtube.com/watch?v=zwk1KvnZxGw { "author_name": "XINGcom", "html": "<iframe width="480" height="270" src= "version": "1.0", "author_url": "http://www.youtube.com/user/XING... "thumbnail_width": 480, "height": 270, "provider_url": "http://www.youtube.com/", "type": "video", "width": 480, "thumbnail_height": 360, "thumbnail_url": "http://i3.ytimg.com/vi/... "provider_name": "YouTube", "title": "Was ist XING?" } K. Puschke (Ruby Usergroup HH) oembed January 2013 10 / 17
  • 33. Example response: photo { "type": "photo", "title": "Ba... "author_name": "... "author_url": "http://www.flickr.com/photos/... "width": "1024", "height": "768", "url": "http://farm4.staticflickr.com/3040/2362... "web_page": "http://www.flickr.com/photos/be... "thumbnail_url": "http://farm4.staticfli... "thumbnail_width": 75, "thumbnail_height": 75, "web_page_short_url": "http://flic.kr/p/4... "license": "All Rights Reserved", "version": "1.0", "cache_age": 3600, "provider_name": "Flickr", K. Puschke (Ruby Usergroup HH) oembed January 2013 11 / 17
  • 34. oEmbed gems quite a few consumer gems K. Puschke (Ruby Usergroup HH) oembed January 2013 12 / 17
  • 35. oEmbed gems quite a few consumer gems oembed-provider (rails 2 only) K. Puschke (Ruby Usergroup HH) oembed January 2013 12 / 17
  • 36. oEmbed gems quite a few consumer gems oembed-provider (rails 2 only) oembed-provider-engine (rails 3 only) mountable rails 3 engine, heavily based on oembed-provider K. Puschke (Ruby Usergroup HH) oembed January 2013 12 / 17
  • 37. oembed-provider-engine turning your app into an oEmbed provider mount OembedProviderEngine::Engine in routes.rb to provide route to API endpoint K. Puschke (Ruby Usergroup HH) oembed January 2013 13 / 17
  • 38. oembed-provider-engine turning your app into an oEmbed provider mount OembedProviderEngine::Engine in routes.rb to provide route to API endpoint your media item’s model K. Puschke (Ruby Usergroup HH) oembed January 2013 13 / 17
  • 39. oembed-provider-engine turning your app into an oEmbed provider mount OembedProviderEngine::Engine 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
  • 40. oembed-provider-engine turning your app into an oEmbed provider mount OembedProviderEngine::Engine 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
  • 41. oembed-provider-engine turning your app into an oEmbed provider mount OembedProviderEngine::Engine 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
  • 42. oembed-provider-engine inner workings oembed_providable_as creates scoped OembedResponse model, e.g. MediaItem::OembedResponse K. Puschke (Ruby Usergroup HH) oembed January 2013 14 / 17
  • 43. oembed-provider-engine inner workings oembed_providable_as creates scoped OembedResponse model, e.g. MediaItem::OembedResponse response model has attributes for each field to be included into the response K. Puschke (Ruby Usergroup HH) oembed January 2013 14 / 17
  • 44. oembed-provider-engine inner workings oembed_providable_as creates scoped OembedResponse model, e.g. MediaItem::OembedResponse 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
  • 45. oembed-provider-engine inner workings oembed_providable_as creates scoped OembedResponse model, e.g. MediaItem::OembedResponse 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
  • 46. oembed-provider-engine inner workings API endpoint routes to engine’s controller K. Puschke (Ruby Usergroup HH) oembed January 2013 15 / 17
  • 47. oembed-provider-engine inner workings API endpoint routes to engine’s controller param url parsed to determine media item model K. Puschke (Ruby Usergroup HH) oembed January 2013 15 / 17
  • 48. oembed-provider-engine inner workings API endpoint routes to engine’s controller param 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
  • 49. oembed-provider-engine inner workings API endpoint routes to engine’s controller param 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
  • 50. oembed-provider-engine inner workings API endpoint routes to engine’s controller param 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
  • 51. oembed-provider-engine todo still very rails 2-ish :-( needs polishing K. Puschke (Ruby Usergroup HH) oembed January 2013 16 / 17
  • 52. oembed-provider-engine todo still very rails 2-ish :-( needs polishing proper handling of authorization K. Puschke (Ruby Usergroup HH) oembed January 2013 16 / 17
  • 53. oembed-provider-engine todo still very rails 2-ish :-( needs polishing proper handling of authorization caching K. Puschke (Ruby Usergroup HH) oembed January 2013 16 / 17
  • 54. oembed-provider-engine todo still very rails 2-ish :-( needs polishing proper handling of authorization caching improve test coverage, maybe migrate from shoulda to rspec K. Puschke (Ruby Usergroup HH) oembed January 2013 16 / 17
  • 55. oembed-provider-engine todo still very rails 2-ish :-( needs polishing proper 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
  • 56. Feedback & Co Questions, comments,. . . twitter: @titanoboa42 K. Puschke (Ruby Usergroup HH) oembed January 2013 17 / 17
  • 57. Feedback & Co Questions, comments,. . . twitter: @titanoboa42 email: kerstin.puschke@xing.com K. Puschke (Ruby Usergroup HH) oembed January 2013 17 / 17
  • 58. Feedback & Co Questions, comments,. . . twitter: @titanoboa42 email: kerstin.puschke@xing.com 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