@@ -15,7 +15,7 @@ def set_user_info(self, user_id, name, icon, extra=None):
15
15
self ._user_info = self ._render (param_dict , format_str )
16
16
17
17
def broadcast (self , from_user_id , object_name , content , push_content = None , push_data = None , os = None ,
18
- content_available = 0 , disable_push = False , push_ext = None ):
18
+ content_available = 0 , push_ext = None ):
19
19
"""
20
20
单个应用每小时只能发送 2 次,每天最多发送 3 次。如需要调整发送频率,可联系销售,电话 13161856839。
21
21
:param from_user_id: 发送人用户 Id。(必传)
@@ -35,7 +35,6 @@ def broadcast(self, from_user_id, object_name, content, push_content=None, push_
35
35
:param content_available: 针对 iOS 平台,对 SDK 处于后台暂停状态时为静默推送,是 iOS7 之后推出的一种推送方式。
36
36
允许应用在收到通知后在后台运行一段代码,且能够马上执行,查看详细。
37
37
1 表示为开启,0 表示为关闭,默认为 0。(非必传)
38
- :param disable_push 是否为静默消息,默认为 false,设为 true 时终端用户离线情况下不会收到通知提醒。暂不支持海外数据中心(非必传)
39
38
:param push_ext 推送通知属性设置,详细查看 pushExt 结构说明,pushExt 为 JSON 结构请求时需要做转义处理。disablePush 为 true 时此属性无效。暂不支持海外数据中心(非必传)
40
39
:return: 请求返回结果,code 返回码,200 为正常。如:{"code":200}
41
40
"""
@@ -49,7 +48,6 @@ def broadcast(self, from_user_id, object_name, content, push_content=None, push_
49
48
'{% if push_data is not none %}&pushData={{ push_data }}{% endif %}' \
50
49
'{% if os is not none %}&os={{ os }}{% endif %}' \
51
50
'{% if content_available != 0 %}&contentAvailable={{ content_available }}{% endif %}' \
52
- '{% if disable_push != False %}&disablePush={{ disable_push }}{% endif %}' \
53
51
'{% if push_ext is not none %}&pushExt={{ push_ext }}{% endif %}'
54
52
try :
55
53
self ._check_param (from_user_id , str , '1~64' )
@@ -59,7 +57,6 @@ def broadcast(self, from_user_id, object_name, content, push_content=None, push_
59
57
self ._check_param (push_data , str )
60
58
self ._check_param (os , str )
61
59
self ._check_param (content_available , int , '0~1' )
62
- self ._check_param (disable_push , bool )
63
60
self ._check_param (push_ext , str )
64
61
return self ._http_post (url , self ._render (param_dict , format_str ))
65
62
except ParamException as e :
@@ -159,7 +156,7 @@ def send(self, from_user_id, to_user_ids, object_name, content, push_content=Non
159
156
except ParamException as e :
160
157
return json .loads (str (e ))
161
158
162
- def recall (self , from_user_id , target_id , uid , sent_time , is_admin = 0 , is_delete = 0 , extra = None , disable_push = False ):
159
+ def recall (self , from_user_id , target_id , uid , sent_time , is_admin = 0 , is_delete = 0 , extra = None ):
163
160
"""
164
161
撤回已发送的单聊消息,撤回时间无限制,只允许撤回用户自己发送的消息。
165
162
:param from_user_id: 消息发送人用户 Id。(必传)
@@ -171,7 +168,6 @@ def recall(self, from_user_id, target_id, uid, sent_time, is_admin=0, is_delete=
171
168
:param is_delete: 是否删除消息,默认为 0 撤回该条消息同时,用户端将该条消息删除并替换为一条小灰条撤回提示消息;
172
169
为 1 时,该条消息删除后,不替换为小灰条提示消息。(非必传)
173
170
:param extra: 扩展信息,可以放置任意的数据内容。(非必传)
174
- :param disable_push 是否为静默消息,默认为 false,设为 true 时终端用户离线情况下不会收到通知提醒。暂不支持海外数据中心(非必传)
175
171
:return: 返回码,200 为正常。如:{"code":200}
176
172
"""
177
173
param_dict = locals ().copy ()
@@ -183,8 +179,7 @@ def recall(self, from_user_id, target_id, uid, sent_time, is_admin=0, is_delete=
183
179
'&sentTime={{ sent_time }}' \
184
180
'{% if is_admin is not none %}&isAdmin={{ is_admin }}{% endif %}' \
185
181
'{% if is_delete is not none %}&isDelete={{ is_delete }}{% endif %}' \
186
- '{% if extra is not none %}&extra={{ extra }}{% endif %}' \
187
- '{% if disable_push != False %}&disablePush={{ disable_push }}{% endif %}'
182
+ '{% if extra is not none %}&extra={{ extra }}{% endif %}'
188
183
try :
189
184
self ._check_param (from_user_id , str , '1~64' )
190
185
self ._check_param (target_id , str , '1~64' )
@@ -193,7 +188,6 @@ def recall(self, from_user_id, target_id, uid, sent_time, is_admin=0, is_delete=
193
188
self ._check_param (is_admin , int )
194
189
self ._check_param (is_delete , int )
195
190
self ._check_param (extra , str )
196
- self ._check_param (disable_push , bool )
197
191
return self ._http_post (url , self ._render (param_dict , format_str ))
198
192
except ParamException as e :
199
193
return json .loads (str (e ))
@@ -444,7 +438,7 @@ def send_direction(self, from_user_id, to_group_id, to_user_ids, object_name, co
444
438
except ParamException as e :
445
439
return json .loads (str (e ))
446
440
447
- def recall (self , from_user_id , group_id , uid , sent_time , is_admin = None , is_delete = None , extra = None , disable_push = False ):
441
+ def recall (self , from_user_id , group_id , uid , sent_time , is_admin = None , is_delete = None , extra = None ):
448
442
"""
449
443
撤回已发送的群聊消息,撤回时间无限制,只允许撤回用户自己发送的消息。
450
444
:param from_user_id: 消息发送人用户 Id。(必传)
@@ -456,7 +450,6 @@ def recall(self, from_user_id, group_id, uid, sent_time, is_admin=None, is_delet
456
450
:param is_delete: 是否删除消息,默认为 0 撤回该条消息同时,用户端将该条消息删除并替换为一条小灰条撤回提示消息;
457
451
为 1 时,该条消息删除后,不替换为小灰条提示消息。(非必传)
458
452
:param extra: 扩展信息,可以放置任意的数据内容。(非必传)
459
- :param disable_push 是否为静默消息,默认为 false,设为 true 时终端用户离线情况下不会收到通知提醒。暂不支持海外数据中心(非必传)
460
453
:return: 请求返回结果,code 返回码,200 为正常。如:{"code":200}
461
454
"""
462
455
param_dict = locals ().copy ()
@@ -468,8 +461,7 @@ def recall(self, from_user_id, group_id, uid, sent_time, is_admin=None, is_delet
468
461
'&sentTime={{ sent_time }}' \
469
462
'{% if is_admin is not none %}&isAdmin={{ is_admin }}{% endif %}' \
470
463
'{% if is_delete is not none %}&isDelete={{ is_delete }}{% endif %}' \
471
- '{% if extra is not none %}&extra={{ extra }}{% endif %}' \
472
- '{% if disable_push != False %}&disablePush={{ disable_push }}{% endif %}'
464
+ '{% if extra is not none %}&extra={{ extra }}{% endif %}'
473
465
try :
474
466
self ._check_param (from_user_id , str , '1~64' )
475
467
self ._check_param (group_id , str , '1~64' )
@@ -478,7 +470,6 @@ def recall(self, from_user_id, group_id, uid, sent_time, is_admin=None, is_delet
478
470
self ._check_param (is_admin , int )
479
471
self ._check_param (is_delete , int )
480
472
self ._check_param (extra , str )
481
- self ._check_param (disable_push , bool )
482
473
return self ._http_post (url , self ._render (param_dict , format_str ))
483
474
except ParamException as e :
484
475
return json .loads (str (e ))
0 commit comments