def roster_cloud(self):
'''Query roster JSON from cloud'''
success, code, message, text = self.verbose_cloud_request({
'operation': 'sharedroster',
'username': self.username,
'domain': self.authDomain
})
if success:
if code is not None and code != requests.codes.ok:
return code, None
else:
sr = None
try:
sr = message['data']['sharedRoster']
return sr, text
except Exception, e:
logging.warn('Weird response: ' + str(e))
return message, text
else:
return False, None
评论列表
文章目录