Notification(通知)
更新时间:2020-02-18
创建通知
如果需要创建一个通知,可以参考如下代码:
Plain Text
1name = "your_notification"
2endpoint = "your_endpoint"
3response = client.create_notification(name, endpoint)
4print response
查询指定通知
如果需要查询一个通知,可以参考如下代码:
Plain Text
1name = "your_notification"
2response = client.get_notification(name)
3print response
查询当前用户通知
如果需要查询出本用户所创建的全部通知,可以参考如下代码:
Plain Text
1response = client.list_notifications()
2print response
删除通知
如果需要删除某个已知name的通知,可以参考如下代码:
Plain Text
1name = "your_notification"
2response = client.delete_notification(name)
3print response