SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
Building Video Apps
with YouTube APIs : Workshop
                      Jarek Wilkiewicz
                    twitter.com/wjarek
               Mexico City, 03/31/2011
Agenda
 AppEngine - setup dev env
 Player API
    Exercise 1 : Run API example
    Exercise 2 : Modify API example
 Google YouTube Data API
    Exercise 3 : Run API example
 Google YouTube Data API + AppEngine
    Exercise 4 : Integrate YouTube API into
    AppEngine app
    Exercise 5 : Deploy
AppEngine - setup
  Download and install AppEngine SDK : http:
  //code.google.com/appengine/downloads.html#Google_App_Engine_SDK_for_Java

  Install Eclipse and Google Plugin as
  documented here https://sites.google.
  com/site/gdevelopercodelabs/app-engine/java-codelab

  Create and Run the "Guestbook" app
  You should see "Hello App Engine"



                                   Mac JDK issues ? See : http://code.google.
                                   com/p/googleappengine/issues/detail?id=4712#c39
Add a file : player.html
  Create player.
  html file under
  war/ directory
Player API : Exercise 1
  Read http://goo.gl/D30jK
  http://apiblog.youtube.com/2011/01/introducing-javascript-player-api-for.html

  Copy the code to player.html
  Run it and point your browser at http:
  //localhost:8888/player.html
  The playback should stop after 6000ms
  Modify the code to use different videoId
  and a timeout other than 6000ms
Player API : Exercise 2

  Continue with code from Exercise 1
  Modify the code to skip to second 20
  rather than stopping at second 6, and
  continue playing
  API info :
     http://code.google.com/apis/youtube/iframe_api_reference.html
     http://code.google.com/apis/youtube/js_api_reference.html
Player API : Exercise 2 Solution



function stopVideo() {
     player.seekTo(20, true);
  }
Using YouTube Google Data APIs
Exercise 3
Objective : Run sample API code

Steps :

1. Download Java Google Data Client Library and Samples
   JARs
2. Add Java Client Library JARs and dependencies to your
   project
3. Copy YouTubeReadonlyClient.java sample into your project
   and adjust package name
4. Run YouTubeReadonlyClient from Eclipse
Google Data API : setup
Exercise 3
  Download the Java Client Library (1.43.0 source and
  1.43.0 samples) : http://code.google.com/p/gdata-java-
  client/downloads/list
Google Data API : setup libs
  Exercise 3
        Unzip the gdata-src.java-1.43.0.zip
        Copy gdata jars (gdata/java/lib)to
      GuestbookwarWEB-INFlib
        Copy gdata dep jars (gdata/java/deps)to
     GuestbookwarWEB-INFlib




 gdata/java/lib$ cp * ~/projects/workspace/Guestbook/war/WEB-INF/lib/
gdata/java/deps$ cp * ~/projects/workspace/Guestbook/war/WEB-INF/lib/
Google Data API : Add JARs
Exercise 3
  Update build path (Project/Properties/Java Build Path/Libraries/Add JARs)
  to include the jar
  Refresh
Google Data API : Add Sample
Exercise 3
    Add YouTubeReadOnly.java from gdata-samples.java-1.43.0.
    zip to your project src directory
    Modify package to package guestbook




gdata-samples/java/sample/youtube$ cp YouTubeReadonlyClient.java ~/projects/workspace/Guestbook/src/guestbook
Google Data API : Run Sample
Exercise 3
  Run YouTubeReadOnly ( option 2 Print Search Feed)
Google Data API : Example Output
Integrate YouTube API invocation into an
AppEngine app
Exercise 4
  Objective : include YouTube search results
  in GuestbookServlet.java output
  Steps : reuse implementation of private static void
  searchFeed(YouTubeService service) in your servlet
  Modify the printVideoEntry implementation to print using
  PrintWriter
Exercise 4 : move searchFeed to
GuestBookServlet
Exercise 4 : move searchFeed to
GuestBookServlet
Exercise 4 : modify doGet
  Now modify doGet to use searchFeed in your servlet, replace System.
  out references with HttpServletResponse.getWriter()
Google Data API : Dev Key
Exercise 4
  Register for YouTube developer key : http://code.google.
  com/apis/youtube/dashboard
  Use it in your app YouTubeService myService = new YouTubeService
  ("gdataSample-YouTube-1", "AI39...")
Exercise 4 : run your code
Exercise 5 : Create AppEngine App
  Follow the instructions here to create AppEngine application : https://sites.
  google.com/site/gdevelopercodelabs/app-engine/creating-your-app-
  engine-account
  Modify appengine-web.xml and specify the application name
Exercise 5 : Deploy to AppEngine
  Deploy to AppEngine
  Try http://your-application-name.appspot.com

Más contenido relacionado

La actualidad más candente

SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
Fred Sauer
 
Mobile Meow at Mobilism
Mobile Meow at MobilismMobile Meow at Mobilism
Mobile Meow at Mobilism
Greg Schechter
 

La actualidad más candente (20)

JS Days Mobile Meow
JS Days Mobile MeowJS Days Mobile Meow
JS Days Mobile Meow
 
Web DU Mobile Meow
Web DU Mobile MeowWeb DU Mobile Meow
Web DU Mobile Meow
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
 
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
 
The Role of Python in SPAs (Single-Page Applications)
The Role of Python in SPAs (Single-Page Applications)The Role of Python in SPAs (Single-Page Applications)
The Role of Python in SPAs (Single-Page Applications)
 
HTML5, Flash, and the Battle For Faster Cat Videos
HTML5, Flash, and the Battle For Faster Cat VideosHTML5, Flash, and the Battle For Faster Cat Videos
HTML5, Flash, and the Battle For Faster Cat Videos
 
WordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopWordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute Workshop
 
Writing first-hudson-plugin
Writing first-hudson-pluginWriting first-hudson-plugin
Writing first-hudson-plugin
 
JS Days HTML5 Flash and the Battle for Faster Cat Videos
JS Days HTML5 Flash and the Battle for Faster Cat VideosJS Days HTML5 Flash and the Battle for Faster Cat Videos
JS Days HTML5 Flash and the Battle for Faster Cat Videos
 
Os Johnson
Os JohnsonOs Johnson
Os Johnson
 
Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview
 
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
 
WordCamp Raleigh WordPress & Social Media Integration
WordCamp Raleigh WordPress & Social Media IntegrationWordCamp Raleigh WordPress & Social Media Integration
WordCamp Raleigh WordPress & Social Media Integration
 
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
 
Gae
GaeGae
Gae
 
Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018
 
Mobile Meow at Mobilism
Mobile Meow at MobilismMobile Meow at Mobilism
Mobile Meow at Mobilism
 
So, you want to be a plugin developer?
So, you want to be a plugin developer?So, you want to be a plugin developer?
So, you want to be a plugin developer?
 
Developing Android Apps
Developing Android AppsDeveloping Android Apps
Developing Android Apps
 

Destacado

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
Apigee | Google Cloud
 
YouTube API Japan UG #1
YouTube API Japan UG #1YouTube API Japan UG #1
YouTube API Japan UG #1
Yukio Andoh
 
IT-youtube Presentation
IT-youtube PresentationIT-youtube Presentation
IT-youtube Presentation
safiya999
 

Destacado (17)

4w 1h with youtube api
4w 1h with youtube api4w 1h with youtube api
4w 1h with youtube api
 
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
 
Why APIs are Different Than Integration
Why APIs are Different Than IntegrationWhy APIs are Different Than Integration
Why APIs are Different Than Integration
 
Google {Learning} Analytics GEUG14
Google {Learning} Analytics GEUG14 Google {Learning} Analytics GEUG14
Google {Learning} Analytics GEUG14
 
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
 
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
 
How to Achieve Agile API Security
How to Achieve Agile API SecurityHow to Achieve Agile API Security
How to Achieve Agile API Security
 
Approval Template
Approval TemplateApproval Template
Approval Template
 
IT-youtube Presentation
IT-youtube PresentationIT-youtube Presentation
IT-youtube Presentation
 
Youtube Presentation
Youtube PresentationYoutube Presentation
Youtube Presentation
 
Presentation - you tube
Presentation - you tubePresentation - you tube
Presentation - you tube
 
YouTube Powerpoint
YouTube PowerpointYouTube Powerpoint
YouTube Powerpoint
 
YouTube Presentation
YouTube PresentationYouTube Presentation
YouTube Presentation
 
API Business Models
API Business ModelsAPI Business Models
API Business Models
 

Similar a YouTube APIs Workshop

Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptxLecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
NgLQun
 
Reverse engineering Java et contournement du mécanisme de paiement inapp Android
Reverse engineering Java et contournement du mécanisme de paiement inapp AndroidReverse engineering Java et contournement du mécanisme de paiement inapp Android
Reverse engineering Java et contournement du mécanisme de paiement inapp Android
JUG Lausanne
 

Similar a YouTube APIs Workshop (20)

Google App Engine tutorial
Google App Engine tutorialGoogle App Engine tutorial
Google App Engine tutorial
 
Google App Engine (Introduction)
Google App Engine (Introduction)Google App Engine (Introduction)
Google App Engine (Introduction)
 
Automation Zaman Now
Automation Zaman NowAutomation Zaman Now
Automation Zaman Now
 
Android Automation Using Robotium
Android Automation Using RobotiumAndroid Automation Using Robotium
Android Automation Using Robotium
 
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptxLecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
 
Recap of Android Dev Summit 2018
Recap of Android Dev Summit 2018Recap of Android Dev Summit 2018
Recap of Android Dev Summit 2018
 
The Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror APIThe Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror API
 
Introduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google CloudIntroduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google Cloud
 
Firebase play-games-services-unity
Firebase play-games-services-unityFirebase play-games-services-unity
Firebase play-games-services-unity
 
Hacking the Codename One Source Code - Part IV - Transcript.pdf
Hacking the Codename One Source Code - Part IV - Transcript.pdfHacking the Codename One Source Code - Part IV - Transcript.pdf
Hacking the Codename One Source Code - Part IV - Transcript.pdf
 
OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010
 
Cis 329 lab 1 to 15
Cis 329 lab 1 to 15Cis 329 lab 1 to 15
Cis 329 lab 1 to 15
 
Integrating GoogleFit into Android Apps
Integrating GoogleFit into Android AppsIntegrating GoogleFit into Android Apps
Integrating GoogleFit into Android Apps
 
Gradle Play Publisher Plugin
Gradle Play Publisher PluginGradle Play Publisher Plugin
Gradle Play Publisher Plugin
 
Hands on SPA development
Hands on SPA developmentHands on SPA development
Hands on SPA development
 
Compose Camp-intro.pptx
Compose Camp-intro.pptxCompose Camp-intro.pptx
Compose Camp-intro.pptx
 
Reverse engineering Java et contournement du mécanisme de paiement inapp Android
Reverse engineering Java et contournement du mécanisme de paiement inapp AndroidReverse engineering Java et contournement du mécanisme de paiement inapp Android
Reverse engineering Java et contournement du mécanisme de paiement inapp Android
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
TDC2016SP - Trilha Android
TDC2016SP - Trilha AndroidTDC2016SP - Trilha Android
TDC2016SP - Trilha Android
 
Remote Config REST API and Versioning
Remote Config REST API and VersioningRemote Config REST API and Versioning
Remote Config REST API and Versioning
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

YouTube APIs Workshop

  • 1. Building Video Apps with YouTube APIs : Workshop Jarek Wilkiewicz twitter.com/wjarek Mexico City, 03/31/2011
  • 2. Agenda AppEngine - setup dev env Player API Exercise 1 : Run API example Exercise 2 : Modify API example Google YouTube Data API Exercise 3 : Run API example Google YouTube Data API + AppEngine Exercise 4 : Integrate YouTube API into AppEngine app Exercise 5 : Deploy
  • 3. AppEngine - setup Download and install AppEngine SDK : http: //code.google.com/appengine/downloads.html#Google_App_Engine_SDK_for_Java Install Eclipse and Google Plugin as documented here https://sites.google. com/site/gdevelopercodelabs/app-engine/java-codelab Create and Run the "Guestbook" app You should see "Hello App Engine" Mac JDK issues ? See : http://code.google. com/p/googleappengine/issues/detail?id=4712#c39
  • 4. Add a file : player.html Create player. html file under war/ directory
  • 5. Player API : Exercise 1 Read http://goo.gl/D30jK http://apiblog.youtube.com/2011/01/introducing-javascript-player-api-for.html Copy the code to player.html Run it and point your browser at http: //localhost:8888/player.html The playback should stop after 6000ms Modify the code to use different videoId and a timeout other than 6000ms
  • 6. Player API : Exercise 2 Continue with code from Exercise 1 Modify the code to skip to second 20 rather than stopping at second 6, and continue playing API info : http://code.google.com/apis/youtube/iframe_api_reference.html http://code.google.com/apis/youtube/js_api_reference.html
  • 7. Player API : Exercise 2 Solution function stopVideo() { player.seekTo(20, true); }
  • 8. Using YouTube Google Data APIs Exercise 3 Objective : Run sample API code Steps : 1. Download Java Google Data Client Library and Samples JARs 2. Add Java Client Library JARs and dependencies to your project 3. Copy YouTubeReadonlyClient.java sample into your project and adjust package name 4. Run YouTubeReadonlyClient from Eclipse
  • 9. Google Data API : setup Exercise 3 Download the Java Client Library (1.43.0 source and 1.43.0 samples) : http://code.google.com/p/gdata-java- client/downloads/list
  • 10. Google Data API : setup libs Exercise 3 Unzip the gdata-src.java-1.43.0.zip Copy gdata jars (gdata/java/lib)to GuestbookwarWEB-INFlib Copy gdata dep jars (gdata/java/deps)to GuestbookwarWEB-INFlib gdata/java/lib$ cp * ~/projects/workspace/Guestbook/war/WEB-INF/lib/ gdata/java/deps$ cp * ~/projects/workspace/Guestbook/war/WEB-INF/lib/
  • 11. Google Data API : Add JARs Exercise 3 Update build path (Project/Properties/Java Build Path/Libraries/Add JARs) to include the jar Refresh
  • 12. Google Data API : Add Sample Exercise 3 Add YouTubeReadOnly.java from gdata-samples.java-1.43.0. zip to your project src directory Modify package to package guestbook gdata-samples/java/sample/youtube$ cp YouTubeReadonlyClient.java ~/projects/workspace/Guestbook/src/guestbook
  • 13. Google Data API : Run Sample Exercise 3 Run YouTubeReadOnly ( option 2 Print Search Feed)
  • 14. Google Data API : Example Output
  • 15. Integrate YouTube API invocation into an AppEngine app Exercise 4 Objective : include YouTube search results in GuestbookServlet.java output Steps : reuse implementation of private static void searchFeed(YouTubeService service) in your servlet Modify the printVideoEntry implementation to print using PrintWriter
  • 16. Exercise 4 : move searchFeed to GuestBookServlet
  • 17. Exercise 4 : move searchFeed to GuestBookServlet
  • 18. Exercise 4 : modify doGet Now modify doGet to use searchFeed in your servlet, replace System. out references with HttpServletResponse.getWriter()
  • 19. Google Data API : Dev Key Exercise 4 Register for YouTube developer key : http://code.google. com/apis/youtube/dashboard Use it in your app YouTubeService myService = new YouTubeService ("gdataSample-YouTube-1", "AI39...")
  • 20. Exercise 4 : run your code
  • 21. Exercise 5 : Create AppEngine App Follow the instructions here to create AppEngine application : https://sites. google.com/site/gdevelopercodelabs/app-engine/creating-your-app- engine-account Modify appengine-web.xml and specify the application name
  • 22. Exercise 5 : Deploy to AppEngine Deploy to AppEngine Try http://your-application-name.appspot.com