我目前使用parse_rest在Python中使用此代码,它可以工作:
Push.alert({
'foo': 1,
'bar': 2
}, where={'special_condition': true})
如何使用the Javascript library在node.js中编写等效代码?像这样的东西? (在coffeescript中)
query = new Parse.Query(Parse.Installation)
query.equalTo('special_condition', true);
Parse.Push.send
data: 'foo': 1, 'bar': 2
where: query
答案 0 :(得分:0)
这对我有用:
query = new Parse.Query(Parse.Installation)
query.equalTo('special_condition', true)
data = { 'foo': 1, 'bar': 2 }
success = -> console.log "push was successful"
error = (e) -> console.error e
Parse.Push.send({ data: data, where: query }, success: success, error: error)