1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| def search_friends(self, name=None, userName=None, remarkName=None, nickName=None, wechatAccount=None): return self.storageClass.search_friends(name, userName, remarkName, nickName, wechatAccount)
def search_chatrooms(self, name=None, userName=None): return self.storageClass.search_chatrooms(name, userName) def send_msg(self, msg='Test Message', toUserName=None): ''' send plain text message for options - msg: should be unicode if there's non-ascii words in msg - toUserName: 'UserName' key of friend dict it is defined in components/messages.py ''' raise NotImplementedError()
def send(self, msg, toUserName=None, mediaId=None): ''' wrapped function for all the sending functions for options - msg: message starts with different string indicates different type - list of type string: ['@fil@', '@img@', '@msg@', '@vid@'] - they are for file, image, plain text, video - if none of them matches, it will be sent like plain text - toUserName: 'UserName' key of friend dict - mediaId: if set, uploading will not be repeated it is defined in components/messages.py ''' raise NotImplementedError()
|