Created
October 17, 2011 18:52
-
-
Save dyoder/1293449 to your computer and use it in GitHub Desktop.
Create A Subscription
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
a.accept "subscription", (a) -> | |
a.describe "Create a subscription" | |
a.contentType "subscription", (a) -> | |
a.run (object) -> | |
context = this | |
manager = new Channel.Manager | |
manager.on "success",(channel) -> | |
create = CREATE Subscription, (subscription) -> | |
subscription.url = context.url("subscription", [ | |
context.workspace.captured.sessionID | |
subscription.id | |
]) | |
object.channel = channel | |
create.call context, object | |
manager.on "error", -> | |
context.emit("not found") | |
manager.get(context.workspace.captured.resourceID) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment