本文整理汇总了Python中trello.TrelloClient.get_board_members方法的典型用法代码示例。如果您正苦于以下问题:Python TrelloClient.get_board_members方法的具体用法?Python TrelloClient.get_board_members怎么用?Python TrelloClient.get_board_members使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类trello.TrelloClient
的用法示例。
在下文中一共展示了TrelloClient.get_board_members方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from trello import TrelloClient [as 别名]
# 或者: from trello.TrelloClient import get_board_members [as 别名]
#.........这里部分代码省略.........
elif (len(params) == 2):
match_args[1] = params[1]
match_args[3] = params[0]
return '#%s. %sº (%s,%s) %s' % tuple(match_args)
name = re.sub('#(\d+).(\d+)º \((\d+),(\d+)\) (.*)', sub_match, card.name)
card._set_remote_attribute('name', name)
elif ('members' in args):
for idx, member_id in enumerate(MEMBERS):
member = client.get_member(member_id)
logging.info("*%s %d. %s (%s)" % ((USER == member_id) and '*' or '',
idx, member.username, member.full_name))
elif ('config' in args):
if options.params:
params = options.params.split(',')
for param in params:
try:
key, value = param.split(':')
except ValueError:
handle_error('(-p <key:value, key2:value2, ...>)'\
' format is wrong.')
json_data[key] = value
if options.user:
json_data['USER'] = options.user
if not (options.params and options.user):
members = client.get_board_members(BOARD_ID)
json_data['MEMBERS'] = [member['id'] for member in members]
json_data['USER'] = json_data['MEMBERS'].index(client.me()['id'])
with open(conf_path, 'w') as outfile:
json.dump(json_data, outfile)
for key, value in json_data.items():
logging.info("* %s: %s" %(key, value))
elif ('load' in args):
if not options.params:
handle_error('(-p <t_estimated>)You must include '\
'almost time estimated.')
params = check_params(options.params)
(t_estimated, priority, t_real) = (params + [1, 0])[:3]
if options.id:
short_id = options.id
create_list = client.get_list(CREATE_LIST_ID)
card = get_card_by_id(create_list, short_id)
if not card:
handle_error('Card not found')
full_title = '%dº (%d,%d) %s' % (priority, t_estimated,
t_real, card.name)
card._set_remote_attribute('name', "#%d.%s" % (short_id, full_title))
checkout_by_id(repo, short_id)
else: