Created
September 14, 2011 16:22
-
-
Save Deepwalker/1217004 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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