def delete_user_batch(self, num): """删除IM用户[批量] """ if isinstance(num, int): url = ('/%s/%s/users?limit=%s' % (self.org, self.app, num)) return http_delete(url, self.auth) else: print('wrong type of num, it should be int')
def delete_friend(self, username, friend): """解除好友关系 """ url = ('/%s/%s/users/%s/contacts/users/%s' % (self.org, self.app, username, friend)) return http_delete(url, self.auth)
def remove_user_from_group(self, group_id, username): """群组减人 """ url = ('/%s/%s/chatgroups/%s/users/%s' % (self.org, self.app, group_id, username)) return http_delete(url)
def delete_user_by_username(self, username): """删除IM用户[单个] """ url = ('/%s/%s/users/%s' % (self.org, self.app, username)) return http_delete(url, self.auth)
def delete_groups_by_id(self, group_id): """删除群组 """ url = ('/%s/%s/chatgroups/%s' % (self.org, self.app, group_id)) return http_delete(url, self.auth)