赛事阶段划分 (Event Stages)
获取赛事的赛段细分结构 — 小组赛、淘汰赛及各自对应的开赛与结束日期。
event.stages(event_id) 返回赛事内部的赛段构成(如“小组赛”、“季后赛”),并解析出各个赛段在 vlr.gg 子导航栏上的起止日期。
方法签名
event.stages(event_id: int) -> EventStages请求参数
Prop
Type
返回类型 - EventStages
EventStages 封装了 EventStage 对象列表,原生支持 Python 容器协议:__len__、__iter__ 及 __getitem__。
Prop
Type
容器协议支持
| 方法/语法 | 行为表现 |
|---|---|
len(result) | 返回赛段总数 |
for stage in result | 按顺序遍历每个赛段对象 |
result[i] | 通过下标索引直接定位指定赛段 |
EventStage 字段明细
Prop
Type
代码示例
import vlrdevapi
stages = vlrdevapi.event(2765).stages()
print(f"总赛段数: {len(stages)}")
for stage in stages:
print(f"- {stage.name} (ID: {stage.id})")
print(f" 赛期: {stage.start_date} 至 {stage.end_date}")最后更新于