Skip to content

Instantly share code, notes, and snippets.

@dyoder
Created October 17, 2011 18:52
Show Gist options
  • Save dyoder/1293449 to your computer and use it in GitHub Desktop.
Save dyoder/1293449 to your computer and use it in GitHub Desktop.
Create A Subscription
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