我有一个简单的Web服务应用程序,我用它来测试通过Parse.com从Python发送推送。
我的应用使用Flask模块和ParsePy module。下面列出的代码适用于Push.alert(notification, channels=["pushDebug"])
- 我在订阅该频道的设备上看到了通知。
现在我正在尝试将推送发送到特定设备ID,但我没有看到通知。
为特定用户ID(在Parse中定义的自定义字段)定义“Where”查询的正确语法是什么?以下是需要此查询的代码行:{{1} }
我找到的例子
Push.alert(notification, where={"kDeviceID": str(deviceID)})
或(taken from parse official documentation)
Push.alert({"alert": "The Mets scored! The game is now tied 1-1.",
"badge": "Increment", "title": "Mets Score"}, channels=["Mets"],
where={"scores": True})
我的网络服务:
"where": {
"user_id": "user_123"
}