又一个onesignal api客户端
yaosac的Python项目详细描述
我不喜欢开馆。
此客户端是RESTful server API的映射。有一种方法 对于每个带有相应参数的api端点。只有两个 方法引发异常创建通知 查看通知。在所有其他情况下你都会得到错误 从响应中的api。
客户端的方法名是小写的端点名 用下划线替换的空格。取决于你叫你的方法 需要一个User Auth Key or an App Auth Key or an App Id。他们 可以设置为环境变量“os_user_auth_key”, “os_app_auth_key”和“os_app_id”或通过 应用程序验证密钥,用户验证密钥和应用程序ID属性。
安装
pip install yaosac
用法
import yaosac # Send a notification yaosac.client.create_notification(player_ids) # Get a notification notification_id = 'a-notification-id-you-keep-somewhere' notification = yaosac.client.view_notification(notification_id)
贡献/测试
python3 setup.py test