Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Commit

Permalink
preparing for public release
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvinus committed Jul 1, 2011
1 parent 2db2c80 commit b7f31c6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
10 changes: 10 additions & 0 deletions README
@@ -0,0 +1,10 @@
REST API for TED Talks.

Hosted on http://ted-api.appspot.com/rest/v1/json/

Uses http://code.google.com/p/appengine-rest-server/ as API base

Checkout the Models in the appengine/models.py file and you should be able to make queries.

Example:
http://ted-api.appspot.com/rest/v1/json/Talk?offset=1
6 changes: 4 additions & 2 deletions appengine/index.py
Expand Up @@ -5,6 +5,8 @@

import models

from django.utils import simplejson

rest.Dispatcher.add_models_from_module(models)

class JSONDispatcher(rest.Dispatcher):
Expand All @@ -15,11 +17,11 @@ class XMLDispatcher(rest.Dispatcher):
content_type_order = [rest.XML_CONTENT_TYPE]
base_url="/rest/v1/xml"



application = webapp.WSGIApplication([
('/rest/v1/json/.*', JSONDispatcher),
('/rest/v1/xml/.*', XMLDispatcher),

('/rest/v1/xml/.*', XMLDispatcher)
],debug=True)

def main():
Expand Down
2 changes: 1 addition & 1 deletion appengine/models.py
Expand Up @@ -16,7 +16,7 @@ class Theme(db.Model):
name = db.StringProperty(required=True)

class Tag(db.Model):
tedid = db.IntegerProperty(required=True)
tedid = db.StringProperty(required=True)
name = db.StringProperty(required=True)

class Talk(db.Model):
Expand Down

0 comments on commit b7f31c6

Please sign in to comment.