Skip to content

Instantly share code, notes, and snippets.

@Deepwalker
Created September 14, 2011 16:22
Show Gist options
  • Save Deepwalker/1217004 to your computer and use it in GitHub Desktop.
Save Deepwalker/1217004 to your computer and use it in GitHub Desktop.
import bundle
class Room(bundle.APIBundle):
@bundle.expose('/<int:id>')
def get(self, id):
"Return room info"
return {}
@bundle.expose('/<int:id>/message', methods=['POST'])
def post_message(self, id):
"Post new message"
# create new message in given room
return 'Done, my master.'
Room('room', '/room').push_bundle(app)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment