pushwoosh的python客户端
pypushwoosh的Python项目详细描述
pushwoosh python库
支持的API版本:1.3
开始
典型用法通常如下:
#!/usr/bin/env python from pypushwoosh.client import PushwooshClient from pypushwoosh.command import CreateTargetedMessageCommand from pypushwoosh.filter import ApplicationFilter command = CreateTargetedMessageCommand() command.auth = 'AUTH_TOKEN' command.devices_filter = ApplicationFilter('APP-CODE') command.content = "Hello world!" client = PushwooshClient() print client.invoke(command)
功能
目前,pypushwoosh支持:
- 消息命令:
- 为应用程序命令创建消息
- createMessageforApplicationGroup命令
- createTargetedMessage命令
- compilefilter命令
- 删除消息命令
- 设备命令:
- 注册表设备命令
- gettagscommand
- settags命令
- setbadge命令
- pushstat命令
- 获取最接近的分区命令
对于目标邮件,支持:
- ApplicationFilter and ApplicationGroupFilter filters
- Tag filters: IntegerTagFilter, StringTagFilter, ListTagFilter, DateTagFilter, DaysTagFilter, BooleanTagFilter
- Tags filters by application
- Operations filters: UnionFilter, IntersectFilter, SubtractFilter
安装
通过pip:
安装$ pip install pypushwoosh
从源安装:
$ git clone git://github.com/Pushwoosh/pushwoosh-python-lib.git $ cd pushwoosh-python-lib $ python setup.py install