Permalink
Browse files

Youtube API settings to run on App Engine.

  • Loading branch information...
1 parent 82173b8 commit 2ca5ba90e63ae716d7a4ae0a098abb01c6eda47e @guilhermechapiewski committed Apr 20, 2010
Showing with 3 additions and 2 deletions.
  1. +1 −1 app.yaml
  2. +2 −1 index.py
View
@@ -1,5 +1,5 @@
application: youtube-api
-version: 5
+version: 1
runtime: python
api_version: 1
View
@@ -1,6 +1,7 @@
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
+from gdata.alt.appengine import run_on_appengine
from gdata.youtube.service import YouTubeService
class VideoResource(webapp.RequestHandler):
@@ -11,7 +12,7 @@ def get(self):
video_id = self.request.get('id', default_value='')
video = None
try:
- yt = YouTubeService()
+ yt = run_on_appengine(YouTubeService())
video = yt.GetYouTubeVideoEntry(video_id=video_id)
except Exception, e:
pass #will return empty result :)

0 comments on commit 2ca5ba9

Please sign in to comment.