sendsay api客户端库。
sendsay-api-python的Python项目详细描述
一个支持Sendsay API的客户端库。代码块::shell
dependencies
===
*如果python版本早于2.7.9,需要以下软件包才能支持TLS SNI证书检查:
*ndg httpsclient
*pyopenssl
*pyasn1
Usage
=====
代码块::python
代码块::Python
BR/>调用参数为DIST
响应=API。请求(“成员”。SET),{“电子邮件”:“Test1K@ Test.Ru”,“AdDryType”:“电子邮件”,“IFION存在”:“重写”,“NeBee.Upvice”:0,“return_fresh_obj”:1})
代码块::python
response=api.request('issue.send',{
'sendhen':'now',
'letter':{
'subject':'subject',
'from.name':'tester',
'from.email':“test@test.ru”,
'message':{
'html':“sendsay api客户端测试消息<;hr>;你好!
},
'附加':[
api.attach廑file(“sample.jpg”)
],
},
'重新链接':1,
'用户列表':“test1@test.ru\ntest2@test.ru”,
'组':'群发',
})
def track_process(resp,status_msg):
打印('-%s'%status_msg)#打印状态消息,例如
,
最大尝试次数=100
)
dependencies
===
*如果python版本早于2.7.9,需要以下软件包才能支持TLS SNI证书检查:
*ndg httpsclient
*pyopenssl
*pyasn1
Usage
=====
代码块::python
代码块::Python
BR/>调用参数为DIST
响应=API。请求(“成员”。SET),{“电子邮件”:“Test1K@ Test.Ru”,“AdDryType”:“电子邮件”,“IFION存在”:“重写”,“NeBee.Upvice”:0,“return_fresh_obj”:1})
代码块::python
response=api.request('issue.send',{
'sendhen':'now',
'letter':{
'subject':'subject',
'from.name':'tester',
'from.email':“test@test.ru”,
'message':{
'html':“sendsay api客户端测试消息<;hr>;你好!
},
'附加':[
api.attach廑file(“sample.jpg”)
],
},
'重新链接':1,
'用户列表':“test1@test.ru\ntest2@test.ru”,
'组':'群发',
})
def track_process(resp,status_msg):
打印('-%s'%status_msg)#打印状态消息,例如
,
最大尝试次数=100
)