airgram api的包装器
airgram的Python项目详细描述
用于调用Airgram API的python包装器,它使您能够向移动设备发送推送通知。
由于它是一个非常浅的包装器,您可以参考official api reference来获得有关函数的详细信息。
示例
在撰写本文时(2015-08-20),airgram使用了错误的证书(see),这些证书是为herokuapp.com准备的。因为这个证书验证需要关闭。
作为客人使用
fromairgramimportAirgramag=Airgram(verify_certs=False)# Send a message to a userag.send_as_guest("your@email.com","Test message from Airgram API","http://example.com")
与经过身份验证的Airgram服务一起使用
fromairgramimportAirgramag=Airgram(key="MY_SERVICE_KEY",secret="MY_SERVICE_SECRET",verify_certs=False)# Subscribe an email to the serviceag.subscribe("your@email.com")# Send a message to a subscriberag.send("your@email.com","Hello, how are you?")# Send a message to ALL subscribersag.broadcast("Airgram for python is awesome",url="https://github.com/the01/python-airgram")
历史记录
0.1.3(2015-08-25)
错误修复
- 已添加manifest.in(修复安装问题)
0.1.2(2015-08-21)
错误修复
- 更正错误的API URL
0.1.1(2015-08-21)
- 添加模块记录器
- 添加类记录器
- 函数在失败时抛出AirGrameException
0.1.0(2015-07-30)
- pypi上的第一个版本。