当前位置: 首页>>代码示例>>Python>>正文


Python Rally.getAllUsers方法代码示例

本文整理汇总了Python中pyral.Rally.getAllUsers方法的典型用法代码示例。如果您正苦于以下问题:Python Rally.getAllUsers方法的具体用法?Python Rally.getAllUsers怎么用?Python Rally.getAllUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyral.Rally的用法示例。


在下文中一共展示了Rally.getAllUsers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_all_users_query

# 需要导入模块: from pyral import Rally [as 别名]
# 或者: from pyral.Rally import getAllUsers [as 别名]
def test_all_users_query():
    """
        Using a known valid Rally server and known valid access credentials,
        request information about every user associated with the current subscription.
    """
    rally = Rally(server=PREVIEW, user=PREVIEW_USER, password=PREVIEW_PSWD)
    everybody = rally.getAllUsers()
    assert len(everybody) > 0
    assert len([user for user in everybody if user.DisplayName == 'Sara']) == 1
开发者ID:lenciel,项目名称:pyral,代码行数:11,代码来源:test_convenience.py

示例2: dict

# 需要导入模块: from pyral import Rally [as 别名]
# 或者: from pyral.Rally import getAllUsers [as 别名]
DEBUG_OUTPUT = True
TRELLO_ID = ""
TRELLO_USER = ""
TRELLO_TOKEN = ""
TRELLO_BOARD 	= ""
TRELLO_LIST 	= ""

trelloApi = trello.TrelloApi(TRELLO_ID)
trelloApi.set_token(TRELLO_TOKEN)

boards = trello.Members(TRELLO_ID, TRELLO_TOKEN).get_board(TRELLO_USER)
testBoard = [board for board in boards if board['name'] == TRELLO_BOARD][0]
boardList = [list for list in trello.Boards(TRELLO_ID, TRELLO_TOKEN).get_list(testBoard['id']) if list['name'] == TRELLO_LIST][0]
#############

#Username (trello) <-- Full Name --> E-mail (rally)
emailList = dict()
all_users = rally.getAllUsers()
for user in all_users:
	rallyName = ("{} {}".format(user.FirstName, user.LastName)).lower()
	emailList[rallyName] = user.EmailAddress

boardMembers = trello.Boards(TRELLO_ID, TRELLO_TOKEN).get_member(testBoard['id'])
emailToUserName = dict()
for member in boardMembers:
	trelloName = ("{}".format(member['fullName'])).lower()
	emailToUserName[member['username']] = emailList[trelloName]

for user in emailToUserName:
	print user
################################
开发者ID:evogirossdrew,项目名称:ZeroHour,代码行数:33,代码来源:rallAndTrelloUserNames.py


注:本文中的pyral.Rally.getAllUsers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。