本文整理汇总了Python中pytas.http.TASClient.get_project_users方法的典型用法代码示例。如果您正苦于以下问题:Python TASClient.get_project_users方法的具体用法?Python TASClient.get_project_users怎么用?Python TASClient.get_project_users使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pytas.http.TASClient
的用法示例。
在下文中一共展示了TASClient.get_project_users方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_project_users_json
# 需要导入模块: from pytas.http import TASClient [as 别名]
# 或者: from pytas.http.TASClient import get_project_users [as 别名]
def get_project_users_json( request, project_id=None ):
logger.info( 'Projects users requested.')
resp = []
try:
tas = TASClient()
if project_id is not None:
resp = tas.get_project_users( project_id=project_id )
logger.info( 'Total users for project %s: %s', project_id, len( resp ) )
else:
raise Exception('Project id is required.')
except Exception as e:
traceback.print_exc()
raise Exception('Error loading projects users.')
return HttpResponse(json.dumps(resp), content_type="application/json")