Skip to content

events 活动

活动信息获取模块。

python
from bestdori import events

类型定义

EventInfo 活动信息

活动详细信息字典。 all.{index}.json 信息字典为该字典中选取部分字段信息。

字段名类型描述
eventNameList[str | None]活动名定长列表
eventTypestr活动类型
assetBundleNamestr资源库名称
startAtList[str | None]活动起始时间戳定长列表
endAtList[str | None]活动终止时间戳定长列表
rewardCardsList[int]活动奖励卡牌 ID 列表
attributesList[Attribute]活动加成属性列表
charactersList[Character]活动加成角色列表
eventAttributeAndCharacterBonus NotRequiredEventAttributeAndCharacterBonus活动属性与角色加成
eventCharacterParameterBonus NotRequiredEventCharacterParameterBonus活动角色数值加成
membersList[Member]-
limitBreaksList[LimitBreak]-
enableFlagList[Literal[True] | None]活动是否可用定长列表
publicStartAtList[str | None]活动公开起始时间戳定长列表
publicEndAtList[str | None]活动公开终止时间戳定长列表
distributionStartAtList[str | None]发布起始时间戳定长列表
distributionEndAtList[str | None]发布结束时间戳定长列表
bgmAssetBundleNamestrBGM 资源库名称
bgmFileNamestrBGM 资源文件名称
aggregateEndAtList[str | None]结果汇总结束时间戳定长列表
exchangeEndAtList[str | None]交换所结束时间戳定长列表
pointRewardsList[List[PointReward] | None]点数奖励列表定长列表
rankingRewardsList[List[RankingReward] | None]排名奖励列表定长列表
storiesList[Story]活动故事列表
musicsList[Music]活动音频列表

Attribute 活动加成属性信息

字段名类型描述
eventId NotRequiredint活动 ID
attributestr活动加成属性
percentint加成百分比

Character 活动加成角色信息

字段名类型描述
eventId NotRequiredint活动 ID
characterIdint活动加成角色 ID
percentint加成百分比
seq NotRequiredint-

EventAttributeAndCharacterBonus

字段名类型描述
eventId NotRequiredint活动 ID
pointPercentint-
parameterPercentint-

EventCharacterParameterBonus

字段名类型描述
eventId NotRequiredint活动 ID
performanceint-
techniqueint-
visualint-

Member

字段名类型描述
eventIdint活动 ID
situationIdint-
percentint-
seqint-

LimitBreak

字段名类型描述
rarityint-
rankint-
percentfloat-

PointReward

字段名类型描述
pointstr点数
rewardTypestr奖励类型
rewardId NotRequiredint奖励 ID
rewardQuantityint奖励数量

RankingReward

字段名类型描述
fromRankint奖励起始排名
toRankint奖励终止排名
rewardTypestr奖励类型
rewardId NotRequiredint奖励 ID
rewardQuantityint奖励数量

Story 活动故事

字段名类型描述
scenarioIdstr场景 ID
coverImagestr封面图片链接
backgroundImagestr背景图片链接
releasePtstr解锁所需点数
rewardsList[StoryReward]故事奖励
captionList[str | None]故事说明定长列表
titleList[str | None]故事标题定长列表
synopsisList[str | None]故事简介定长列表
releaseConditionsList[str | None]解锁条件定长列表

StoryReward

字段名类型描述
rewardTypestr奖励类型
rewardId NotRequiredint奖励 ID
rewardQuantityint奖励数量

Music 活动歌曲

字段名类型描述
musicIdint歌曲 ID
musicRankingRewardsList[MusicRankingReward]歌曲排名奖励

MusicRankingReward

字段名类型描述
fromRankint奖励起始排名
toRankint奖励终止排名
resourceTypestr资源类型
resourceIdint资源 ID
Quantityint数量

def get_all() async

参数名类型默认值描述
indexint0指定获取的 JSON 信息
me keywordOptional[Me]None登录用户类

获取总活动信息,返回以活动 ID 为字段名、 EventsAllInfo 为字段值的信息字典, EventsAllInfo 为从 EventInfo 中截取出的部分信息。根据 index 参数值不同,获取到的 EventsAllInfo 所包含的信息也不同。

特别地,当 index 值为 0 时,返回值为以活动 ID 为字段名、 NoneDict 为字段值的字典

index 可用参数值
参数值获取字段值末项字段名
0-
1eventName
3endAt
4rewardCards
5limitBreaks
6limitBreaks
返回值: Dict[str, EventsAllInfo | NoneDict]

class Event()

活动类,包含各种活动相关资源整合。

def init()

参数名类型默认值描述
idint-活动 ID
me keywordOptional[Me]None登录用户类

def tracker()

参数名类型默认值描述
serverServer-服务器 ID

获取活动的 PT 与排名追踪器。

返回值: EventTracker

def get_info() async

获取活动信息。

返回值: EventInfo

def get_comment() async

参数名类型默认值描述
limitint20获取到的帖子数量上限
offsetint0获取帖子时的偏移量
orderOrder'TIME_ASC'

获取活动的社区评论列表。

返回值: PostList

def get_banner() async

参数名类型默认值描述
serverServerName-服务器名

获取活动缩略图资源。

返回值: bytes

def get_logo() async

参数名类型默认值描述
serverServerName-服务器名

获取活动 LOGO 资源。

返回值: bytes

def get_topscreen() async

参数名类型默认值描述
serverServerName-服务器名
typestr-主界面图像类型
type 可用参数值
描述
'bg'背景全图
'trim'角色图像

获取活动主界面图像资源。

返回值: bytes

def get_stamp() async

获取活动奖励稀有表情资源。

返回值: bytes

def get_top() async

该方法存在多种调用方式:

获取最终 T10 排名分数线

参数名类型默认值描述
serverServer-服务器 ID
midint0歌曲 ID 。仅在查询歌曲分数排名时为非 0
latest keywordLiteral[1]-表示获取最终排名分数线

获取最终 T10 排名分数线。

获取最新 T10 排名分数线

参数名类型默认值描述
serverServer-服务器 ID
midint0歌曲 ID 。仅在查询歌曲分数排名时为非 0
interval keywordint-获取最新分数线间隔

获取最新 T10 排名分数线。

返回值: EventTopData

def get_rotation_musics() async

获取团队 LIVE 佳节活动歌曲循环数据 FestivalRotationMusic 。仅在活动类型为团队 LIVE 佳节活动时有效。

返回值: List[FestivalRotationMusic]

def get_stages() async

获取团队 LIVE 佳节活动舞台数据 FestivalStage 。仅在活动类型为团队 LIVE 佳节活动时有效。

返回值: List[FestivalStage]