本文整理汇总了Python中match.Match.getParticipantById方法的典型用法代码示例。如果您正苦于以下问题:Python Match.getParticipantById方法的具体用法?Python Match.getParticipantById怎么用?Python Match.getParticipantById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类match.Match
的用法示例。
在下文中一共展示了Match.getParticipantById方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ChallengerList
# 需要导入模块: from match import Match [as 别名]
# 或者: from match.Match import getParticipantById [as 别名]
from match import Match
from summoner import Summoner
#do this for all supported regions
regions = ['na', 'euw', 'kr']
for region in regions:
#update list of challengers
players = ChallengerList(region)
challengers = players.getChallengers()
#update list of challenger matchlists
for challenger in challengers['entries']:
player = Summoner(challenger['playerOrTeamId'], region)
matchlist = player.getMatches()
matchIDs = matchlist.getMatchIds()
localMatches = []
for matchID in matchIDs:
if matchID not in localMatches:
match = Match(matchID, region)
items = match.getParticipantById(player.getID()).getStats('items')
print(items)
#use breaks here to execute requests only once, otherwise dev key rate limit is maxed out QUICKLY
break
break
break