Skip to Content
VLRdevAPI

战队完赛记录 (Team Completed Matches)

获取战队的已完赛历史比赛:包含最终比分、对手信息、胜负判定及赛事阶段背景。

team.completed_matches(team_id) 返回指定战队在 vlr.gg 上的已完赛历史比赛记录。

默认情况下,该接口返回前 50 场比赛(vlr.gg 单页容量)。可通过设置 limit 参数抓取更多,或使用 return_all=True 抓取全量历史分页。

函数签名

team.completed_matches(
    team_id: int,
    limit: int = 50,
    return_all: bool = False,
) -> TeamCompletedMatches

参数

Prop

Type

返回值 - TeamCompletedMatches

Prop

Type

TeamCompletedMatchEntry 字段说明

Prop

Type

OpponentInCompletedMatch 字段说明

Prop

Type

示例

查看近期完赛结果

import vlrdevapi

history = vlrdevapi.team.completed_matches(team_id=2593)
print(f"战队 {history.team_id} 的完赛战报:")
for m in history.matches[:10]:
    result = "获胜" if m.is_win else "落败"
    opp = m.opponent.name if m.opponent else "待定"
    round_label = " ".join(part for part in (m.stage, m.bracket) if part)
    print(
        f"  {m.team_score} - {m.opponent_score} 对阵 {opp} "
        f"({result}) - {m.event} {round_label}"
    )

统计近期胜负战绩

import vlrdevapi

history = vlrdevapi.team.completed_matches(team_id=2593)
wins = sum(1 for m in history.matches if m.is_win)
losses = sum(1 for m in history.matches if not m.is_win)
total = wins + losses
pct = wins / total * 100 if total else 0
print(f"{wins}胜 - {losses}负 (胜率 {pct:.0f}%) 共计 {total} 场比赛")

柯里化链式访问

import vlrdevapi

team = vlrdevapi.team(2593)
history = team.completed_matches()
for m in history.matches[:5]:
    tag = m.opponent.tag if m.opponent else "TBD"
    print(f"{'胜' if m.is_win else '负'} {m.team_score}-{m.opponent_score} 对阵 {tag}")

最后更新于

本页内容