MCPcopy
hub / github.com/liuwons/wxBot / status_notify

Method status_notify

wxbot.py:663–676  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

661 return dic['BaseResponse']['Ret'] == 0
662
663 def status_notify(self):
664 url = self.base_uri + '/webwxstatusnotify?lang=zh_CN&pass_ticket=%s' % self.pass_ticket
665 self.base_request['Uin'] = int(self.base_request['Uin'])
666 params = {
667 'BaseRequest': self.base_request,
668 "Code": 3,
669 "FromUserName": self.user['UserName'],
670 "ToUserName": self.user['UserName'],
671 "ClientMsgId": int(time.time())
672 }
673 r = self.session.post(url, data=json.dumps(params))
674 r.encoding = 'utf-8'
675 dic = json.loads(r.text)
676 return dic['BaseResponse']['Ret'] == 0
677
678 def test_sync_check(self):
679 for host in ['webpush', 'webpush2']:

Callers 1

runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected