Skip to content

Instantly share code, notes, and snippets.

@bithavoc
Last active December 10, 2015 23:30
Show Gist options
  • Save bithavoc/4509605 to your computer and use it in GitHub Desktop.
Save bithavoc/4509605 to your computer and use it in GitHub Desktop.
Command with Fauna Sub Requests
// POST /commands result
{
"resource" : {
"ref" : "commands/reply_message",
"ts" : 1357900098422864,
"name" : "reply_message",
"comment" : "Reply a Message",
"actions" : [ {
"method" : "POST",
"path" : "/v0/instances",
"body" : {
"class" : "message",
"data" : {
"body" : "$body"
}
}
}, {
"method" : "POST",
"path" : "/v0/classes/message/timelines/chat/",
"body" : {
"resource" : "${$0.resource.ref}"
}
} ],
"deleted" : false
},
"references" : { }
}
// result:
{
"error" : "Bad Request",
"param_errors" : {
"resource" : "Invalid resource ref."
}
}
@evan
Copy link

evan commented Jan 12, 2013

This is our fault. Fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment