Skip to Content
VLRdevAPI

赛事赛程与对阵 (Event Matches)

按赛段和对局状态筛选赛事包含的比赛,支持在底层并行补全参赛战队的唯一数值 ID。

event.matches(event_id) 返回赛事内部的赛程场次,支持按赛段和对局状态(未开始、直播中、已完赛)灵活筛选。各对阵队伍的 ID 将通过后台线程池在抓取系列赛概览时自动并行填充。

方法签名

event.matches(
    event_id: int,
    stage_id: str | None = None,
    state: Literal["all", "completed", "live", "upcoming"] = "all",
) -> EventMatches

请求参数

Prop

Type

返回类型 - EventMatches

Prop

Type

EventMatch 字段明细

Prop

Type

MatchTeam 字段明细

Prop

Type

MatchStatus 枚举

Prop

Type

代码示例

import vlrdevapi

# 获取指定赛事中已完赛的赛果
matches = vlrdevapi.event(2765).matches(state="completed")

for m in matches.matches[:5]:
    t1, t2 = m.teams[0], m.teams[1]
    s1 = t1.score if t1.score is not None else 0
    s2 = t2.score if t2.score is not None else 0
    print(f"{t1.name} [{s1} - {s2}] {t2.name} | {m.stage} - {m.phase}")

最后更新于

本页内容