SlideShare a Scribd company logo
1 of 44
YouTube API: Dive-In HigEdWebDev 2009 Ron West
Google's mission  …is to organize the world's information and make it universally accessible and useful. Sometimes making information accessible requires making it available in contexts other than a web browser.
Agenda Introduction Getting Started Get Content Interaction Pulling it Together Developer Community
Introduction YouTube in Review REST Google Data API YouTube Data API Entries/Feeds Authentication
YouTube in Review Videos Comments Ratings Users Categories Keywords/Tags Channels Subscriptions ,[object Object]
Activity Feeds
Recommendations
Friends
Related Videos
Captions
Favorites
Insight Data,[object Object]
REST Client-Server Stateless Cacheable Uniform Interface Layered
REST HTTP Methods Get = List or Retrieve Put = Replace or Update Post = Create Delete = Delete
Pros  ,[object Object]
Lanugage, platform and transport agnostic
Built in error handlingCons ,[object Object]
Harder to develop with (requires tools)SOAP (RPC/Doc Literal) Web Services
Multiple Endpoints Pros ,[object Object]
Simpler to develop than SOAP
ConciseCons ,[object Object]
Tied to HTTP transportREST Web Services
Get API URL’s for: ,[object Object]
Related Videos
Ratings
Mobile
Versions
 Get Video(s)
 Edit Video
Delete Video,[object Object]
Response Codes Same response codes for HTTP 200, 201, 301, 400, 500 etc.. Codes have similar meaning for each type of call 200 (OK) 400 (Bad Request) 401 (Not Authorized) 404 (Not Found) 500 (Internal Error) Accompanied with error details (XML in payload)
YouTube Data API Version 1 Version 2 (recommended)
YouTubeData API Search for Videos Keywords (tags) Categories Query Params (metadata) Search for Playlists Keywords (tags) Categories Search for Channels Keywords (tags) Categories
YouTube Data API Retrieve Videos Comments Captions Related Videos Video Responses Categories Keywords Playlists Subscriptions Profiles Contacts Messages Activity Feeds Insight Data Feed Favorites
YouTube Data API (cont.) Create Videos Comments Captions Related Videos Video Responses Complaint Rating Contact Message Favorite Playlist Subscription
YouTube Data API (cont.) Update Video Metadata Captions Profiles Playlists Contacts Delete Video Message Favorite Playlist Subscription Contact
YouTube Data API Batch Processing Process multiple types of calls in a single request Each Request in its own <entry> tag
Sample Interaction Query API for videos tagged with “SHU” Display Videos in List Allow user to Select Video to Display Display Single Video Retrieve Comments for that Video Post Comment Login Add to Playlist
Feed <feed [namespaces]> 	… metadata … 	<openSearch:totalResults /> 	<openSearch:startIndex /> 	<openSearch: itemsPerPage /> 	<entry> 		… metadata … 		<media:group/> 	</entry> 	 <entry> 		… metadata … 		<media:group/> 	</entry> 	… </feed>
Entry (video) <entry [namespaces]> 	<title/> 	<content/> 	… metadata … 	<link  rel=“http://gdata.youtube.com/schemas/2007#video.responses “/> 	<link rel=“http://gdata.youtube.com/schemas/2007#video.related” /> 	<link rel=“http://gdata.youtube.com/schemas/2007#mobile”/> 	<media:group> 		<media:contentyt:format=“t” url=“…”/> 		<media:thumbnailurl=“…” width=“…” height=“…”/> 		<yt: duration /> 		<yt:videoid /> 	</ media:group > </entry>
Authentication AuthSub – YouTube Authentication with “callback” API [difficult] OAuth – Standardized Approach (similar in nature to OpenID) [most difficult] ClientLogin – Custom Authentication – you call YouTube API track token [easiest]
Getting Started Google Developers Key Development Environment Samples
Google Developers Key http://code.google.com/apis/youtube/dashboard/
Development Environment Accessing dev servers Plugging in Developers Key

More Related Content

Viewers also liked

4w 1h with youtube api
4w 1h with youtube api4w 1h with youtube api
4w 1h with youtube apiOue Ekasit
 
YouTube API Japan UG #1
YouTube API Japan UG #1YouTube API Japan UG #1
YouTube API Japan UG #1Yukio Andoh
 
Youtube IFrame Player API
Youtube IFrame Player APIYoutube IFrame Player API
Youtube IFrame Player APIRyan Chung
 
IT-youtube Presentation
IT-youtube PresentationIT-youtube Presentation
IT-youtube Presentationsafiya999
 
Why APIs are Different Than Integration
Why APIs are Different Than IntegrationWhy APIs are Different Than Integration
Why APIs are Different Than IntegrationApigee | Google Cloud
 
Youtube Presentation
Youtube PresentationYoutube Presentation
Youtube Presentationtownsend
 
YouTube Presentation
YouTube PresentationYouTube Presentation
YouTube Presentationguest786f62
 
The Day The Earth Broke Into Two...A Jataka Story
The Day The Earth Broke Into Two...A Jataka StoryThe Day The Earth Broke Into Two...A Jataka Story
The Day The Earth Broke Into Two...A Jataka StoryOH TEIK BIN
 
Wisdom From A Laugh 145, 146
Wisdom From A Laugh 145, 146Wisdom From A Laugh 145, 146
Wisdom From A Laugh 145, 146OH TEIK BIN
 
DESIGN IT! Talk #001 (UX) Yukio Andoh
DESIGN IT! Talk #001 (UX) Yukio AndohDESIGN IT! Talk #001 (UX) Yukio Andoh
DESIGN IT! Talk #001 (UX) Yukio AndohYukio Andoh
 
Scaling APIs: Predict, Prepare for, Overcome the Challenges
Scaling APIs: Predict, Prepare for, Overcome the ChallengesScaling APIs: Predict, Prepare for, Overcome the Challenges
Scaling APIs: Predict, Prepare for, Overcome the ChallengesApigee | Google Cloud
 
Presentation - you tube
Presentation - you tubePresentation - you tube
Presentation - you tubesunil.dce
 

Viewers also liked (16)

4w 1h with youtube api
4w 1h with youtube api4w 1h with youtube api
4w 1h with youtube api
 
Api vortrag
Api vortragApi vortrag
Api vortrag
 
YouTube API Japan UG #1
YouTube API Japan UG #1YouTube API Japan UG #1
YouTube API Japan UG #1
 
Youtube IFrame Player API
Youtube IFrame Player APIYoutube IFrame Player API
Youtube IFrame Player API
 
IT-youtube Presentation
IT-youtube PresentationIT-youtube Presentation
IT-youtube Presentation
 
Why APIs are Different Than Integration
Why APIs are Different Than IntegrationWhy APIs are Different Than Integration
Why APIs are Different Than Integration
 
Youtube Presentation
Youtube PresentationYoutube Presentation
Youtube Presentation
 
YouTube Powerpoint
YouTube PowerpointYouTube Powerpoint
YouTube Powerpoint
 
YouTube Presentation
YouTube PresentationYouTube Presentation
YouTube Presentation
 
The Day The Earth Broke Into Two...A Jataka Story
The Day The Earth Broke Into Two...A Jataka StoryThe Day The Earth Broke Into Two...A Jataka Story
The Day The Earth Broke Into Two...A Jataka Story
 
Wisdom From A Laugh 145, 146
Wisdom From A Laugh 145, 146Wisdom From A Laugh 145, 146
Wisdom From A Laugh 145, 146
 
DESIGN IT! Talk #001 (UX) Yukio Andoh
DESIGN IT! Talk #001 (UX) Yukio AndohDESIGN IT! Talk #001 (UX) Yukio Andoh
DESIGN IT! Talk #001 (UX) Yukio Andoh
 
Effective writing
Effective writingEffective writing
Effective writing
 
Scaling APIs: Predict, Prepare for, Overcome the Challenges
Scaling APIs: Predict, Prepare for, Overcome the ChallengesScaling APIs: Predict, Prepare for, Overcome the Challenges
Scaling APIs: Predict, Prepare for, Overcome the Challenges
 
Approval Template
Approval TemplateApproval Template
Approval Template
 
Presentation - you tube
Presentation - you tubePresentation - you tube
Presentation - you tube
 

Similar to YouTube API: Dive In

SEO And Podcasting Presentation
SEO And Podcasting PresentationSEO And Podcasting Presentation
SEO And Podcasting PresentationJordan Kasteler
 
Seo And Podcasting Presentation
Seo And Podcasting PresentationSeo And Podcasting Presentation
Seo And Podcasting PresentationJordan Kasteler
 
SMX@adtech: Mobile, Local and Video Search — Drew Hubbard
SMX@adtech: Mobile, Local and Video Search — Drew HubbardSMX@adtech: Mobile, Local and Video Search — Drew Hubbard
SMX@adtech: Mobile, Local and Video Search — Drew Hubbardadtech_fan
 
Multimedia Accessibility - CALRG '09
Multimedia Accessibility - CALRG '09Multimedia Accessibility - CALRG '09
Multimedia Accessibility - CALRG '09Nick Freear
 
MALT Wiki and oEmbed
MALT Wiki and oEmbedMALT Wiki and oEmbed
MALT Wiki and oEmbedNick Freear
 
API-Craft NYC - Overview of the Twitter APIs with demos
API-Craft NYC - Overview of the Twitter APIs with demosAPI-Craft NYC - Overview of the Twitter APIs with demos
API-Craft NYC - Overview of the Twitter APIs with demosTwitter Developers
 
Drupal Camp 2009 Pune Ilovebollycase Study 1233568636712224 1
Drupal Camp 2009 Pune Ilovebollycase Study 1233568636712224 1Drupal Camp 2009 Pune Ilovebollycase Study 1233568636712224 1
Drupal Camp 2009 Pune Ilovebollycase Study 1233568636712224 1gauravkumar87
 
Supercharging WordPress for SEO
Supercharging WordPress for SEOSupercharging WordPress for SEO
Supercharging WordPress for SEOAffiliate Summit
 
Web REST APIs Design Principles
Web REST APIs Design PrinciplesWeb REST APIs Design Principles
Web REST APIs Design PrinciplesAnji Beeravalli
 
How to Rock Your Video Marketing
How to Rock Your Video MarketingHow to Rock Your Video Marketing
How to Rock Your Video MarketingPixability
 
Dave Coleman slides from Learning Gateway Conference
Dave Coleman slides from Learning Gateway ConferenceDave Coleman slides from Learning Gateway Conference
Dave Coleman slides from Learning Gateway Conferencepearce.alex
 
August 10th, 2009 Tom Rogers YouTube
August 10th, 2009 Tom Rogers YouTubeAugust 10th, 2009 Tom Rogers YouTube
August 10th, 2009 Tom Rogers YouTubeStraight North
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座Li Yi
 
Pentesting Rest API's by :- Gaurang Bhatnagar
Pentesting Rest API's by :- Gaurang BhatnagarPentesting Rest API's by :- Gaurang Bhatnagar
Pentesting Rest API's by :- Gaurang BhatnagarOWASP Delhi
 
SES SF 2010 - Whats Next for SEO and News
SES SF 2010 - Whats Next for SEO and NewsSES SF 2010 - Whats Next for SEO and News
SES SF 2010 - Whats Next for SEO and NewsTopher Kohan
 
How to Use Online Video for Marketing
How to Use Online Video for MarketingHow to Use Online Video for Marketing
How to Use Online Video for MarketingHubSpot
 
The Zeitgeist Movement
The Zeitgeist MovementThe Zeitgeist Movement
The Zeitgeist Movementguest915c8c5
 

Similar to YouTube API: Dive In (20)

SEO And Podcasting Presentation
SEO And Podcasting PresentationSEO And Podcasting Presentation
SEO And Podcasting Presentation
 
Seo And Podcasting Presentation
Seo And Podcasting PresentationSeo And Podcasting Presentation
Seo And Podcasting Presentation
 
SMX@adtech: Mobile, Local and Video Search — Drew Hubbard
SMX@adtech: Mobile, Local and Video Search — Drew HubbardSMX@adtech: Mobile, Local and Video Search — Drew Hubbard
SMX@adtech: Mobile, Local and Video Search — Drew Hubbard
 
Multimedia Accessibility - CALRG '09
Multimedia Accessibility - CALRG '09Multimedia Accessibility - CALRG '09
Multimedia Accessibility - CALRG '09
 
Restful design at work v2.0
Restful design at work v2.0Restful design at work v2.0
Restful design at work v2.0
 
MALT Wiki and oEmbed
MALT Wiki and oEmbedMALT Wiki and oEmbed
MALT Wiki and oEmbed
 
API-Craft NYC - Overview of the Twitter APIs with demos
API-Craft NYC - Overview of the Twitter APIs with demosAPI-Craft NYC - Overview of the Twitter APIs with demos
API-Craft NYC - Overview of the Twitter APIs with demos
 
Flavours of SEO
Flavours of SEOFlavours of SEO
Flavours of SEO
 
Drupal Camp 2009 Pune Ilovebollycase Study 1233568636712224 1
Drupal Camp 2009 Pune Ilovebollycase Study 1233568636712224 1Drupal Camp 2009 Pune Ilovebollycase Study 1233568636712224 1
Drupal Camp 2009 Pune Ilovebollycase Study 1233568636712224 1
 
Supercharging WordPress for SEO
Supercharging WordPress for SEOSupercharging WordPress for SEO
Supercharging WordPress for SEO
 
Web REST APIs Design Principles
Web REST APIs Design PrinciplesWeb REST APIs Design Principles
Web REST APIs Design Principles
 
How to Rock Your Video Marketing
How to Rock Your Video MarketingHow to Rock Your Video Marketing
How to Rock Your Video Marketing
 
Dave Coleman slides from Learning Gateway Conference
Dave Coleman slides from Learning Gateway ConferenceDave Coleman slides from Learning Gateway Conference
Dave Coleman slides from Learning Gateway Conference
 
August 10th, 2009 Tom Rogers YouTube
August 10th, 2009 Tom Rogers YouTubeAugust 10th, 2009 Tom Rogers YouTube
August 10th, 2009 Tom Rogers YouTube
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
 
Pentesting Rest API's by :- Gaurang Bhatnagar
Pentesting Rest API's by :- Gaurang BhatnagarPentesting Rest API's by :- Gaurang Bhatnagar
Pentesting Rest API's by :- Gaurang Bhatnagar
 
SES SF 2010 - Whats Next for SEO and News
SES SF 2010 - Whats Next for SEO and NewsSES SF 2010 - Whats Next for SEO and News
SES SF 2010 - Whats Next for SEO and News
 
Carpe VM
Carpe VMCarpe VM
Carpe VM
 
How to Use Online Video for Marketing
How to Use Online Video for MarketingHow to Use Online Video for Marketing
How to Use Online Video for Marketing
 
The Zeitgeist Movement
The Zeitgeist MovementThe Zeitgeist Movement
The Zeitgeist Movement
 

Recently uploaded

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

YouTube API: Dive In

  • 1. YouTube API: Dive-In HigEdWebDev 2009 Ron West
  • 2. Google's mission …is to organize the world's information and make it universally accessible and useful. Sometimes making information accessible requires making it available in contexts other than a web browser.
  • 3. Agenda Introduction Getting Started Get Content Interaction Pulling it Together Developer Community
  • 4. Introduction YouTube in Review REST Google Data API YouTube Data API Entries/Feeds Authentication
  • 5.
  • 12.
  • 13. REST Client-Server Stateless Cacheable Uniform Interface Layered
  • 14. REST HTTP Methods Get = List or Retrieve Put = Replace or Update Post = Create Delete = Delete
  • 15.
  • 16. Lanugage, platform and transport agnostic
  • 17.
  • 18. Harder to develop with (requires tools)SOAP (RPC/Doc Literal) Web Services
  • 19.
  • 20. Simpler to develop than SOAP
  • 21.
  • 22. Tied to HTTP transportREST Web Services
  • 23.
  • 30.
  • 31. Response Codes Same response codes for HTTP 200, 201, 301, 400, 500 etc.. Codes have similar meaning for each type of call 200 (OK) 400 (Bad Request) 401 (Not Authorized) 404 (Not Found) 500 (Internal Error) Accompanied with error details (XML in payload)
  • 32. YouTube Data API Version 1 Version 2 (recommended)
  • 33. YouTubeData API Search for Videos Keywords (tags) Categories Query Params (metadata) Search for Playlists Keywords (tags) Categories Search for Channels Keywords (tags) Categories
  • 34. YouTube Data API Retrieve Videos Comments Captions Related Videos Video Responses Categories Keywords Playlists Subscriptions Profiles Contacts Messages Activity Feeds Insight Data Feed Favorites
  • 35. YouTube Data API (cont.) Create Videos Comments Captions Related Videos Video Responses Complaint Rating Contact Message Favorite Playlist Subscription
  • 36. YouTube Data API (cont.) Update Video Metadata Captions Profiles Playlists Contacts Delete Video Message Favorite Playlist Subscription Contact
  • 37. YouTube Data API Batch Processing Process multiple types of calls in a single request Each Request in its own <entry> tag
  • 38. Sample Interaction Query API for videos tagged with “SHU” Display Videos in List Allow user to Select Video to Display Display Single Video Retrieve Comments for that Video Post Comment Login Add to Playlist
  • 39. Feed <feed [namespaces]> … metadata … <openSearch:totalResults /> <openSearch:startIndex /> <openSearch: itemsPerPage /> <entry> … metadata … <media:group/> </entry> <entry> … metadata … <media:group/> </entry> … </feed>
  • 40. Entry (video) <entry [namespaces]> <title/> <content/> … metadata … <link rel=“http://gdata.youtube.com/schemas/2007#video.responses “/> <link rel=“http://gdata.youtube.com/schemas/2007#video.related” /> <link rel=“http://gdata.youtube.com/schemas/2007#mobile”/> <media:group> <media:contentyt:format=“t” url=“…”/> <media:thumbnailurl=“…” width=“…” height=“…”/> <yt: duration /> <yt:videoid /> </ media:group > </entry>
  • 41. Authentication AuthSub – YouTube Authentication with “callback” API [difficult] OAuth – Standardized Approach (similar in nature to OpenID) [most difficult] ClientLogin – Custom Authentication – you call YouTube API track token [easiest]
  • 42. Getting Started Google Developers Key Development Environment Samples
  • 43. Google Developers Key http://code.google.com/apis/youtube/dashboard/
  • 44. Development Environment Accessing dev servers Plugging in Developers Key
  • 45. Getting YouTube Content Standard Feeds Discovering Videos Channels Playlists Displaying Videos
  • 46. Standard Feeds http://code.google.com/apis/youtube/2.0/reference.html#Standard_feeds Top Rated Top Favorites Most Viewed Most Popular Most Recent Etc… Filter by Time Filter by Region Filter by Category
  • 47. Discovering Videos Keywords Categories Categories/Keywords Users
  • 48. Categories http://gdata.youtube.com/schemas/2007/categories.cat <app:categories [namespaces]> <atom:category term="Film" label="Film & Animation" xml:lang="en-US"> <yt:assignable/> <yt:browsable regions="AU BR CA CZ DE ES FR GB HK IE IL IN IT JP KR MX NL NZ PL PT RU SE TW US"/> </atom:category> </app>
  • 49. Video by Keyword/Tag http://gdata.youtube.com/feeds/api/videos/ Append /-/keyword/ to video feed URL Use query string ?category=keyword Not (-) Or (|) /-/Kennedy/-Bobby/-Ted/-Patrick /-/Kennedy/Bobby|Ted|Patrick
  • 50. Video by Category http://gdata.youtube.com/feeds/api/videos/ Append /-/Category/ to video feed URL Use query string ?category=Category Multiple Categories /-/Comedy/Music/Shortmov/ ?category=Comedy,Music,Shortmov Category ARE case sensitive
  • 51. Channels http://gdata.youtube.com/feeds/api/channels?v=2 Search just like videos using “?q=keywords/tags” <feed [namespaces> … metadata … <openSearch:totalResults /> <openSearch:startIndex /> <openSearch: itemsPerPage /> <entry> <title /> <summary /> <gd:feedlinkurl=“…” hitcount=“…”> </entry> </feed>
  • 52. Playlists http://gdata.youtube.com/feeds/api/playlists/snippets?v=2 Searchjustlike a Channel <feed [namespaces> … metadata … <openSearch:totalResults /> <openSearch:startIndex /> <openSearch: itemsPerPage /> <entry> <title /> <summary /> <content src=“…”> <yt:countHint /> <yt:playlistId /> </entry> </feed>
  • 54. Interacting with YouTube Content Authentication Comments Ratings Updating Uploading
  • 55. ClientLogin https://www.google.com/youtube/accounts/ClientLogin Pass in: Email Passwd Receive: Auth=AIwbFARksypDdUSGGYRI_5v7Z9TaijoPQqpIfCEjTFPAikn_---OC-I1VJtQ YouTubeUser=testuser Send into all requests: Header: Authorization = “GoogleLogin auth= AIwbFARksypDdUSGGYRI_5v7Z9TaijoPQqpIfCEjTFPAikn_---OC-I1VJtQ”
  • 56. Comments Get Video Feed Look for: <gd:comments> <gd:feedlinkhref=“…” countHint=“…” /> </gd:comments> Pass in
  • 57. Ratings Link embeded in the video feed <link rel='http://gdata.youtube.com/schemas/2007#video.ratings' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/VIDEO_ID/ratings'/> Send back to this URL: <entry [namespaces]> <gd:rating value="4" min="1" max="5"/> </entry>
  • 58. Updating Link embeded in the video feed <link rel='edit' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/andyland74/uploads/914IMX9RSTE'> Send Back to this URL: <entry [namespaces]> <media:group> <media:title type=“…“ /> <media:description type=“…“ /> <media:category scheme=“…“ /> <media:keywords /> </media:group> </entry>
  • 59. Uploading http://uploads.gdata.youtube.com/feeds/api/users Include in Header Authentication Slug (filename) Include in Body Video File <entry [namespace]> <media:group> <media:title type=”...” /> <media:description type=“…“ /> <media:keywords /> <media:categoryscheme=“…“ /> </media:group> </entry>
  • 60. Challenges Documentation is poor No true congruity in related links Error messages are non-descriptive
  • 61. Developer Resources Google Group http://groups.google.com/group/youtube-api-gdata Google Code Help http://code.google.com/support/bin/topic.py?topic=12357
  • 62. Contact Ron West @notronwest facebook.com/notronwest www.notronwest.com/blog