diff --git a/bilibili_api/bangumi.py b/bilibili_api/bangumi.py index ac95f647..e0113122 100644 --- a/bilibili_api/bangumi.py +++ b/bilibili_api/bangumi.py @@ -1118,7 +1118,7 @@ async def get_up_info(self) -> dict: 番剧上传者信息 出差或者原版 Returns: - Api 相关字段 + dict: Api 相关字段 """ if not self.__up_info: await self.__fetch_raw() @@ -1129,7 +1129,7 @@ async def get_raw(self) -> Tuple[dict, bool]: 原始初始化数据 Returns: - Api 相关字段 + dict: Api 相关字段 """ if not self.__raw: await self.__fetch_raw() @@ -1599,7 +1599,7 @@ async def get_player_info(self): 获取视频上一次播放的记录,字幕和地区信息。需要分集的 cid, 返回数据中含有json字幕的链接 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ return await super().get_player_info(await self.get_cid(), self.get_epid()) @@ -1608,7 +1608,7 @@ async def get_subtitle(self): 获取字幕信息 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ return (await self.get_player_info()).get("subtitle") @@ -1655,7 +1655,7 @@ async def get_pbp(self): 获取高能进度条 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ return await super().get_pbp(0) diff --git a/bilibili_api/channel_series.py b/bilibili_api/channel_series.py index 66021dc4..426a22bf 100644 --- a/bilibili_api/channel_series.py +++ b/bilibili_api/channel_series.py @@ -106,7 +106,7 @@ async def get_meta(self) -> dict: 获取元数据 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ if not self.meta: await self.__fetch_meta() @@ -125,7 +125,7 @@ async def get_videos( ps(int) : 每一页显示的视频数量 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ if self.__uid == -1: await self.__fetch_meta() diff --git a/bilibili_api/cheese.py b/bilibili_api/cheese.py index 223f3a70..dfe0ccda 100644 --- a/bilibili_api/cheese.py +++ b/bilibili_api/cheese.py @@ -105,7 +105,7 @@ async def get_meta(self) -> dict: 获取教程元数据 Returns: - 调用 API 所得的结果。 + dict: 调用 API 返回的结果 """ api = API["info"]["meta"] params = {"season_id": await self.get_season_id()} @@ -639,7 +639,7 @@ async def get_pbp(self) -> dict: 获取高能进度条 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ cid = await self.get_cid() api = API_video["info"]["pbp"] diff --git a/bilibili_api/creative_center.py b/bilibili_api/creative_center.py index c2e7bfdf..1abf6767 100644 --- a/bilibili_api/creative_center.py +++ b/bilibili_api/creative_center.py @@ -561,7 +561,7 @@ async def get_video_upload_manager_info( ps (int): 每页项数 - tid: (VideoZoneTypes, None, int): 分区 + tid (VideoZoneTypes, None, int): 分区 status (UploadManagerStatus): 稿件状态 diff --git a/bilibili_api/homepage.py b/bilibili_api/homepage.py index feafa3e3..799e7ab5 100644 --- a/bilibili_api/homepage.py +++ b/bilibili_api/homepage.py @@ -18,7 +18,7 @@ async def get_top_photo() -> dict: 例如:b 站的风叶穿行,通过这个 API 获取的图片就是风叶穿行的图片。 Returns: - 调用 API 返回的结果。 + dict: 调用 API 返回的结果。 """ api = API["info"]["top_photo"] params = {"resource_id": 142} @@ -34,7 +34,7 @@ async def get_links(credential: Union[Credential, None] = None): credential (Credential | None): 凭据类 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ api = API["info"]["links"] params = {"pf": 0, "ids": 4694} @@ -50,7 +50,7 @@ async def get_popularize(credential: Union[Credential, None] = None): credential(Credential | None): 凭据类 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ api = API["info"]["popularize"] params = {"pf": 0, "ids": 34} @@ -65,7 +65,7 @@ async def get_videos(credential: Union[Credential, None] = None): credential (Credential | None): 凭据类 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ api = API["info"]["videos"] return await Api(**api, credential=credential).result diff --git a/bilibili_api/hot.py b/bilibili_api/hot.py index 36b557bf..4ad30106 100644 --- a/bilibili_api/hot.py +++ b/bilibili_api/hot.py @@ -33,7 +33,7 @@ async def get_weekly_hot_videos_list() -> dict: 获取每周必看列表(仅概述) Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ api = API_rank["info"]["weekly_series"] return await Api(**api).result diff --git a/bilibili_api/interactive_video.py b/bilibili_api/interactive_video.py index b6f5cbef..62ae6df9 100644 --- a/bilibili_api/interactive_video.py +++ b/bilibili_api/interactive_video.py @@ -283,7 +283,7 @@ def run_command(self) -> List["InteractiveVariable"]: 执行操作 Returns: - List[InteractiveVariable] + List[InteractiveVariable]: 所有变量的最终值 """ if self.__command == "": return self.__vars diff --git a/bilibili_api/live.py b/bilibili_api/live.py index e884c95f..a005dc58 100644 --- a/bilibili_api/live.py +++ b/bilibili_api/live.py @@ -698,7 +698,7 @@ async def update_news(self, content: str) -> dict: 更新公告 Args: - content: 最多60字符 + content (str): 最多 60 字符 Returns: dict: 调用 API 返回的结果 diff --git a/bilibili_api/live_area.py b/bilibili_api/live_area.py index bb5b530d..67f1e511 100644 --- a/bilibili_api/live_area.py +++ b/bilibili_api/live_area.py @@ -53,7 +53,7 @@ def get_area_info_by_id(id: int) -> Tuple[Union[dict, None], Union[dict, None]]: id (int): 分区的 id。 Returns: - `Tuple[dict | None, dict | None]`: 第一个是主分区,第二个是子分区,没有时返回 None。 + Tuple[dict | None, dict | None]: 第一个是主分区,第二个是子分区,没有时返回 None。 """ global live_area_data if not live_area_data: diff --git a/bilibili_api/session.py b/bilibili_api/session.py index 27925f20..e7c1f4bb 100644 --- a/bilibili_api/session.py +++ b/bilibili_api/session.py @@ -289,9 +289,9 @@ def __init__(self, data: dict, self_uid: int): 信息事件类型 Args: - data: 接收到的事件详细信息 + data (dict): 接收到的事件详细信息 - self_uid: 用户自身 UID + self_uid (int): 用户自身 UID """ self.__dict__.update(data) self.uid = self_uid @@ -479,7 +479,7 @@ async def run(self, exclude_self: bool = True) -> None: 非阻塞异步爬虫 定时发送请求获取消息 Args: - exclude_self: bool 是否排除自己发出的消息,默认排除 + exclude_self (bool): 是否排除自己发出的消息,默认排除 """ # 获取自身UID 用于后续判断消息是发送还是接收 @@ -558,7 +558,7 @@ async def start(self, exclude_self: bool = True) -> None: 阻塞异步启动 通过调用 self.close() 后可断开连接 Args: - exclude_self: bool 是否排除自己发出的消息,默认排除 + exclude_self (bool): 是否排除自己发出的消息,默认排除 """ await self.run(exclude_self) @@ -573,9 +573,9 @@ async def reply(self, event: Event, content: Union[str, Picture]) -> dict: # ty 快速回复消息 Args: - event : Event 要回复的消息 + event (Event) : 要回复的消息 - content: str | Picture 要回复的文字内容 + content (str | Picture): 要回复的文字内容 Returns: dict: 调用接口返回的内容。 diff --git a/bilibili_api/user.py b/bilibili_api/user.py index c3bc6488..ddabf513 100644 --- a/bilibili_api/user.py +++ b/bilibili_api/user.py @@ -1136,7 +1136,7 @@ async def create_subscribe_group(name: str, credential: Credential) -> dict: credential (Credential): Credential Returns: - API 调用返回结果。 + dict: API 调用返回结果。 """ credential.raise_for_no_sessdata() credential.raise_for_no_bili_jct() @@ -1157,7 +1157,7 @@ async def delete_subscribe_group(group_id: int, credential: Credential) -> dict: credential (Credential): Credential Returns: - 调用 API 返回结果 + dict: 调用 API 返回结果 """ credential.raise_for_no_sessdata() credential.raise_for_no_bili_jct() @@ -1182,7 +1182,7 @@ async def rename_subscribe_group( credential (Credential): Credential Returns: - 调用 API 返回结果 + dict: 调用 API 返回结果 """ credential.raise_for_no_sessdata() credential.raise_for_no_bili_jct() @@ -1207,7 +1207,7 @@ async def set_subscribe_group( credential (Credential): Credential Returns: - API 调用结果 + dict: API 调用结果 """ credential.raise_for_no_sessdata() credential.raise_for_no_bili_jct() @@ -1465,11 +1465,11 @@ async def get_self_notes_info( 获取自己的笔记列表 Args: - page_num: 页码 + page_num (int): 页码 - page_size: 每页项数 + page_size (int): 每页项数 - credential(Credential): 凭据类 + credential (Credential): 凭据类 Returns: dict: 调用 API 返回的结果 @@ -1492,11 +1492,11 @@ async def get_self_public_notes_info( 获取自己的公开笔记列表 Args: - page_num: 页码 + page_num (int): 页码 - page_size: 每页项数 + page_size (int): 每页项数 - credential(Credential): 凭据类 + credential (Credential): 凭据类 Returns: dict: 调用 API 返回的结果 diff --git a/bilibili_api/utils/AsyncEvent.py b/bilibili_api/utils/AsyncEvent.py index 0dba2ec4..8e303f9b 100644 --- a/bilibili_api/utils/AsyncEvent.py +++ b/bilibili_api/utils/AsyncEvent.py @@ -61,7 +61,7 @@ def remove_event_listener(self, name: str, handler: Union[Callable, Coroutine]) handler (Union[Callable, Coroutine]): 要移除的函数。 Returns: - bool, 是否移除成功。 + bool: 是否移除成功。 """ name = name.upper() if name in self.__handlers: @@ -92,7 +92,7 @@ def dispatch(self, name: str, *args, **kwargs) -> None: Args: name (str): 事件名。 - *args, **kwargs: 要传递给函数的参数。 + *args, **kwargs (Any): 要传递给函数的参数。 """ if len(args) == 0 and len(kwargs.keys()) == 0: args = [{}] diff --git a/bilibili_api/utils/danmaku.py b/bilibili_api/utils/danmaku.py index d6799e18..4a20d051 100644 --- a/bilibili_api/utils/danmaku.py +++ b/bilibili_api/utils/danmaku.py @@ -143,7 +143,7 @@ def to_xml(self): 将弹幕转换为 xml 格式弹幕 Returns: - xml + str: xml """ txt = self.text.replace("&", "&").replace("<", "<").replace(">", ">") string = f'{txt}' diff --git a/bilibili_api/utils/network.py b/bilibili_api/utils/network.py index be64e7a8..533ea99a 100644 --- a/bilibili_api/utils/network.py +++ b/bilibili_api/utils/network.py @@ -1114,7 +1114,7 @@ def has_dedeuserid(self) -> bool: 是否提供 dedeuserid。 Returns: - bool。 + bool: 是否提供 dedeuserid。 """ return self.dedeuserid is not None and self.sessdata != "" @@ -1123,7 +1123,7 @@ def has_sessdata(self) -> bool: 是否提供 sessdata。 Returns: - bool。 + bool: 是否提供 sessdata。 """ return self.sessdata is not None and self.sessdata != "" @@ -1132,7 +1132,7 @@ def has_bili_jct(self) -> bool: 是否提供 bili_jct。 Returns: - bool。 + bool: 是否提供 bili_jct。 """ return self.bili_jct is not None and self.sessdata != "" @@ -1141,7 +1141,7 @@ def has_buvid3(self) -> bool: 是否提供 buvid3 Returns: - bool. + bool: 是否提供 buvid3 """ return self.buvid3 is not None and self.sessdata != "" @@ -1150,7 +1150,7 @@ def has_ac_time_value(self) -> bool: 是否提供 ac_time_value Returns: - bool. + bool: 是否提供 ac_time_value """ return self.ac_time_value is not None and self.sessdata != "" diff --git a/bilibili_api/utils/short.py b/bilibili_api/utils/short.py index b7b8b9ef..5cede603 100644 --- a/bilibili_api/utils/short.py +++ b/bilibili_api/utils/short.py @@ -14,14 +14,12 @@ async def get_real_url(short_url: str, credential: Optional[Credential] = None) 获取短链接跳转目标,以进行操作。 Args: - short_url(str): 短链接。 + short_url (str): 短链接。 - credential(Credential | None): 凭据类。 + credential (Credential | None): 凭据类。 Returns: - 目标链接(如果不是有效的链接会报错) - - 返回值为原 url 类型 + str: 目标链接(如果不是有效的链接会报错) """ credential = credential if credential else Credential() diff --git a/bilibili_api/utils/sync.py b/bilibili_api/utils/sync.py index 37110d19..a6dcf6d1 100644 --- a/bilibili_api/utils/sync.py +++ b/bilibili_api/utils/sync.py @@ -30,7 +30,7 @@ def sync( obj (Coroutine | Future): 异步函数 Returns: - 该异步函数的返回值 + Any: 该异步函数的返回值 """ try: asyncio.get_running_loop() diff --git a/bilibili_api/video.py b/bilibili_api/video.py index 0698889f..6688001c 100644 --- a/bilibili_api/video.py +++ b/bilibili_api/video.py @@ -1197,7 +1197,7 @@ async def get_danmaku_xml( cid (int | None, optional): cid. Defaults to None. Return: - xml 文件源 + str: xml 文件源 """ if cid is None: if page_index is None: @@ -1498,7 +1498,7 @@ async def get_subtitle( cid (int | None): 分 P ID,从视频信息中获取 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ if cid is None: raise ArgsException("需要 cid") @@ -1519,7 +1519,7 @@ async def get_player_info( epid (int | None): 番剧分集 ID,从番剧信息中获取 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ if cid is None: raise ArgsException("需要 cid") @@ -1632,7 +1632,7 @@ async def get_danmaku_snapshot(self) -> dict: 获取弹幕快照 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ api = API["danmaku"]["snapshot"] @@ -1658,7 +1658,7 @@ async def recall_danmaku( cid(int | None, optional) : 分 P 编码 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ if cid is None: if page_index is None: @@ -1686,7 +1686,7 @@ async def get_pbp( cid(int | None) : 分 P 编码 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ if cid is None: if page_index is None: @@ -1707,7 +1707,7 @@ async def add_to_toview(self) -> dict: 添加视频至稍后再看列表 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ self.credential.raise_for_no_sessdata() self.credential.raise_for_no_bili_jct() @@ -1722,7 +1722,7 @@ async def delete_from_toview(self) -> dict: 从稍后再看列表删除视频 Returns: - 调用 API 返回的结果 + dict: 调用 API 返回的结果 """ self.credential.raise_for_no_sessdata() self.credential.raise_for_no_bili_jct() diff --git a/bilibili_api/video_uploader.py b/bilibili_api/video_uploader.py index ec882021..4fc749fe 100644 --- a/bilibili_api/video_uploader.py +++ b/bilibili_api/video_uploader.py @@ -708,7 +708,7 @@ def __init__( cover (Union[str, Picture]) : 封面路径或者封面对象. Defaults to "",传入 meta 类型为 VideoMeta 时可不传 - line: (Lines, Optional) : 线路. Defaults to None. 不选择则自动测速选择 + line (Lines, Optional) : 线路. Defaults to None. 不选择则自动测速选择 建议传入 VideoMeta 对象,避免参数有误 @@ -1325,7 +1325,7 @@ async def get_missions( credential (Credential, optional): 凭据. Defaults to None. Returns: - dict API 调用返回结果 + dict: API 调用返回结果 """ api = _API["missions"] @@ -1391,15 +1391,6 @@ def __init__( credential: Union[Credential, None] = None, ): """ - Args: - bvid (str) : 稿件 BVID - - meta (dict) : 视频信息 - - cover (str | Picture) : 封面地址. Defaults to None(不更改封面). - - credential (Credential | None): 凭据类. Defaults to None. - meta 参数示例: (保留 video, cover, tid, aid 字段) ``` json @@ -1423,6 +1414,15 @@ def __init__( "web_os": "const int: 2" } ``` + + Args: + bvid (str) : 稿件 BVID + + meta (dict) : 视频信息 + + cover (str | Picture) : 封面地址. Defaults to None(不更改封面). + + credential (Credential | None): 凭据类. Defaults to None. """ super().__init__() self.bvid = bvid diff --git a/bilibili_api/video_zone.py b/bilibili_api/video_zone.py index ed6afba2..9c069795 100644 --- a/bilibili_api/video_zone.py +++ b/bilibili_api/video_zone.py @@ -25,7 +25,7 @@ def get_zone_info_by_tid(tid: int) -> Tuple[Union[dict, None], Union[dict, None] tid (int): 频道的 tid。 Returns: - `Tuple[dict | None, dict | None]`: 第一个是主分区,第二个是子分区,没有时返回 None。 + Tuple[dict | None, dict | None]: 第一个是主分区,第二个是子分区,没有时返回 None。 """ with open( os.path.join(os.path.dirname(__file__), "data/video_zone.json"), encoding="utf8" diff --git a/bilibili_api/watchroom.py b/bilibili_api/watchroom.py index fbd46f89..3c2858ca 100644 --- a/bilibili_api/watchroom.py +++ b/bilibili_api/watchroom.py @@ -375,7 +375,7 @@ async def create( credential (Credential): 凭据 Returns: - Watchroom:放映室 + Watchroom: 放映室 """ global watch_room_bangumi_cache @@ -412,7 +412,7 @@ async def match( season_type (str): 季度类型 Returns: - Watchroom:放映室 + Watchroom: 放映室 """ if credential is None: credential = Credential() diff --git a/docs/modules/app.md b/docs/modules/app.md index af7c4263..b5821a54 100644 --- a/docs/modules/app.md +++ b/docs/modules/app.md @@ -22,15 +22,15 @@ from bilibili_api import app | name | type | description | | - | - | - | -| build | int, optional | 客户端内部版本号 | -| mobi_app | str, optional | android / iphone / ipad | -| platform | str, optional | android / ios/ ios | -| height | int, optional | 屏幕高度 | -| width | int, optional | 屏幕宽度 | -| birth | str, optional | 生日日期(四位数,例 0101) | -| credential | Credential \| None, optional | 凭据. Defaults to None. | +| `build` | `int, optional` | 客户端内部版本号 | +| `mobi_app` | `str, optional` | android / iphone / ipad | +| `platform` | `str, optional` | android / ios/ ios | +| `height` | `int, optional` | 屏幕高度 | +| `width` | `int, optional` | 屏幕宽度 | +| `birth` | `str, optional` | 生日日期(四位数,例 0101) | +| `credential` | `Credential \| None, optional` | 凭据. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -44,13 +44,13 @@ from bilibili_api import app | name | type | description | | - | - | - | -| mobi_app | str, optional | android / iphone / ipad | -| platform | str, optional | android / ios/ ios | -| height | str, optional | 屏幕高度 | -| width | str, optional | 屏幕宽度 | -| credential | Credential \| None, optional | 凭据. Defaults to None. | +| `mobi_app` | `str, optional` | android / iphone / ipad | +| `platform` | `str, optional` | android / ios/ ios | +| `height` | `str, optional` | 屏幕高度 | +| `width` | `str, optional` | 屏幕宽度 | +| `credential` | `Credential \| None, optional` | 凭据. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/article.md b/docs/modules/article.md index fb063a44..d63ce0d5 100644 --- a/docs/modules/article.md +++ b/docs/modules/article.md @@ -41,7 +41,7 @@ from bilibili_api import article | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | ### def \_\_init\_\_() @@ -49,8 +49,8 @@ from bilibili_api import article | name | type | description | | - | - | - | -| cvid | int | cv 号 | -| credential | Credential \| None, optional | 凭据. Defaults to None. | +| `cvid` | `int` | cv 号 | +| `credential` | `Credential \| None, optional` | 凭据. Defaults to None. | ### async def add_coins() @@ -59,7 +59,7 @@ from bilibili_api import article -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -72,7 +72,6 @@ from bilibili_api import article -**Returns:** None @@ -82,7 +81,7 @@ from bilibili_api import article -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -93,7 +92,7 @@ from bilibili_api import article -**Returns:** int: cvid +**Returns:** `int`: cvid @@ -104,7 +103,7 @@ from bilibili_api import article -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -115,7 +114,7 @@ from bilibili_api import article -**Returns:** bool: 是否为笔记 +**Returns:** `bool`: 是否为笔记 @@ -128,7 +127,7 @@ from bilibili_api import article -**Returns:** dict: JSON 数据 +**Returns:** `dict`: JSON 数据 @@ -141,7 +140,7 @@ from bilibili_api import article -**Returns:** str: Markdown 内容 +**Returns:** `str`: Markdown 内容 @@ -153,9 +152,9 @@ from bilibili_api import article | name | type | description | | - | - | - | -| status | bool, optional | 收藏状态. Defaults to True | +| `status` | `bool, optional` | 收藏状态. Defaults to True | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -167,9 +166,9 @@ from bilibili_api import article | name | type | description | | - | - | - | -| status | bool, optional | 点赞状态. Defaults to True | +| `status` | `bool, optional` | 点赞状态. Defaults to True | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -184,7 +183,7 @@ from bilibili_api import article -**Returns:** Dynamic: 动态实例 +**Returns:** `Dynamic`: 动态实例 @@ -195,7 +194,7 @@ from bilibili_api import article -**Returns:** Note: 笔记实例 +**Returns:** `Note`: 笔记实例 @@ -210,7 +209,7 @@ from bilibili_api import article -**Returns:** Opus: 动态实例 +**Returns:** `Opus`: 动态实例 @@ -224,7 +223,7 @@ from bilibili_api import article | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | ### def \_\_init\_\_() @@ -232,8 +231,8 @@ from bilibili_api import article | name | type | description | | - | - | - | -| rlid | int | 文集 id | -| credential | Credential \| None, optional | 凭据类. Defaults to None. | +| `rlid` | `int` | 文集 id | +| `credential` | `Credential \| None, optional` | 凭据类. Defaults to None. | ### async def get_content() @@ -242,7 +241,7 @@ from bilibili_api import article -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -253,7 +252,7 @@ from bilibili_api import article -**Returns:** int: rlid +**Returns:** `int`: rlid @@ -283,9 +282,9 @@ from bilibili_api import article | name | type | description | | - | - | - | -| rank_type | ArticleRankingType | 排行榜类别. Defaults to ArticleRankingType.YESTERDAY. | +| `rank_type` | `ArticleRankingType` | 排行榜类别. Defaults to ArticleRankingType.YESTERDAY. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/article_category.md b/docs/modules/article_category.md index 73f746fd..99c42534 100644 --- a/docs/modules/article_category.md +++ b/docs/modules/article_category.md @@ -42,7 +42,7 @@ from bilibili_api import article_category -**Returns:** List[dict]: 所有分区的数据 +**Returns:** `List[dict]`: 所有分区的数据 @@ -57,7 +57,7 @@ from bilibili_api import article_category -**Returns:** dict: 所有分区的数据 +**Returns:** `dict`: 所有分区的数据 @@ -71,9 +71,9 @@ from bilibili_api import article_category | name | type | description | | - | - | - | -| id | int | id | +| `id` | `int` | id | -**Returns:** Tuple[dict | None, dict | None]: 第一个是主分区,第二个是字分区。没有找到则为 (None, None) +**Returns:** `Tuple[dict | None, dict | None]`: 第一个是主分区,第二个是字分区。没有找到则为 (None, None) @@ -87,9 +87,9 @@ from bilibili_api import article_category | name | type | description | | - | - | - | -| name | str | 分类名 | +| `name` | `str` | 分类名 | -**Returns:** Tuple[dict | None, dict | None]: 第一个是主分区,第二个是字分区。没有找到则为 (None, None) +**Returns:** `Tuple[dict | None, dict | None]`: 第一个是主分区,第二个是字分区。没有找到则为 (None, None) @@ -103,12 +103,12 @@ from bilibili_api import article_category | name | type | description | | - | - | - | -| category_id | int | 专栏分类的 id, 0 为全部. Defaults to 0. | -| order | ArticleOrder | 排序方式. Defaults to ArticleOrder.DEFAULT. | -| page_num | int | 页码. Defaults to 1. | -| page_size | int | 每一页数据大小. Defaults to 20. | +| `category_id` | `int` | 专栏分类的 id, 0 为全部. Defaults to 0. | +| `order` | `ArticleOrder` | 排序方式. Defaults to ArticleOrder.DEFAULT. | +| `page_num` | `int` | 页码. Defaults to 1. | +| `page_size` | `int` | 每一页数据大小. Defaults to 20. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/ass.md b/docs/modules/ass.md index aaecd12e..a19a448c 100644 --- a/docs/modules/ass.md +++ b/docs/modules/ass.md @@ -25,18 +25,17 @@ from bilibili_api import ass | name | type | description | | - | - | - | -| obj | Union[Video,Episode,CheeseVideo] | 对象 | -| page | int, optional | 分 P 号. Defaults to 0. | -| out | str, optional | 输出文件. Defaults to "test.ass" | -| cid | int \| None, optional | cid. Defaults to None. | -| date | datetime.date, optional | 获取时间. Defaults to None. | -| font_name | str, optional | 字体. Defaults to "Simsun". | -| font_size | float, optional | 字体大小. Defaults to 25.0. | -| alpha | float, optional | 透明度(0-1). Defaults to 1. | -| fly_time | float, optional | 滚动弹幕持续时间. Defaults to 7. | -| static_time | float, optional | 静态弹幕持续时间. Defaults to 5. | +| `obj` | `Union[Video,Episode,CheeseVideo]` | 对象 | +| `page` | `int, optional` | 分 P 号. Defaults to 0. | +| `out` | `str, optional` | 输出文件. Defaults to "test.ass" | +| `cid` | `int \| None, optional` | cid. Defaults to None. | +| `date` | `datetime.date, optional` | 获取时间. Defaults to None. | +| `font_name` | `str, optional` | 字体. Defaults to "Simsun". | +| `font_size` | `float, optional` | 字体大小. Defaults to 25.0. | +| `alpha` | `float, optional` | 透明度(0-1). Defaults to 1. | +| `fly_time` | `float, optional` | 滚动弹幕持续时间. Defaults to 7. | +| `static_time` | `float, optional` | 静态弹幕持续时间. Defaults to 5. | -**Returns:** None @@ -51,17 +50,16 @@ from bilibili_api import ass | name | type | description | | - | - | - | -| obj | Union[Video,Episode,Cheese] | 对象 | -| page | int, optional | 分 P 号. Defaults to 0. | -| out | str, optional | 输出文件. Defaults to "test.ass". | -| cid | int \| None, optional | cid. Defaults to None. | -| font_name | str, optional | 字体. Defaults to "Simsun". | -| font_size | float, optional | 字体大小. Defaults to 25.0. | -| alpha | float, optional | 透明度(0-1). Defaults to 1. | -| fly_time | float, optional | 滚动弹幕持续时间. Defaults to 7. | -| static_time | float, optional | 静态弹幕持续时间. Defaults to 5. | +| `obj` | `Union[Video,Episode,Cheese]` | 对象 | +| `page` | `int, optional` | 分 P 号. Defaults to 0. | +| `out` | `str, optional` | 输出文件. Defaults to "test.ass". | +| `cid` | `int \| None, optional` | cid. Defaults to None. | +| `font_name` | `str, optional` | 字体. Defaults to "Simsun". | +| `font_size` | `float, optional` | 字体大小. Defaults to 25.0. | +| `alpha` | `float, optional` | 透明度(0-1). Defaults to 1. | +| `fly_time` | `float, optional` | 滚动弹幕持续时间. Defaults to 7. | +| `static_time` | `float, optional` | 静态弹幕持续时间. Defaults to 5. | -**Returns:** None @@ -74,15 +72,14 @@ from bilibili_api import ass | name | type | description | | - | - | - | -| obj | Union[Video,Episode] | 对象 | -| page_index | int, optional | 分 P 索引 | -| cid | int, optional | cid | -| out | str, optional | 输出位置. Defaults to "test.ass". | -| lan_name | str, optional | 字幕名,如”中文(自动生成)“,是简介的 subtitle 项的'list'项中的弹幕的'lan_doc'属性。Defaults to "中文(自动生成)". | -| lan_code | str, optional | 字幕语言代码,如 ”中文(自动翻译)” 和 ”中文(自动生成)“ 为 "ai-zh" | -| credential | Credential, optional | Credential 类. 必须在此处或传入的视频 obj 中传入凭据,两者均存在则优先此处 | - -**Returns:** None +| `obj` | `Union[Video,Episode]` | 对象 | +| `page_index` | `int, optional` | 分 P 索引 | +| `cid` | `int, optional` | cid | +| `out` | `str, optional` | 输出位置. Defaults to "test.ass". | +| `lan_name` | `str, optional` | 字幕名,如”中文(自动生成)“,是简介的 subtitle 项的'list'项中的弹幕的'lan_doc'属性。Defaults to "中文(自动生成)". | +| `lan_code` | `str, optional` | 字幕语言代码,如 ”中文(自动翻译)” 和 ”中文(自动生成)“ 为 "ai-zh" | +| `credential` | `Credential, optional` | Credential 类. 必须在此处或传入的视频 obj 中传入凭据,两者均存在则优先此处 | + diff --git a/docs/modules/audio.md b/docs/modules/audio.md index 2e768f33..0bbc8d0f 100644 --- a/docs/modules/audio.md +++ b/docs/modules/audio.md @@ -35,7 +35,7 @@ from bilibili_api import audio | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | ### def \_\_init\_\_() @@ -43,8 +43,8 @@ from bilibili_api import audio | name | type | description | | - | - | - | -| auid | int | 音频 AU 号 | -| credential | Credential \| None, optional | 凭据. Defaults to None | +| `auid` | `int` | 音频 AU 号 | +| `credential` | `Credential \| None, optional` | 凭据. Defaults to None | ### async def add_coins() @@ -54,9 +54,9 @@ from bilibili_api import audio | name | type | description | | - | - | - | -| num | int, optional | 投币数量。Defaults to 2. | +| `num` | `int, optional` | 投币数量。Defaults to 2. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -67,7 +67,7 @@ from bilibili_api import audio -**Returns:** int: auid +**Returns:** `int`: auid @@ -78,7 +78,7 @@ from bilibili_api import audio -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -89,7 +89,7 @@ from bilibili_api import audio -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -100,7 +100,7 @@ from bilibili_api import audio -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -114,7 +114,7 @@ from bilibili_api import audio | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | ### def \_\_init\_\_() @@ -122,8 +122,8 @@ from bilibili_api import audio | name | type | description | | - | - | - | -| amid | int | 歌单 ID | -| credential | Credential \| None, optional | 凭据. Defaults to None. | +| `amid` | `int` | 歌单 ID | +| `credential` | `Credential \| None, optional` | 凭据. Defaults to None. | ### def get_amid() @@ -132,7 +132,7 @@ from bilibili_api import audio -**Returns:** int: amid +**Returns:** `int`: amid @@ -143,7 +143,7 @@ from bilibili_api import audio -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -155,9 +155,9 @@ from bilibili_api import audio | name | type | description | | - | - | - | -| pn | int, optional | 页码. Defaults to 1 | +| `pn` | `int, optional` | 页码. Defaults to 1 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -168,7 +168,7 @@ from bilibili_api import audio -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -182,10 +182,10 @@ from bilibili_api import audio | name | type | description | | - | - | - | -| pn | int, optional | 页数. Defaults to 1 | -| credential | Credential \| None, optional | 凭据. Defaults to None | +| `pn` | `int, optional` | 页数. Defaults to 1 | +| `credential` | `Credential \| None, optional` | 凭据. Defaults to None | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -199,10 +199,10 @@ from bilibili_api import audio | name | type | description | | - | - | - | -| uid | int | 用户 UID | -| credential | Credential \| None, optional | 凭据. Defaults to None | +| `uid` | `int` | 用户 UID | +| `credential` | `Credential \| None, optional` | 凭据. Defaults to None | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/audio_uploader.md b/docs/modules/audio_uploader.md index 0c593ce5..69704632 100644 --- a/docs/modules/audio_uploader.md +++ b/docs/modules/audio_uploader.md @@ -55,9 +55,9 @@ from bilibili_api import audio_uploader | name | type | description | | - | - | - | -| path | str | 文件路径 | -| meta | AudioMeta | 元数据 | -| credential | Credential | 账号信息 | +| `path` | `str` | 文件路径 | +| `meta` | `AudioMeta` | 元数据 | +| `credential` | `Credential` | 账号信息 | ### async def abort() @@ -66,7 +66,6 @@ from bilibili_api import audio_uploader -**Returns:** None @@ -76,7 +75,6 @@ from bilibili_api import audio_uploader -**Returns:** None @@ -447,10 +445,9 @@ lrc (Optional[str]): 歌词 | name | type | description | | - | - | - | -| param | Union[int, str] | UP 主 ID 或者用户名 | -| credential | Credential | 凭据 | +| `param` | `Union[int, str]` | UP 主 ID 或者用户名 | +| `credential` | `Credential` | 凭据 | -**Returns:** None @@ -463,10 +460,10 @@ lrc (Optional[str]): 歌词 | name | type | description | | - | - | - | -| cover | Picture | 封面 | -| credential | Credential | 凭据类 | +| `cover` | `Picture` | 封面 | +| `credential` | `Credential` | 凭据类 | -**Returns:** str: 封面链接 +**Returns:** `str`: 封面链接 @@ -480,10 +477,9 @@ lrc (Optional[str]): 歌词 | name | type | description | | - | - | - | -| lrc | str | 歌词 | -| credential | Credential | 凭据 | +| `lrc` | `str` | 歌词 | +| `credential` | `Credential` | 凭据 | -**Returns:** None diff --git a/docs/modules/bangumi.md b/docs/modules/bangumi.md index 5b3bf8bb..586fbd14 100644 --- a/docs/modules/bangumi.md +++ b/docs/modules/bangumi.md @@ -102,7 +102,7 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | ### def \_\_init\_\_() @@ -110,11 +110,11 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| media_id | int, optional | 番剧本身的 ID. Defaults to -1. | -| ssid | int, optional | 每季度的 ID. Defaults to -1. | -| epid | int, optional | 每集的 ID. Defaults to -1. | -| oversea | bool, optional | 是否要采用兼容的港澳台Api,用于仅限港澳台地区番剧的信息请求. Defaults to False. | -| credential | Credential \| None, optional | 凭据类. Defaults to None. | +| `media_id` | `int, optional` | 番剧本身的 ID. Defaults to -1. | +| `ssid` | `int, optional` | 每季度的 ID. Defaults to -1. | +| `epid` | `int, optional` | 每集的 ID. Defaults to -1. | +| `oversea` | `bool, optional` | 是否要采用兼容的港澳台Api,用于仅限港澳台地区番剧的信息请求. Defaults to False. | +| `credential` | `Credential \| None, optional` | 凭据类. Defaults to None. | ### async def get_episode_list() @@ -123,7 +123,7 @@ from bilibili_api import bangumi -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -134,7 +134,6 @@ from bilibili_api import bangumi -**Returns:** None @@ -145,10 +144,10 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| order | BangumiCommentOrder, optional | 排序方式。Defaults to BangumiCommentOrder.DEFAULT | -| next | str \| None, optional | 调用返回结果中的 next 键值,用于获取下一页数据。Defaults to None | +| `order` | `BangumiCommentOrder, optional` | 排序方式。Defaults to BangumiCommentOrder.DEFAULT | +| `next` | `str \| None, optional` | 调用返回结果中的 next 键值,用于获取下一页数据。Defaults to None | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -159,7 +158,7 @@ from bilibili_api import bangumi -**Returns:** int: 获取 media_id +**Returns:** `int`: 获取 media_id @@ -170,7 +169,7 @@ from bilibili_api import bangumi -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -181,7 +180,7 @@ from bilibili_api import bangumi -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -192,7 +191,7 @@ from bilibili_api import bangumi -**Returns:** Api 相关字段 +**Returns:** `dict`: Api 相关字段 @@ -203,7 +202,7 @@ from bilibili_api import bangumi -**Returns:** int: 获取季度 id +**Returns:** `int`: 获取季度 id @@ -215,10 +214,10 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| order | BangumiCommentOrder, optional | 排序方式。Defaults to BangumiCommentOrder.DEFAULT | -| next | str \| None, optional | 调用返回结果中的 next 键值,用于获取下一页数据。Defaults to None | +| `order` | `BangumiCommentOrder, optional` | 排序方式。Defaults to BangumiCommentOrder.DEFAULT | +| `next` | `str \| None, optional` | 调用返回结果中的 next 键值,用于获取下一页数据。Defaults to None | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -229,7 +228,7 @@ from bilibili_api import bangumi -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -240,7 +239,7 @@ from bilibili_api import bangumi -**Returns:** Api 相关字段 +**Returns:** `dict`: Api 相关字段 @@ -252,9 +251,8 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| media_id | int | 设置 media_id | +| `media_id` | `int` | 设置 media_id | -**Returns:** None @@ -265,9 +263,8 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| ssid | int | 设置季度 id | +| `ssid` | `int` | 设置季度 id | -**Returns:** None @@ -311,9 +308,9 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | -| video_class | Video | 视频类 | -| bangumi | Bangumi | 所属番剧 | +| `credential` | `Credential` | 凭据类 | +| `video_class` | `Video` | 视频类 | +| `bangumi` | `Bangumi` | 所属番剧 | ### def \_\_init\_\_() @@ -321,8 +318,8 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| epid | int | 番剧 epid | -| credential | Credential, optional | 凭据. Defaults to None. | +| `epid` | `int` | 番剧 epid | +| `credential` | `Credential, optional` | 凭据. Defaults to None. | ### async def get_ai_conclusion() @@ -332,9 +329,9 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| up_mid | Optional, int | up 主的 mid。 | +| `up_mid` | `Optional, int` | up 主的 mid。 | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -345,7 +342,7 @@ from bilibili_api import bangumi -**Returns:** str: AID。 +**Returns:** `str`: AID。 @@ -356,7 +353,7 @@ from bilibili_api import bangumi -**Returns:** Bangumi: 番剧类 +**Returns:** `Bangumi`: 番剧类 @@ -367,7 +364,7 @@ from bilibili_api import bangumi -**Returns:** Bangumi: 输入的集对应的番剧类 +**Returns:** `Bangumi`: 输入的集对应的番剧类 @@ -378,7 +375,7 @@ from bilibili_api import bangumi -**Returns:** str: BVID。 +**Returns:** `str`: BVID。 @@ -389,7 +386,7 @@ from bilibili_api import bangumi -**Returns:** int: cid +**Returns:** `int`: cid @@ -400,7 +397,7 @@ from bilibili_api import bangumi -**Returns:** dict: 二进制流解析结果 +**Returns:** `dict`: 二进制流解析结果 @@ -411,7 +408,7 @@ from bilibili_api import bangumi -**Returns:** str: 文件源 +**Returns:** `str`: 文件源 @@ -423,11 +420,11 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| date | datetime.date \| None, optional | 指定某一天查询弹幕. Defaults to None. (不指定某一天) | -| from_seg | int, optional | 从第几段开始(0 开始编号,None 为从第一段开始,一段 6 分钟). Defaults to None. | -| to_seg | int, optional | 到第几段结束(0 开始编号,None 为到最后一段,包含编号的段,一段 6 分钟). Defaults to None. | +| `date` | `datetime.date \| None, optional` | 指定某一天查询弹幕. Defaults to None. (不指定某一天) | +| `from_seg` | `int, optional` | 从第几段开始(0 开始编号,None 为从第一段开始,一段 6 分钟). Defaults to None. | +| `to_seg` | `int, optional` | 到第几段结束(0 开始编号,None 为到最后一段,包含编号的段,一段 6 分钟). Defaults to None. | -**Returns:** dict[Danmaku]: 弹幕列表 +**Returns:** `dict[Danmaku]`: 弹幕列表 @@ -438,7 +435,7 @@ from bilibili_api import bangumi -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -449,7 +446,6 @@ from bilibili_api import bangumi -**Returns:** None @@ -459,7 +455,7 @@ from bilibili_api import bangumi -**Returns:** Tuple[dict, InitialDataType]: 前半部分为数据,后半部分为数据类型(__INITIAL_STATE__ 或 __NEXT_DATA) +**Returns:** `Tuple[dict, InitialDataType]`: 前半部分为数据,后半部分为数据类型(__INITIAL_STATE__ 或 __NEXT_DATA) @@ -471,9 +467,9 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| date | datetime.date \| None, optional | 精确到年月. Defaults to None。 | +| `date` | `datetime.date \| None, optional` | 精确到年月. Defaults to None。 | -**Returns:** None | List[str]: 调用 API 返回的结果。不存在时为 None。 +**Returns:** `None | List[str]`: 调用 API 返回的结果。不存在时为 None。 @@ -484,7 +480,7 @@ from bilibili_api import bangumi -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -495,7 +491,7 @@ from bilibili_api import bangumi -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -506,7 +502,7 @@ from bilibili_api import bangumi -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -518,9 +514,9 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| dmid | int | 弹幕 id | +| `dmid` | `int` | 弹幕 id | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -532,9 +528,9 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| danmaku | Danmaku \| None | Danmaku 类。 | +| `danmaku` | `Danmaku \| None` | Danmaku 类。 | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -546,9 +542,8 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| epid | int | epid | +| `epid` | `int` | epid | -**Returns:** None @@ -579,12 +574,12 @@ from bilibili_api import bangumi | name | type | description | | - | - | - | -| lan | str | 字幕语言代码,参考 https | -| data | Dict | 字幕数据 | -| submit | bool | 是否提交,不提交为草稿 | -| sign | bool | 是否署名 | +| `lan` | `str` | 字幕语言代码,参考 https | +| `data` | `Dict` | 字幕数据 | +| `submit` | `bool` | 是否提交,不提交为草稿 | +| `sign` | `bool` | 是否署名 | -**Returns:** dict: API 调用返回结果 +**Returns:** `dict`: API 调用返回结果 @@ -1030,12 +1025,12 @@ start 或 end 为 None 时则表示不设置开始或结尾 | name | type | description | | - | - | - | -| start | datetime, str, int | 开始时间. 如果是 None 则不设置开头. | -| end | datetime, str, int | 结束时间. 如果是 None 则不设置结尾. | -| include_start | bool | 是否包含开始时间. 默认为 True. | -| include_end | bool | 是否包含结束时间. 默认为 False. | +| `start` | `datetime, str, int` | 开始时间. 如果是 None 则不设置开头. | +| `end` | `datetime, str, int` | 结束时间. 如果是 None 则不设置结尾. | +| `include_start` | `bool` | 是否包含开始时间. 默认为 True. | +| `include_end` | `bool` | 是否包含结束时间. 默认为 False. | -**Returns:** str: 年代条件 +**Returns:** `str`: 年代条件 @@ -1064,15 +1059,15 @@ Anime Meta | name | type | description | | - | - | - | -| version | Index_Filter.Version | 类型,如正片、电影等 | -| spoken_language | Index_Filter.Spoken_Language | 配音 | -| area | Index_Filter.Area | 地区 | -| finish_status | Index_Filter.Finish_Status | 是否完结 | -| copyright | Index_Filter.Copryright | 版权 | -| payment | Index_Filter.Payment | 付费门槛 | -| season | Index_Filter.Season | 季度 | -| year | str | 年份,调用 Index_Filter.make_time_filter() 传入年份 (int, str) 获取 | -| style | Index_Filter.Style.Anime | 风格 | +| `version` | `Index_Filter.Version` | 类型,如正片、电影等 | +| `spoken_language` | `Index_Filter.Spoken_Language` | 配音 | +| `area` | `Index_Filter.Area` | 地区 | +| `finish_status` | `Index_Filter.Finish_Status` | 是否完结 | +| `copyright` | `Index_Filter.Copryright` | 版权 | +| `payment` | `Index_Filter.Payment` | 付费门槛 | +| `season` | `Index_Filter.Season` | 季度 | +| `year` | `str` | 年份,调用 Index_Filter.make_time_filter() 传入年份 (int, str) 获取 | +| `style` | `Index_Filter.Style.Anime` | 风格 | ### class Documentary() @@ -1088,10 +1083,10 @@ Documentary Meta | name | type | description | | - | - | - | -| area | Index_Filter.Area | 地区 | -| release_date | str | 上映时间,调用 Index_Filter.make_time_filter() 传入年份 (datetime.datetime) 获取 | -| style | Index_Filter.Style.Documentary | 风格 | -| producer | Index_Filter.Producer | 制作方 | +| `area` | `Index_Filter.Area` | 地区 | +| `release_date` | `str` | 上映时间,调用 Index_Filter.make_time_filter() 传入年份 (datetime.datetime) 获取 | +| `style` | `Index_Filter.Style.Documentary` | 风格 | +| `producer` | `Index_Filter.Producer` | 制作方 | ### class GuoChuang() @@ -1107,12 +1102,12 @@ Guochuang Meta | name | type | description | | - | - | - | -| version | Index_Filter.VERSION | 类型,如正片、电影等 | -| finish_status | Index_Filter.Finish_Status | 是否完结 | -| copyright | Index_Filter.Copyright | 版权 | -| payment | Index_Filter.Payment | 付费门槛 | -| year | str | 年份,调用 Index_Filter.make_time_filter() 传入年份 (int, str) 获取 | -| style | Index_Filter.Style.GuoChuang | 风格 | +| `version` | `Index_Filter.VERSION` | 类型,如正片、电影等 | +| `finish_status` | `Index_Filter.Finish_Status` | 是否完结 | +| `copyright` | `Index_Filter.Copyright` | 版权 | +| `payment` | `Index_Filter.Payment` | 付费门槛 | +| `year` | `str` | 年份,调用 Index_Filter.make_time_filter() 传入年份 (int, str) 获取 | +| `style` | `Index_Filter.Style.GuoChuang` | 风格 | ### class Movie() @@ -1128,11 +1123,11 @@ Movie Meta | name | type | description | | - | - | - | -| area | Index_Filter.Area | 地区 | -| payment | Index_Filter.Payment | 付费门槛 | -| season | Index_Filter.Season | 季度 | -| release_date | str | 上映时间,调用 Index_Filter.make_time_filter() 传入年份 (datetime.datetime) 获取 | -| style | Index_Filter.Style.Movie | 风格 | +| `area` | `Index_Filter.Area` | 地区 | +| `payment` | `Index_Filter.Payment` | 付费门槛 | +| `season` | `Index_Filter.Season` | 季度 | +| `release_date` | `str` | 上映时间,调用 Index_Filter.make_time_filter() 传入年份 (datetime.datetime) 获取 | +| `style` | `Index_Filter.Style.Movie` | 风格 | ### class TV() @@ -1148,10 +1143,10 @@ TV Meta | name | type | description | | - | - | - | -| area | Index_Filter.Area | 地区 | -| payment | Index_Filter.Payment | 付费门槛 | -| release_date | str | 上映时间,调用 Index_Filter.make_time_filter() 传入年份 (datetime.datetime) 获取 | -| style | Index_Filter.Style.TV | 风格 | +| `area` | `Index_Filter.Area` | 地区 | +| `payment` | `Index_Filter.Payment` | 付费门槛 | +| `release_date` | `str` | 上映时间,调用 Index_Filter.make_time_filter() 传入年份 (datetime.datetime) 获取 | +| `style` | `Index_Filter.Style.TV` | 风格 | ### class Variety() @@ -1167,8 +1162,8 @@ Variety Meta | name | type | description | | - | - | - | -| payment | Index_Filter.Payment | 付费门槛 | -| style | Index_Filter.Style.Variety | 风格 | +| `payment` | `Index_Filter.Payment` | 付费门槛 | +| `style` | `Index_Filter.Style.Variety` | 风格 | --- @@ -1182,13 +1177,13 @@ Variety Meta | name | type | description | | - | - | - | -| filters | Index_Filter_Meta, optional | 筛选条件元数据. Defaults to Anime. | -| order | BANGUMI_INDEX.ORDER, optional | 排序字段. Defaults to SCORE. | -| sort | BANGUMI_INDEX.SORT, optional | 排序方式. Defaults to DESC. | -| pn | int, optional | 页数. Defaults to 1. | -| ps | int, optional | 每页数量. Defaults to 20. | +| `filters` | `Index_Filter_Meta, optional` | 筛选条件元数据. Defaults to Anime. | +| `order` | `BANGUMI_INDEX.ORDER, optional` | 排序字段. Defaults to SCORE. | +| `sort` | `BANGUMI_INDEX.SORT, optional` | 排序方式. Defaults to DESC. | +| `pn` | `int, optional` | 页数. Defaults to 1. | +| `ps` | `int, optional` | 每页数量. Defaults to 20. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -1202,11 +1197,10 @@ Variety Meta | name | type | description | | - | - | - | -| type_ | BangumiType | 番剧类型 | -| before | int | 几天前开始(0~7), defaults to 7 | -| after | int | 几天后结束(0~7), defaults to 0 | +| `type_` | `BangumiType` | 番剧类型 | +| `before` | `int` | 几天前开始(0~7), defaults to 7 | +| `after` | `int` | 几天后结束(0~7), defaults to 0 | -**Returns:** None @@ -1219,11 +1213,11 @@ Variety Meta | name | type | description | | - | - | - | -| bangumi | Bangumi | 番剧类 | -| status | bool, optional | 追番状态. Defaults to True. | -| credential | Credential \| None, optional | 凭据. Defaults to None. | +| `bangumi` | `Bangumi` | 番剧类 | +| `status` | `bool, optional` | 追番状态. Defaults to True. | +| `credential` | `Credential \| None, optional` | 凭据. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -1237,11 +1231,11 @@ Variety Meta | name | type | description | | - | - | - | -| bangumi | Bangumi | 番剧类 | -| credential | Credential \| None, optional | 凭据. Defaults to None. | -| status | int | 追番状态 1 想看 2 在看 3 已看 | +| `bangumi` | `Bangumi` | 番剧类 | +| `credential` | `Credential \| None, optional` | 凭据. Defaults to None. | +| `status` | `int` | 追番状态 1 想看 2 在看 3 已看 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/bilibili_api.md b/docs/modules/bilibili_api.md index 4feff8f6..9f2435f4 100644 --- a/docs/modules/bilibili_api.md +++ b/docs/modules/bilibili_api.md @@ -180,10 +180,9 @@ API 基类异常。 | name | type | description | | - | - | - | -| name | str | 事件名。 | -| handler | Union[Callable, Coroutine] | 回调函数。 | +| `name` | `str` | 事件名。 | +| `handler` | `Union[Callable, Coroutine]` | 回调函数。 | -**Returns:** None @@ -194,10 +193,9 @@ API 基类异常。 | name | type | description | | - | - | - | -| name | str | 事件名。 | -| *args, **kwargs: 要传递给函数的参数。 | | 要传递给函数的参数。 | +| `name` | `str` | 事件名。 | +| `*args, **kwargs` | `Any` | 要传递给函数的参数。 | -**Returns:** None @@ -208,9 +206,8 @@ API 基类异常。 | name | type | description | | - | - | - | -| name | str | 事件名。 | +| `name` | `str` | 事件名。 | -**Returns:** None @@ -221,9 +218,8 @@ API 基类异常。 | name | type | description | | - | - | - | -| event_name | str | 事件名。 | +| `event_name` | `str` | 事件名。 | -**Returns:** None @@ -233,7 +229,6 @@ API 基类异常。 -**Returns:** None @@ -244,10 +239,10 @@ API 基类异常。 | name | type | description | | - | - | - | -| name | str | 事件名。 | -| handler | Union[Callable, Coroutine] | 要移除的函数。 | +| `name` | `str` | 事件名。 | +| `handler` | `Union[Callable, Coroutine]` | 要移除的函数。 | -**Returns:** bool, 是否移除成功。 +**Returns:** `bool`: 是否移除成功。 @@ -258,7 +253,6 @@ API 基类异常。 -**Returns:** None @@ -498,8 +492,8 @@ class BiliAPIClient(ABC): | name | type | description | | - | - | - | -| path | str | 文件地址 | -| mime_type | str | 文件类型 | +| `path` | `str` | 文件地址 | +| `mime_type` | `str` | 文件类型 | --- @@ -513,11 +507,11 @@ class BiliAPIClient(ABC): | name | type | description | | - | - | - | -| code | int | 响应码 | -| headers | Dict | 响应头 | -| cookies | Dict | 当前状态的 cookies | -| raw | bytes | 响应数据 | -| url | str | 当前 url | +| `code` | `int` | 响应码 | +| `headers` | `Dict` | 响应头 | +| `cookies` | `Dict` | 当前状态的 cookies | +| `raw` | `bytes` | 响应数据 | +| `url` | `str` | 当前 url | ### def json() @@ -526,7 +520,7 @@ class BiliAPIClient(ABC): -**Returns:** object: 解析后的 json +**Returns:** `object`: 解析后的 json @@ -537,7 +531,7 @@ class BiliAPIClient(ABC): -**Returns:** str: utf8 文字 +**Returns:** `str`: utf8 文字 @@ -590,11 +584,11 @@ Cookies 刷新错误。 | name | type | description | | - | - | - | -| sessdata | str \| None, optional | 浏览器 Cookies 中的 SESSDATA 字段值. Defaults to None. | -| bili_jct | str \| None, optional | 浏览器 Cookies 中的 bili_jct 字段值. Defaults to None. | -| buvid3 | str \| None, optional | 浏览器 Cookies 中的 BUVID3 字段值. Defaults to None. | -| dedeuserid | str \| None, optional | 浏览器 Cookies 中的 DedeUserID 字段值. Defaults to None. | -| ac_time_value | str \| None, optional | 浏览器 Cookies 中的 ac_time_value 字段值. Defaults to None. | +| `sessdata` | `str \| None, optional` | 浏览器 Cookies 中的 SESSDATA 字段值. Defaults to None. | +| `bili_jct` | `str \| None, optional` | 浏览器 Cookies 中的 bili_jct 字段值. Defaults to None. | +| `buvid3` | `str \| None, optional` | 浏览器 Cookies 中的 BUVID3 字段值. Defaults to None. | +| `dedeuserid` | `str \| None, optional` | 浏览器 Cookies 中的 DedeUserID 字段值. Defaults to None. | +| `ac_time_value` | `str \| None, optional` | 浏览器 Cookies 中的 ac_time_value 字段值. Defaults to None. | ### async def check_refresh() @@ -603,7 +597,7 @@ Cookies 刷新错误。 -**Returns:** bool: cookies 是否需要刷新 +**Returns:** `bool`: cookies 是否需要刷新 @@ -614,7 +608,7 @@ Cookies 刷新错误。 -**Returns:** bool: cookies 是否有效 +**Returns:** `bool`: cookies 是否有效 @@ -628,9 +622,9 @@ Cookies 刷新错误。 | name | type | description | | - | - | - | -| cookies | Dict, optional | Cookies. Defaults to {}. | +| `cookies` | `Dict, optional` | Cookies. Defaults to {}. | -**Returns:** Credential: 凭据类 +**Returns:** `Credential`: 凭据类 @@ -641,7 +635,7 @@ Cookies 刷新错误。 -**Returns:** dict: 请求 Cookies 字典 +**Returns:** `dict`: 请求 Cookies 字典 @@ -652,7 +646,7 @@ Cookies 刷新错误。 -**Returns:** bool. +**Returns:** `bool`: 是否提供 ac_time_value @@ -663,7 +657,7 @@ Cookies 刷新错误。 -**Returns:** bool。 +**Returns:** `bool`: 是否提供 bili_jct。 @@ -674,7 +668,7 @@ Cookies 刷新错误。 -**Returns:** bool. +**Returns:** `bool`: 是否提供 buvid3 @@ -685,7 +679,7 @@ Cookies 刷新错误。 -**Returns:** bool。 +**Returns:** `bool`: 是否提供 dedeuserid。 @@ -696,7 +690,7 @@ Cookies 刷新错误。 -**Returns:** bool。 +**Returns:** `bool`: 是否提供 sessdata。 @@ -707,7 +701,6 @@ Cookies 刷新错误。 -**Returns:** None @@ -717,7 +710,6 @@ Cookies 刷新错误。 -**Returns:** None @@ -727,7 +719,6 @@ Cookies 刷新错误。 -**Returns:** None @@ -737,7 +728,6 @@ Cookies 刷新错误。 -**Returns:** None @@ -747,7 +737,6 @@ Cookies 刷新错误。 -**Returns:** None @@ -757,7 +746,6 @@ Cookies 刷新错误。 -**Returns:** None @@ -834,21 +822,21 @@ Credential 类未提供 sessdata 时的异常。 | name | type | description | | - | - | - | -| text | str | 弹幕文本。 | -| dm_time | float, optional | 弹幕在视频中的位置,单位为秒。Defaults to 0.0. | -| send_time | float, optional | 弹幕发送的时间。Defaults to time.time(). | -| crc32_id | str, optional | 弹幕发送者 UID 经 CRC32 算法取摘要后的值。Defaults to "". | -| color | str, optional | 弹幕十六进制颜色。Defaults to "ffffff" (如果为大会员专属的颜色则为"special"). | -| weight | int, optional | 弹幕在弹幕列表显示的权重。Defaults to -1. | -| id_ | int, optional | 弹幕 ID。Defaults to -1. | -| id_str | str, optional | 弹幕字符串 ID。Defaults to "". | -| action | str, optional | 暂不清楚。Defaults to "". | -| mode | Union[DmMode, int], optional | 弹幕模式。Defaults to Mode.FLY. | -| font_size | Union[DmFontSize, int], optional | 弹幕字体大小。Defaults to FontSize.NORMAL. | -| is_sub | bool, optional | 是否为字幕弹幕。Defaults to False. | -| pool | int, optional | 池。Defaults to 0. | -| attr | int, optional | 暂不清楚。 Defaults to -1. | -| uid | int, optional | 弹幕发送者 UID。Defaults to -1. | +| `text` | `str` | 弹幕文本。 | +| `dm_time` | `float, optional` | 弹幕在视频中的位置,单位为秒。Defaults to 0.0. | +| `send_time` | `float, optional` | 弹幕发送的时间。Defaults to time.time(). | +| `crc32_id` | `str, optional` | 弹幕发送者 UID 经 CRC32 算法取摘要后的值。Defaults to "". | +| `color` | `str, optional` | 弹幕十六进制颜色。Defaults to "ffffff" (如果为大会员专属的颜色则为"special"). | +| `weight` | `int, optional` | 弹幕在弹幕列表显示的权重。Defaults to -1. | +| `id_` | `int, optional` | 弹幕 ID。Defaults to -1. | +| `id_str` | `str, optional` | 弹幕字符串 ID。Defaults to "". | +| `action` | `str, optional` | 暂不清楚。Defaults to "". | +| `mode` | `Union[DmMode, int], optional` | 弹幕模式。Defaults to Mode.FLY. | +| `font_size` | `Union[DmFontSize, int], optional` | 弹幕字体大小。Defaults to FontSize.NORMAL. | +| `is_sub` | `bool, optional` | 是否为字幕弹幕。Defaults to False. | +| `pool` | `int, optional` | 池。Defaults to 0. | +| `attr` | `int, optional` | 暂不清楚。 Defaults to -1. | +| `uid` | `int, optional` | 弹幕发送者 UID。Defaults to -1. | **@staticmethod** @@ -864,9 +852,9 @@ Credential 类未提供 sessdata 时的异常。 | name | type | description | | - | - | - | -| crc32_id | str | crc32 id | +| `crc32_id` | `str` | crc32 id | -**Returns:** int: 真实 UID。 +**Returns:** `int`: 真实 UID。 @@ -877,7 +865,7 @@ Credential 类未提供 sessdata 时的异常。 -**Returns:** xml +**Returns:** `str`: xml @@ -958,7 +946,6 @@ ExClimbWuzhi 失败异常 -**Returns:** None @@ -969,10 +956,9 @@ ExClimbWuzhi 失败异常 | name | type | description | | - | - | - | -| validate | str | 作答结果的 validate | -| seccode | str | 作答结果的 seccode | +| `validate` | `str` | 作答结果的 validate | +| `seccode` | `str` | 作答结果的 seccode | -**Returns:** None @@ -983,9 +969,8 @@ ExClimbWuzhi 失败异常 | name | type | description | | - | - | - | -| type_ | GeetestType | 极验验证码类型。登录为 LOGIN,登录验证为 VERIFY. Defaults to GeetestType.LOGIN. | +| `type_` | `GeetestType` | 极验验证码类型。登录为 LOGIN,登录验证为 VERIFY. Defaults to GeetestType.LOGIN. | -**Returns:** None @@ -995,7 +980,7 @@ ExClimbWuzhi 失败异常 -**Returns:** str: 链接 +**Returns:** `str`: 链接 @@ -1006,7 +991,7 @@ ExClimbWuzhi 失败异常 -**Returns:** GeetestMeta: 验证码信息 +**Returns:** `GeetestMeta`: 验证码信息 @@ -1017,7 +1002,7 @@ ExClimbWuzhi 失败异常 -**Returns:** GeetestMeta: 验证结果 +**Returns:** `GeetestMeta`: 验证结果 @@ -1028,7 +1013,7 @@ ExClimbWuzhi 失败异常 -**Returns:** GeetestType: 测试类型 +**Returns:** `GeetestType`: 测试类型 @@ -1039,7 +1024,7 @@ ExClimbWuzhi 失败异常 -**Returns:** bool: 是否完成 +**Returns:** `bool`: 是否完成 @@ -1050,7 +1035,6 @@ ExClimbWuzhi 失败异常 -**Returns:** None @@ -1060,7 +1044,7 @@ ExClimbWuzhi 失败异常 -**Returns:** bool: 是否有创建的测试 +**Returns:** `bool`: 是否有创建的测试 @@ -1154,12 +1138,12 @@ NOTE: `gt`, `challenge`, `token` 为验证码基本字段。`seccode`, `validate | name | type | description | | - | - | - | -| height | int | 高度 | -| imageType | str | 格式,例如 | -| size | Any | 大小。单位 KB | -| url | str | 图片链接 | -| width | int | 宽度 | -| content | bytes | 图片内容 | +| `height` | `int` | 高度 | +| `imageType` | `str` | 格式,例如 | +| `size` | `Any` | 大小。单位 KB | +| `url` | `str` | 图片链接 | +| `width` | `int` | 宽度 | +| `content` | `bytes` | 图片内容 | ### def convert_format() @@ -1169,9 +1153,9 @@ NOTE: `gt`, `challenge`, `token` 为验证码基本字段。`seccode`, `validate | name | type | description | | - | - | - | -| new_format | str | 新的格式。例:`png`, `ico`, `webp`. | +| `new_format` | `str` | 新的格式。例:`png`, `ico`, `webp`. | -**Returns:** Picture: `self` +**Returns:** `Picture`: `self` @@ -1185,10 +1169,10 @@ NOTE: `gt`, `challenge`, `token` 为验证码基本字段。`seccode`, `validate | name | type | description | | - | - | - | -| content | str | 图片内容 | -| format | str | 图片后缀名,如 `webp`, `jpg`, `ico` | +| `content` | `str` | 图片内容 | +| `format` | `str` | 图片后缀名,如 `webp`, `jpg`, `ico` | -**Returns:** Picture: 加载后的图片对象 +**Returns:** `Picture`: 加载后的图片对象 @@ -1202,9 +1186,9 @@ NOTE: `gt`, `challenge`, `token` 为验证码基本字段。`seccode`, `validate | name | type | description | | - | - | - | -| path | str | 图片地址 | +| `path` | `str` | 图片地址 | -**Returns:** Picture: 加载后的图片对象 +**Returns:** `Picture`: 加载后的图片对象 @@ -1218,9 +1202,9 @@ NOTE: `gt`, `challenge`, `token` 为验证码基本字段。`seccode`, `validate | name | type | description | | - | - | - | -| url | str | 图片链接 | +| `url` | `str` | 图片链接 | -**Returns:** Picture: 加载后的图片对象 +**Returns:** `Picture`: 加载后的图片对象 @@ -1232,10 +1216,10 @@ NOTE: `gt`, `challenge`, `token` 为验证码基本字段。`seccode`, `validate | name | type | description | | - | - | - | -| width | int | 宽度 | -| height | int | 高度 | +| `width` | `int` | 宽度 | +| `height` | `int` | 高度 | -**Returns:** Picture: `self` +**Returns:** `Picture`: `self` @@ -1247,9 +1231,9 @@ NOTE: `gt`, `challenge`, `token` 为验证码基本字段。`seccode`, `validate | name | type | description | | - | - | - | -| path | str | 下载地址。 | +| `path` | `str` | 下载地址。 | -**Returns:** Picture: `self` +**Returns:** `Picture`: `self` @@ -1261,9 +1245,9 @@ NOTE: `gt`, `challenge`, `token` 为验证码基本字段。`seccode`, `validate | name | type | description | | - | - | - | -| credential | Credential | 凭据类。 | +| `credential` | `Credential` | 凭据类。 | -**Returns:** Picture: `self` +**Returns:** `Picture`: `self` @@ -1275,9 +1259,9 @@ NOTE: `gt`, `challenge`, `token` 为验证码基本字段。`seccode`, `validate | name | type | description | | - | - | - | -| credential | Credential | 凭据类。 | +| `credential` | `Credential` | 凭据类。 | -**Returns:** Picture: `self` +**Returns:** `Picture`: `self` @@ -1347,11 +1331,11 @@ API 响应异常。 | name | type | description | | - | - | - | -| content | str | 弹幕内容 | -| id_ | int | 弹幕 id. Defaults to -1. | -| id_str | str | 弹幕 id (string 类型). Defaults to "". | -| mode | Union[DmMode, int] | 弹幕类型. Defaults to DmMode.SPECIAL. | -| pool | int | 弹幕池. Defaults to 2. | +| `content` | `str` | 弹幕内容 | +| `id_` | `int` | 弹幕 id. Defaults to -1. | +| `id_str` | `str` | 弹幕 id (string 类型). Defaults to "". | +| `mode` | `Union[DmMode, int]` | 弹幕类型. Defaults to DmMode.SPECIAL. | +| `pool` | `int` | 弹幕池. Defaults to 2. | --- @@ -1395,9 +1379,9 @@ AV 号转 BV 号。 | name | type | description | | - | - | - | -| aid | int | AV 号。 | +| `aid` | `int` | AV 号。 | -**Returns:** str: BV 号。 +**Returns:** `str`: BV 号。 @@ -1410,9 +1394,9 @@ BV 号转 AV 号。 | name | type | description | | - | - | - | -| bvid | str | BV 号。 | +| `bvid` | `str` | BV 号。 | -**Returns:** int: AV 号。 +**Returns:** `int`: AV 号。 @@ -1425,7 +1409,7 @@ BV 号转 AV 号。 -**Returns:** List[str]: 支持的设置项名称 +**Returns:** `List[str]`: 支持的设置项名称 @@ -1438,7 +1422,7 @@ BV 号转 AV 号。 -**Returns:** BiliAPIClient: 请求客户端 +**Returns:** `BiliAPIClient`: 请求客户端 @@ -1452,14 +1436,12 @@ BV 号转 AV 号。 | name | type | description | | - | - | - | -| short_url | str | 短链接。 | -| credential | Credential \| None | 凭据类。 | +| `short_url` | `str` | 短链接。 | +| `credential` | `Credential \| None` | 凭据类。 | -**Returns:** 目标链接(如果不是有效的链接会报错) +**Returns:** `str`: 目标链接(如果不是有效的链接会报错) -返回值为原 url 类型 - --- @@ -1470,7 +1452,7 @@ BV 号转 AV 号。 -**Returns:** Dict[str, List[str]]: 所有注册过的 BiliAPIClient 所支持的设置项 +**Returns:** `Dict[str, List[str]]`: 所有注册过的 BiliAPIClient 所支持的设置项 @@ -1483,7 +1465,7 @@ BV 号转 AV 号。 -**Returns:** Dict[str, Type[BiliAPIClient]]: 注册过的 BiliAPIClient +**Returns:** `Dict[str, Type[BiliAPIClient]]`: 注册过的 BiliAPIClient @@ -1496,7 +1478,7 @@ BV 号转 AV 号。 -**Returns:** Tuple[str, Type[BiliAPIClient]]: 第 0 项为客户端名称,第 1 项为对应的类 +**Returns:** `Tuple[str, Type[BiliAPIClient]]`: 第 0 项为客户端名称,第 1 项为对应的类 @@ -1509,7 +1491,7 @@ BV 号转 AV 号。 -**Returns:** object: 会话对象 +**Returns:** `object`: 会话对象 @@ -1523,10 +1505,10 @@ BV 号转 AV 号。 | name | type | description | | - | - | - | -| url | str | 链接 | -| credential | Credential | 凭据类 | +| `url` | `str` | 链接 | +| `credential` | `Credential` | 凭据类 | -**Returns:** Tuple[obj, ResourceType]: (对象,类型) 或 -1,-1 表示出错 +**Returns:** `Tuple[obj, ResourceType]`: (对象,类型) 或 -1,-1 表示出错 @@ -1540,11 +1522,10 @@ BV 号转 AV 号。 | name | type | description | | - | - | - | -| name | str | 请求客户端类型名称,用户自定义命名。 | -| cls | type | 基于 BiliAPIClient 重写后的请求客户端类。 | -| settings | Dict | 请求客户端在基础设置外的其他设置,键为设置名称,值为设置默认值。Defaults to {}. | +| `name` | `str` | 请求客户端类型名称,用户自定义命名。 | +| `cls` | `type` | 基于 BiliAPIClient 重写后的请求客户端类。 | +| `settings` | `Dict` | 请求客户端在基础设置外的其他设置,键为设置名称,值为设置默认值。Defaults to {}. | -**Returns:** None @@ -1598,7 +1579,7 @@ async def handle(desc: str, data: dict) -> None: -**Returns:** dict: 日志输出排除的事件类型 +**Returns:** `dict`: 日志输出排除的事件类型 @@ -1609,7 +1590,7 @@ async def handle(desc: str, data: dict) -> None: -**Returns:** dict: 日志输出支持的事件类型 +**Returns:** `dict`: 日志输出支持的事件类型 @@ -1620,7 +1601,7 @@ async def handle(desc: str, data: dict) -> None: -**Returns:** bool: 是否启用 +**Returns:** `bool`: 是否启用 @@ -1632,9 +1613,8 @@ async def handle(desc: str, data: dict) -> None: | name | type | description | | - | - | - | -| events | Dict | 日志输出排除的事件类型 | +| `events` | `Dict` | 日志输出排除的事件类型 | -**Returns:** None @@ -1645,9 +1625,8 @@ async def handle(desc: str, data: dict) -> None: | name | type | description | | - | - | - | -| status | bool | 是否启用 | +| `status` | `bool` | 是否启用 | -**Returns:** None @@ -1658,9 +1637,8 @@ async def handle(desc: str, data: dict) -> None: | name | type | description | | - | - | - | -| events | Dict | 日志输出支持的事件类型 | +| `events` | `Dict` | 日志输出支持的事件类型 | -**Returns:** None @@ -1681,9 +1659,9 @@ async def handle(desc: str, data: dict) -> None: | name | type | description | | - | - | - | -| name | str | 设置名称 | +| `name` | `str` | 设置名称 | -**Returns:** Any: 设置的值 +**Returns:** `Any`: 设置的值 @@ -1694,7 +1672,7 @@ async def handle(desc: str, data: dict) -> None: -**Returns:** dict: 所有的设置项 +**Returns:** `dict`: 所有的设置项 @@ -1705,7 +1683,7 @@ async def handle(desc: str, data: dict) -> None: -**Returns:** str: 代理地址. Defaults to "". +**Returns:** `str`: 代理地址. Defaults to "". @@ -1716,7 +1694,7 @@ async def handle(desc: str, data: dict) -> None: -**Returns:** float: 超时时间. Defaults to 5.0. +**Returns:** `float`: 超时时间. Defaults to 5.0. @@ -1727,7 +1705,7 @@ async def handle(desc: str, data: dict) -> None: -**Returns:** bool: `trust_env`. Defaults to True. +**Returns:** `bool`: `trust_env`. Defaults to True. @@ -1738,7 +1716,7 @@ async def handle(desc: str, data: dict) -> None: -**Returns:** bool: 是否验证 SSL. Defaults to True. +**Returns:** `bool`: 是否验证 SSL. Defaults to True. @@ -1749,7 +1727,7 @@ async def handle(desc: str, data: dict) -> None: -**Returns:** int: wbi 重试次数. Defaults to 3. +**Returns:** `int`: wbi 重试次数. Defaults to 3. @@ -1763,10 +1741,9 @@ async def handle(desc: str, data: dict) -> None: | name | type | description | | - | - | - | -| name | str | 设置名称 | -| value | str | 设置的值 | +| `name` | `str` | 设置名称 | +| `value` | `str` | 设置的值 | -**Returns:** None @@ -1777,9 +1754,8 @@ async def handle(desc: str, data: dict) -> None: | name | type | description | | - | - | - | -| proxy | str | 代理地址 | +| `proxy` | `str` | 代理地址 | -**Returns:** None @@ -1790,9 +1766,8 @@ async def handle(desc: str, data: dict) -> None: | name | type | description | | - | - | - | -| timeout | float | 超时时间 | +| `timeout` | `float` | 超时时间 | -**Returns:** None @@ -1803,9 +1778,8 @@ async def handle(desc: str, data: dict) -> None: | name | type | description | | - | - | - | -| verify_ssl | bool | `trust_env` | +| `verify_ssl` | `bool` | `trust_env` | -**Returns:** None @@ -1816,9 +1790,8 @@ async def handle(desc: str, data: dict) -> None: | name | type | description | | - | - | - | -| verify_ssl | bool | 是否验证 SSL | +| `verify_ssl` | `bool` | 是否验证 SSL | -**Returns:** None @@ -1829,9 +1802,8 @@ async def handle(desc: str, data: dict) -> None: | name | type | description | | - | - | - | -| wbi_retry_times | int | wbi 重试次数. | +| `wbi_retry_times` | `int` | wbi 重试次数. | -**Returns:** None @@ -1844,9 +1816,8 @@ async def handle(desc: str, data: dict) -> None: | name | type | description | | - | - | - | -| name | str | 请求客户端类型名称,用户自定义命名。 | +| `name` | `str` | 请求客户端类型名称,用户自定义命名。 | -**Returns:** None @@ -1859,9 +1830,8 @@ async def handle(desc: str, data: dict) -> None: | name | type | description | | - | - | - | -| session | object | 会话对象 | +| `session` | `object` | 会话对象 | -**Returns:** None @@ -1874,9 +1844,9 @@ async def handle(desc: str, data: dict) -> None: | name | type | description | | - | - | - | -| obj | Coroutine \| Future | 异步函数 | +| `obj` | `Coroutine \| Future` | 异步函数 | -**Returns:** 该异步函数的返回值 +**Returns:** `Any`: 该异步函数的返回值 @@ -1890,9 +1860,8 @@ async def handle(desc: str, data: dict) -> None: | name | type | description | | - | - | - | -| name | str | 请求客户端类型名称,用户自定义命名。 | +| `name` | `str` | 请求客户端类型名称,用户自定义命名。 | -**Returns:** None diff --git a/docs/modules/black_room.md b/docs/modules/black_room.md index 7d3e3a95..42da5526 100644 --- a/docs/modules/black_room.md +++ b/docs/modules/black_room.md @@ -96,7 +96,7 @@ from bilibili_api import black_room | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | ### def \_\_init\_\_() @@ -104,8 +104,8 @@ from bilibili_api import black_room | name | type | description | | - | - | - | -| black_room_id | int | 小黑屋 id | -| credential | Credential \| None, optional | 凭据类. Defaults to None. | +| `black_room_id` | `int` | 小黑屋 id | +| `credential` | `Credential \| None, optional` | 凭据类. Defaults to None. | ### async def get_details() @@ -114,7 +114,7 @@ from bilibili_api import black_room -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -125,7 +125,7 @@ from bilibili_api import black_room -**Returns:** int: 小黑屋 id +**Returns:** `int`: 小黑屋 id @@ -136,7 +136,7 @@ from bilibili_api import black_room -**Returns:** BlackReasonType: 封禁原因枚举类 +**Returns:** `BlackReasonType`: 封禁原因枚举类 @@ -148,9 +148,8 @@ from bilibili_api import black_room | name | type | description | | - | - | - | -| id_ | int | 小黑屋 id | +| `id_` | `int` | 小黑屋 id | -**Returns:** None @@ -190,8 +189,8 @@ from bilibili_api import black_room | name | type | description | | - | - | - | -| case_id | str | 案件 id | -| credential | Credential | 凭据类 | +| `case_id` | `str` | 案件 id | +| `credential` | `Credential` | 凭据类 | ### async def get_details() @@ -200,7 +199,7 @@ from bilibili_api import black_room -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -212,10 +211,10 @@ from bilibili_api import black_room | name | type | description | | - | - | - | -| pn | int, optional | 页数. Defaults to 1. | -| ps | int, optional | 每页数量. Defaults to 20. | +| `pn` | `int, optional` | 页数. Defaults to 1. | +| `ps` | `int, optional` | 每页数量. Defaults to 20. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -227,12 +226,12 @@ from bilibili_api import black_room | name | type | description | | - | - | - | -| opinion | JuryVoteOpinion | 投票选项类型 | -| is_insider | bool | 是否观看此类视频 | -| is_anonymous | bool | 是否匿名投票 | -| reason | str, optional | 投票理由. Defaults to None. | +| `opinion` | `JuryVoteOpinion` | 投票选项类型 | +| `is_insider` | `bool` | 是否观看此类视频 | +| `is_anonymous` | `bool` | 是否匿名投票 | +| `reason` | `str, optional` | 投票理由. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -269,12 +268,11 @@ from bilibili_api import black_room | name | type | description | | - | - | - | -| from_ | BlackFrom | 违规来源. Defaults to BlackFrom.ALL. | -| type_ | int | 违规类型. Defaults to BlackType.ALL. | -| pn | int | 页数. Defaults to 1. | -| credential | Credential \| None | 凭据. Defaults to None. | +| `from_` | `BlackFrom` | 违规来源. Defaults to BlackFrom.ALL. | +| `type_` | `int` | 违规类型. Defaults to BlackType.ALL. | +| `pn` | `int` | 页数. Defaults to 1. | +| `credential` | `Credential \| None` | 凭据. Defaults to None. | -**Returns:** None @@ -287,11 +285,11 @@ from bilibili_api import black_room | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | -| pn | int, optional | 页数. Defaults to 1. | -| ps | int, optional | 每页数量. Defaults to 20. | +| `credential` | `Credential` | 凭据类 | +| `pn` | `int, optional` | 页数. Defaults to 1. | +| `ps` | `int, optional` | 每页数量. Defaults to 20. | -**Returns:** List[JuryCase]: 仲裁案件列表 +**Returns:** `List[JuryCase]`: 仲裁案件列表 @@ -305,9 +303,9 @@ from bilibili_api import black_room | name | type | description | | - | - | - | -| credential | Credential \| None, optional | 凭据类. Defaults to None. | +| `credential` | `Credential \| None, optional` | 凭据类. Defaults to None. | -**Returns:** JuryCase: 案件类 +**Returns:** `JuryCase`: 案件类 diff --git a/docs/modules/channel_series.md b/docs/modules/channel_series.md index 8123f0a3..8b1661e8 100644 --- a/docs/modules/channel_series.md +++ b/docs/modules/channel_series.md @@ -44,7 +44,7 @@ from bilibili_api import channel_series | name | type | description | | - | - | - | -| credential | Credential | 凭据类. Defaults to None. | +| `credential` | `Credential` | 凭据类. Defaults to None. | ### def \_\_init\_\_() @@ -52,10 +52,10 @@ from bilibili_api import channel_series | name | type | description | | - | - | - | -| uid | int | 用户 uid. Defaults to -1. | -| type_ | ChannelSeriesType | 合集与列表类型. Defaults to ChannelSeriesType.SERIES. | -| id_ | int | season_id 或 series_id. Defaults to -1. | -| credential | Credential | 凭证. Defaults to None. | +| `uid` | `int` | 用户 uid. Defaults to -1. | +| `type_` | `ChannelSeriesType` | 合集与列表类型. Defaults to ChannelSeriesType.SERIES. | +| `id_` | `int` | season_id 或 series_id. Defaults to -1. | +| `credential` | `Credential` | 凭证. Defaults to None. | ### async def get_meta() @@ -64,7 +64,7 @@ from bilibili_api import channel_series -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -75,11 +75,11 @@ from bilibili_api import channel_series | name | type | description | | - | - | - | -| sort | ChannelOrder | 排序方式 | -| pn | int | 页数,默认为 1 | -| ps | int | 每一页显示的视频数量 | +| `sort` | `ChannelOrder` | 排序方式 | +| `pn` | `int` | 页数,默认为 1 | +| `ps` | `int` | 每一页显示的视频数量 | -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -109,11 +109,11 @@ from bilibili_api import channel_series | name | type | description | | - | - | - | -| series_id | int | 旧版合集 id。 | -| aids | List[int] | 视频 aid 列表。 | -| credential | Credential | 凭据类。 | +| `series_id` | `int` | 旧版合集 id。 | +| `aids` | `List[int]` | 视频 aid 列表。 | +| `credential` | `Credential` | 凭据类。 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -127,13 +127,13 @@ from bilibili_api import channel_series | name | type | description | | - | - | - | -| name | str | 列表名称。 | -| aids | List[int] | 要加入列表的视频的 aid 列表。 | -| keywords | List[str] | 列表的关键词。 | -| description | str | 列表的描述。 | -| credential | Credential \| None | 凭据类。 | +| `name` | `str` | 列表名称。 | +| `aids` | `List[int]` | 要加入列表的视频的 aid 列表。 | +| `keywords` | `List[str]` | 列表的关键词。 | +| `description` | `str` | 列表的描述。 | +| `credential` | `Credential \| None` | 凭据类。 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -147,11 +147,11 @@ from bilibili_api import channel_series | name | type | description | | - | - | - | -| series_id | int | 旧版合集 id。 | -| aids | List[int] | 视频 aid 列表。 | -| credential | Credential | 凭据类。 | +| `series_id` | `int` | 旧版合集 id。 | +| `aids` | `List[int]` | 视频 aid 列表。 | +| `credential` | `Credential` | 凭据类。 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -165,10 +165,10 @@ from bilibili_api import channel_series | name | type | description | | - | - | - | -| series_id | int | 旧版合集 id。 | -| credential | Credential | 凭据类。 | +| `series_id` | `int` | 旧版合集 id。 | +| `credential` | `Credential` | 凭据类。 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -182,10 +182,9 @@ from bilibili_api import channel_series | name | type | description | | - | - | - | -| season_id | int | 合集 id | -| status | bool | 是否订阅状态. Defaults to True. | +| `season_id` | `int` | 合集 id | +| `status` | `bool` | 是否订阅状态. Defaults to True. | -**Returns:** None diff --git a/docs/modules/cheese.md b/docs/modules/cheese.md index f4764e6a..fecb0f7d 100644 --- a/docs/modules/cheese.md +++ b/docs/modules/cheese.md @@ -58,7 +58,7 @@ from bilibili_api import cheese | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | ### def \_\_init\_\_() @@ -69,9 +69,9 @@ from bilibili_api import cheese | name | type | description | | - | - | - | -| season_id | int | ssid | -| ep_id | int | 单集 ep_id | -| credential | Credential | 凭据类 | +| `season_id` | `int` | ssid | +| `ep_id` | `int` | 单集 ep_id | +| `credential` | `Credential` | 凭据类 | ### async def get_list() @@ -80,7 +80,7 @@ from bilibili_api import cheese -**Returns:** List[CheeseVideo]: 课程视频列表 +**Returns:** `List[CheeseVideo]`: 课程视频列表 @@ -91,7 +91,7 @@ from bilibili_api import cheese -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -102,7 +102,7 @@ from bilibili_api import cheese -**Returns:** 调用 API 所得的结果。 +**Returns:** `dict`: 调用 API 返回的结果 @@ -113,7 +113,7 @@ from bilibili_api import cheese -**Returns:** int: 季度 id +**Returns:** `int`: 季度 id @@ -125,9 +125,8 @@ from bilibili_api import cheese | name | type | description | | - | - | - | -| ep_id | int | epid | +| `ep_id` | `int` | epid | -**Returns:** None @@ -138,9 +137,8 @@ from bilibili_api import cheese | name | type | description | | - | - | - | -| season_id | int | 季度 id | +| `season_id` | `int` | 季度 id | -**Returns:** None @@ -154,8 +152,8 @@ from bilibili_api import cheese | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | -| cheese | CheeseList | 所属的课程 | +| `credential` | `Credential` | 凭据类 | +| `cheese` | `CheeseList` | 所属的课程 | ### def \_\_init\_\_() @@ -163,8 +161,8 @@ from bilibili_api import cheese | name | type | description | | - | - | - | -| epid | int | 单集 ep_id | -| credential | Credential | 凭据类 | +| `epid` | `int` | 单集 ep_id | +| `credential` | `Credential` | 凭据类 | ### async def get_aid() @@ -173,7 +171,7 @@ from bilibili_api import cheese -**Returns:** int: aid +**Returns:** `int`: aid @@ -184,7 +182,7 @@ from bilibili_api import cheese -**Returns:** CheeseList: 所属课程 +**Returns:** `CheeseList`: 所属课程 @@ -195,7 +193,7 @@ from bilibili_api import cheese -**Returns:** int: cid +**Returns:** `int`: cid @@ -206,7 +204,7 @@ from bilibili_api import cheese -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -217,7 +215,7 @@ from bilibili_api import cheese -**Returns:** str: 文件源 +**Returns:** `str`: 文件源 @@ -229,11 +227,11 @@ from bilibili_api import cheese | name | type | description | | - | - | - | -| date | datetime.Date \| None, optional | 指定日期后为获取历史弹幕,精确到年月日。Defaults to None. | -| from_seg | int, optional | 从第几段开始(0 开始编号,None 为从第一段开始,一段 6 分钟). Defaults to None. | -| to_seg | int, optional | 到第几段结束(0 开始编号,None 为到最后一段,包含编号的段,一段 6 分钟). Defaults to None. | +| `date` | `datetime.Date \| None, optional` | 指定日期后为获取历史弹幕,精确到年月日。Defaults to None. | +| `from_seg` | `int, optional` | 从第几段开始(0 开始编号,None 为从第一段开始,一段 6 分钟). Defaults to None. | +| `to_seg` | `int, optional` | 到第几段结束(0 开始编号,None 为到最后一段,包含编号的段,一段 6 分钟). Defaults to None. | -**Returns:** List[Danmaku]: Danmaku 类的列表。 +**Returns:** `List[Danmaku]`: Danmaku 类的列表。 注意: @@ -249,7 +247,7 @@ from bilibili_api import cheese -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -260,7 +258,7 @@ from bilibili_api import cheese -**Returns:** int: epid +**Returns:** `int`: epid @@ -271,7 +269,7 @@ from bilibili_api import cheese -**Returns:** dict: 视频元数据 +**Returns:** `dict`: 视频元数据 @@ -282,7 +280,7 @@ from bilibili_api import cheese -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -293,7 +291,7 @@ from bilibili_api import cheese -**Returns:** int: 视频已投币数量。 +**Returns:** `int`: 视频已投币数量。 @@ -304,7 +302,7 @@ from bilibili_api import cheese -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -315,7 +313,7 @@ from bilibili_api import cheese -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -326,7 +324,7 @@ from bilibili_api import cheese -**Returns:** bool: 视频是否已收藏。 +**Returns:** `bool`: 视频是否已收藏。 @@ -337,7 +335,7 @@ from bilibili_api import cheese -**Returns:** bool: 视频是否点赞过。 +**Returns:** `bool`: 视频是否点赞过。 @@ -349,9 +347,9 @@ from bilibili_api import cheese | name | type | description | | - | - | - | -| status | bool, optional | 点赞状态。Defaults to True. | +| `status` | `bool, optional` | 点赞状态。Defaults to True. | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -363,10 +361,10 @@ from bilibili_api import cheese | name | type | description | | - | - | - | -| num | int, optional | 硬币数量,为 1 ~ 2 个。Defaults to 1. | -| like | bool, optional | 是否同时点赞。Defaults to False. | +| `num` | `int, optional` | 硬币数量,为 1 ~ 2 个。Defaults to 1. | +| `like` | `bool, optional` | 是否同时点赞。Defaults to False. | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -378,9 +376,9 @@ from bilibili_api import cheese | name | type | description | | - | - | - | -| danmaku | Danmaku \| None | Danmaku 类。Defaults to None. | +| `danmaku` | `Danmaku \| None` | Danmaku 类。Defaults to None. | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -392,9 +390,8 @@ from bilibili_api import cheese | name | type | description | | - | - | - | -| epid | int | epid | +| `epid` | `int` | epid | -**Returns:** None @@ -405,10 +402,10 @@ from bilibili_api import cheese | name | type | description | | - | - | - | -| add_media_ids | List[int], optional | 要添加到的收藏夹 ID. Defaults to []. | -| del_media_ids | List[int], optional | 要移出的收藏夹 ID. Defaults to []. | +| `add_media_ids` | `List[int], optional` | 要添加到的收藏夹 ID. Defaults to []. | +| `del_media_ids` | `List[int], optional` | 要移出的收藏夹 ID. Defaults to []. | -**Returns:** dict: 调用 API 返回结果。 +**Returns:** `dict`: 调用 API 返回结果。 diff --git a/docs/modules/client.md b/docs/modules/client.md index 9e471c9c..d7ff5130 100644 --- a/docs/modules/client.md +++ b/docs/modules/client.md @@ -20,7 +20,7 @@ from bilibili_api import client -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/comment.md b/docs/modules/comment.md index 2ee0f0b4..9d7b2f9a 100644 --- a/docs/modules/comment.md +++ b/docs/modules/comment.md @@ -45,7 +45,7 @@ from bilibili_api import comment | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | ### def \_\_init\_\_() @@ -53,10 +53,10 @@ from bilibili_api import comment | name | type | description | | - | - | - | -| oid | int | 评论所在资源 ID。 | -| type_ | ResourceType | 评论所在资源类型枚举。 | -| rpid | int | 评论 ID。 | -| credential | Credential | 凭据类. Defaults to None. | +| `oid` | `int` | 评论所在资源 ID。 | +| `type_` | `ResourceType` | 评论所在资源类型枚举。 | +| `rpid` | `int` | 评论 ID。 | +| `credential` | `Credential` | 凭据类. Defaults to None. | ### async def delete() @@ -65,7 +65,7 @@ from bilibili_api import comment -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -76,7 +76,7 @@ from bilibili_api import comment -**Returns:** int: oid +**Returns:** `int`: oid @@ -87,7 +87,7 @@ from bilibili_api import comment -**Returns:** int: rpid +**Returns:** `int`: rpid @@ -99,10 +99,10 @@ from bilibili_api import comment | name | type | description | | - | - | - | -| page_index | int, optional | 页码索引,从 1 开始。Defaults to 1. | -| page_size | int, optional | 每页评论数。设置大于20的数值不会起作用。Defaults to 10. | +| `page_index` | `int, optional` | 页码索引,从 1 开始。Defaults to 1. | +| `page_size` | `int, optional` | 每页评论数。设置大于20的数值不会起作用。Defaults to 10. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -113,7 +113,7 @@ from bilibili_api import comment -**Returns:** CommentResourceType: 资源类型 +**Returns:** `CommentResourceType`: 资源类型 @@ -125,9 +125,9 @@ from bilibili_api import comment | name | type | description | | - | - | - | -| status | bool, optional | 状态, Defaults to True. | +| `status` | `bool, optional` | 状态, Defaults to True. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -139,9 +139,9 @@ from bilibili_api import comment | name | type | description | | - | - | - | -| status | bool, optional | 状态, Defaults to True. | +| `status` | `bool, optional` | 状态, Defaults to True. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -153,9 +153,9 @@ from bilibili_api import comment | name | type | description | | - | - | - | -| status | bool, optional | 状态, Defaults to True. | +| `status` | `bool, optional` | 状态, Defaults to True. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -167,10 +167,10 @@ from bilibili_api import comment | name | type | description | | - | - | - | -| report_reason | ReportReason | 举报类型枚举 | -| content | str, optional | 其他举报备注内容仅 reason=ReportReason.OTHER 可用且不能为 None. | +| `report_reason` | `ReportReason` | 举报类型枚举 | +| `content` | `str, optional` | 其他举报备注内容仅 reason=ReportReason.OTHER 可用且不能为 None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 Error Code: @@ -268,13 +268,13 @@ Error Code: | name | type | description | | - | - | - | -| oid | int | 资源 ID。 | -| type_ | CommentsResourceType | 资源类枚举。 | -| page_index | int, optional | 页码. Defaults to 1. | -| order | OrderType, optional | 排序方式枚举. Defaults to OrderType.TIME. | -| credential | Credential, optional | 凭据。Defaults to None. | +| `oid` | `int` | 资源 ID。 | +| `type_` | `CommentsResourceType` | 资源类枚举。 | +| `page_index` | `int, optional` | 页码. Defaults to 1. | +| `order` | `OrderType, optional` | 排序方式枚举. Defaults to OrderType.TIME. | +| `credential` | `Credential, optional` | 凭据。Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -290,13 +290,13 @@ Error Code: | name | type | description | | - | - | - | -| oid | int | 资源 ID。 | -| type_ | CommentsResourceType | 资源类枚举。 | -| offset | str, optional | 偏移量。每次请求可获取下次请求对应的偏移量,类似单向链表。对应返回结果的 `["cursor"]["pagination_reply"]["next_offset"]` | -| order | OrderType, optional | 排序方式枚举. Defaults to OrderType.TIME. | -| credential | Credential, optional | 凭据。Defaults to None. | +| `oid` | `int` | 资源 ID。 | +| `type_` | `CommentsResourceType` | 资源类枚举。 | +| `offset` | `str, optional` | 偏移量。每次请求可获取下次请求对应的偏移量,类似单向链表。对应返回结果的 `["cursor"]["pagination_reply"]["next_offset"]` | +| `order` | `OrderType, optional` | 排序方式枚举. Defaults to OrderType.TIME. | +| `credential` | `Credential, optional` | 凭据。Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -318,14 +318,14 @@ Error Code: | name | type | description | | - | - | - | -| text | str | 评论内容。 | -| oid | str | 资源 ID。 | -| type_ | CommentsResourceType | 资源类型枚举。 | -| root | int, optional | 根评论 ID, Defaults to None. | -| parent | int, optional | 父评论 ID, Defaults to None. | -| credential | Credential | 凭据 | - -**Returns:** dict: 调用 API 返回的结果 +| `text` | `str` | 评论内容。 | +| `oid` | `str` | 资源 ID。 | +| `type_` | `CommentsResourceType` | 资源类型枚举。 | +| `root` | `int, optional` | 根评论 ID, Defaults to None. | +| `parent` | `int, optional` | 父评论 ID, Defaults to None. | +| `credential` | `Credential` | 凭据 | + +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/creative_center.md b/docs/modules/creative_center.md index fe8eda8a..0dfd5431 100644 --- a/docs/modules/creative_center.md +++ b/docs/modules/creative_center.md @@ -340,12 +340,11 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | -| oid | int, lsit | 指定稿件 | -| rpid | int, lsit | 指定评论 | -| archive_type | ArchiveType | 稿件类型 | +| `credentials` | `Credential` | Credential 凭据。 | +| `oid` | `int, lsit` | 指定稿件 | +| `rpid` | `int, lsit` | 指定评论 | +| `archive_type` | `ArchiveType` | 稿件类型 | -**Returns:** None @@ -358,10 +357,9 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| oid | int | 稿件 oid | -| dmids | List[int], int | 弹幕 id,可以传入列表和 int | +| `oid` | `int` | 稿件 oid | +| `dmids` | `List[int], int` | 弹幕 id,可以传入列表和 int | -**Returns:** None @@ -374,11 +372,11 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| oid | int | 稿件 oid | -| dmids | List[int], int | 弹幕 id,可以传入列表和 int | -| is_subtitle | bool | 是否为字幕 | +| `oid` | `int` | 稿件 oid | +| `dmids` | `List[int], int` | 弹幕 id,可以传入列表和 int | +| `is_subtitle` | `bool` | 是否为字幕 | -**Returns:** dict: API 返回信息 +**Returns:** `dict`: API 返回信息 @@ -392,11 +390,11 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| oid | int | 稿件 oid | -| dmids | List[int], int | 弹幕 id,可以传入列表和 int | -| state | int, Optional | 弹幕状态 1 删除 2 保护 3 取消保护 | +| `oid` | `int` | 稿件 oid | +| `dmids` | `List[int], int` | 弹幕 id,可以传入列表和 int | +| `state` | `int, Optional` | 弹幕状态 1 删除 2 保护 3 取消保护 | -**Returns:** dict: API 返回信息 +**Returns:** `dict`: API 返回信息 @@ -410,10 +408,10 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | -| graph_type | ArticleInfoType | 图表类型。 | +| `credentials` | `Credential` | Credential 凭据。 | +| `graph_type` | `ArticleInfoType` | 图表类型。 | -**Returns:** dict: 文章图表数据。 +**Returns:** `dict`: 文章图表数据。 @@ -427,9 +425,9 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | +| `credentials` | `Credential` | Credential 凭据。 | -**Returns:** dict: 内容管理文集信息。 +**Returns:** `dict`: 内容管理文集信息。 @@ -443,9 +441,9 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | +| `credentials` | `Credential` | Credential 凭据。 | -**Returns:** dict: 文章概览数据。 +**Returns:** `dict`: 文章概览数据。 @@ -459,10 +457,10 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | -| rank_type | ArticleInfoType | 排行依据。 | +| `credentials` | `Credential` | Credential 凭据。 | +| `rank_type` | `ArticleInfoType` | 排行依据。 | -**Returns:** dict: 文章排行数据。 +**Returns:** `dict`: 文章排行数据。 @@ -476,9 +474,9 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | +| `credentials` | `Credential` | Credential 凭据。 | -**Returns:** dict: 文章阅读终端数据。 +**Returns:** `dict`: 文章阅读终端数据。 @@ -492,12 +490,12 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | -| pn | int | 页码 | -| status | UploadManagerArticleStatus | 稿件状态 | -| sort | UploadManagerSort | 稿件排序 | +| `credentials` | `Credential` | Credential 凭据。 | +| `pn` | `int` | 页码 | +| `status` | `UploadManagerArticleStatus` | 稿件状态 | +| `sort` | `UploadManagerSort` | 稿件排序 | -**Returns:** dict: 内容管理文章信息。 +**Returns:** `dict`: 内容管理文章信息。 @@ -511,17 +509,17 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | -| oid | Optional, int | 指定稿件 | -| keyword | Optional, str | 关键词 | -| archive_type | ArchiveType | 稿件类型 | -| order | CommentManagerOrder | 排序字段 | -| filter | int | 筛选器,作用未知 | -| pn | int | 页码 | -| ps | int | 每页项数 | -| charge_plus_filter | bool | charge_plus_filter | +| `credentials` | `Credential` | Credential 凭据。 | +| `oid` | `Optional, int` | 指定稿件 | +| `keyword` | `Optional, str` | 关键词 | +| `archive_type` | `ArchiveType` | 稿件类型 | +| `order` | `CommentManagerOrder` | 排序字段 | +| `filter` | `int` | 筛选器,作用未知 | +| `pn` | `int` | 页码 | +| `ps` | `int` | 每页项数 | +| `charge_plus_filter` | `bool` | charge_plus_filter | -**Returns:** dict: 评论管理评论信息。 +**Returns:** `dict`: 评论管理评论信息。 @@ -535,9 +533,9 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | +| `credentials` | `Credential` | Credential 凭据。 | -**Returns:** dict: 视频对比数据。 +**Returns:** `dict`: 视频对比数据。 @@ -551,26 +549,26 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credential | Credential | Credential 凭据 | -| oid | int | 稿件oid,用逗号分隔 | -| select_type | DanmakuType | 弹幕类型 | -| archive_type | ArchiveType | 稿件类型 | -| mids | List[int], int | 用户mids,用逗号分隔或者直接 int | -| keyword | str | 关键词 | -| progress_from | int | 进度开始 | -| progress_to | int | 进度结束 | -| ctime_from | datetime.datetime | 创建时间起始 | -| ctime_to | datetime.datetime | 创建时间结束 | -| modes | DanmakuMode | 弹幕模式。 | -| pool | DanmakuPool | 弹幕池 | -| attrs | Unknown | 弹幕属性,未知参数 | -| order | DanmakuOrder | 排序字段 | -| sort | DanmakuSort | 排序方式 | -| pn | int | 页码。 | -| ps | int | 每页项数。 | -| cp_filter | bool | 是否过滤CP弹幕。未知参数,默认为 False | +| `credential` | `Credential` | Credential 凭据 | +| `oid` | `int` | 稿件oid,用逗号分隔 | +| `select_type` | `DanmakuType` | 弹幕类型 | +| `archive_type` | `ArchiveType` | 稿件类型 | +| `mids` | `List[int], int` | 用户mids,用逗号分隔或者直接 int | +| `keyword` | `str` | 关键词 | +| `progress_from` | `int` | 进度开始 | +| `progress_to` | `int` | 进度结束 | +| `ctime_from` | `datetime.datetime` | 创建时间起始 | +| `ctime_to` | `datetime.datetime` | 创建时间结束 | +| `modes` | `DanmakuMode` | 弹幕模式。 | +| `pool` | `DanmakuPool` | 弹幕池 | +| `attrs` | `Unknown` | 弹幕属性,未知参数 | +| `order` | `DanmakuOrder` | 排序字段 | +| `sort` | `DanmakuSort` | 排序方式 | +| `pn` | `int` | 页码。 | +| `ps` | `int` | 每页项数。 | +| `cp_filter` | `bool` | 是否过滤CP弹幕。未知参数,默认为 False | -**Returns:** dict: 弹幕搜索结果 +**Returns:** `dict`: 弹幕搜索结果 @@ -584,11 +582,11 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | -| period | FanGraphPeriod | 时间段。 | -| graph_type | FanGraphType | 图表类型。 | +| `credentials` | `Credential` | Credential 凭据。 | +| `period` | `FanGraphPeriod` | 时间段。 | +| `graph_type` | `FanGraphType` | 图表类型。 | -**Returns:** dict: 粉丝图表数据。 +**Returns:** `dict`: 粉丝图表数据。 @@ -602,10 +600,10 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | -| period | FanGraphPeriod | 时间段。 | +| `credentials` | `Credential` | Credential 凭据。 | +| `period` | `FanGraphPeriod` | 时间段。 | -**Returns:** dict: 粉丝概览数据。 +**Returns:** `dict`: 粉丝概览数据。 @@ -619,11 +617,11 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | -| period | GraphPeriod | 时间段。 | -| graph_type | GraphType | 图表类型。 | +| `credentials` | `Credential` | Credential 凭据。 | +| `period` | `GraphPeriod` | 时间段。 | +| `graph_type` | `GraphType` | 图表类型。 | -**Returns:** dict: 视频统计图表数据。 +**Returns:** `dict`: 视频统计图表数据。 @@ -637,10 +635,10 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | -| period | GraphPeriod | 时间段。 | +| `credentials` | `Credential` | Credential 凭据。 | +| `period` | `GraphPeriod` | 时间段。 | -**Returns:** dict: 视频概览数据。 +**Returns:** `dict`: 视频概览数据。 @@ -654,11 +652,11 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credential | Credential | Credential 凭据。 | -| pn | int | 页码。 | -| ps | int | 每页项数。 | +| `credential` | `Credential` | Credential 凭据。 | +| `pn` | `int` | 页码。 | +| `ps` | `int` | 每页项数。 | -**Returns:** dict: 弹幕管理最近弹幕信息。 +**Returns:** `dict`: 弹幕管理最近弹幕信息。 @@ -672,9 +670,9 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | +| `credentials` | `Credential` | Credential 凭据。 | -**Returns:** dict: 内容管理视频草稿信息。 +**Returns:** `dict`: 内容管理视频草稿信息。 @@ -688,10 +686,10 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | -| copyright | Copyright | 版权类型。 | +| `credentials` | `Credential` | Credential 凭据。 | +| `copyright` | `Copyright` | 版权类型。 | -**Returns:** dict: 稿件播放完成率对比数据。 +**Returns:** `dict`: 稿件播放完成率对比数据。 @@ -705,9 +703,9 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | +| `credentials` | `Credential` | Credential 凭据。 | -**Returns:** dict: 视频来源分布数据。 +**Returns:** `dict`: 视频来源分布数据。 @@ -721,9 +719,9 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | +| `credentials` | `Credential` | Credential 凭据。 | -**Returns:** dict: 视频分区排行数据。 +**Returns:** `dict`: 视频分区排行数据。 @@ -737,15 +735,15 @@ from bilibili_api import creative_center | name | type | description | | - | - | - | -| credentials | Credential | Credential 凭据。 | -| is_interative | bool | 是否为互动视频 | -| pn | int | 页码 | -| ps | int | 每页项数 | -| tid: | | (VideoZoneTypes, None, int) | -| status | UploadManagerStatus | 稿件状态 | -| order | UploadManagerOrder | 稿件排序 | - -**Returns:** dict: 内容管理视频信息。 +| `credentials` | `Credential` | Credential 凭据。 | +| `is_interative` | `bool` | 是否为互动视频 | +| `pn` | `int` | 页码 | +| `ps` | `int` | 每页项数 | +| `tid` | `VideoZoneTypes, None, int` | 分区 | +| `status` | `UploadManagerStatus` | 稿件状态 | +| `order` | `UploadManagerOrder` | 稿件排序 | + +**Returns:** `dict`: 内容管理视频信息。 diff --git a/docs/modules/dynamic.md b/docs/modules/dynamic.md index 59187536..bbf9e603 100644 --- a/docs/modules/dynamic.md +++ b/docs/modules/dynamic.md @@ -96,10 +96,9 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| uid | int | 用户ID | -| uname | str | 用户名称. Defaults to "". | +| `uid` | `int` | 用户ID | +| `uname` | `str` | 用户名称. Defaults to "". | -**Returns:** None @@ -110,9 +109,8 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| emoji | str | 表情文字 | +| `emoji` | `str` | 表情文字 | -**Returns:** None @@ -123,9 +121,8 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| image | Picture \| List[Picture] | 图片类 | +| `image` | `Picture \| List[Picture]` | 图片类 | -**Returns:** None @@ -136,9 +133,8 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| text | str | 文本内容 | +| `text` | `str` | 文本内容 | -**Returns:** None @@ -149,9 +145,8 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| text | str | 文本内容 | +| `text` | `str` | 文本内容 | -**Returns:** None @@ -162,9 +157,8 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| vote_id | int | 投票对象 | +| `vote_id` | `int` | 投票对象 | -**Returns:** None @@ -177,14 +171,13 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| text | str, optional | 动态文字. Defaults to "". | -| pics | List[Picture] , optional | 动态图片列表. Defaults to []. | -| topic_id | int, optional | 动态话题 id. Defaults to -1. | -| vote_id | int, optional | 动态中的投票的 id. 将放在整个动态的最后面. Defaults to -1. | -| live_reserve_id | int, optional | 直播预约 oid. 通过 `live.create_live_reserve` 获取. Defaults to -1. | -| send_time | datetime \| None, optional | 发送时间. Defaults to None. | +| `text` | `str, optional` | 动态文字. Defaults to "". | +| `pics` | `List[Picture] , optional` | 动态图片列表. Defaults to []. | +| `topic_id` | `int, optional` | 动态话题 id. Defaults to -1. | +| `vote_id` | `int, optional` | 动态中的投票的 id. 将放在整个动态的最后面. Defaults to -1. | +| `live_reserve_id` | `int, optional` | 直播预约 oid. 通过 `live.create_live_reserve` 获取. Defaults to -1. | +| `send_time` | `datetime \| None, optional` | 发送时间. Defaults to None. | -**Returns:** None @@ -196,7 +189,6 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** None @@ -206,7 +198,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** Optional[dict]: 动态预约 +**Returns:** `Optional[dict]`: 动态预约 @@ -218,9 +210,9 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| credential | Credential | 凭据类。必需。 | +| `credential` | `Credential` | 凭据类。必需。 | -**Returns:** list: 动态内容 +**Returns:** `list`: 动态内容 @@ -231,7 +223,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** SendDynamicType: 动态类型 +**Returns:** `SendDynamicType`: 动态类型 @@ -242,7 +234,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** dict: 动态选项 +**Returns:** `dict`: 动态选项 @@ -253,7 +245,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** list: 动态图片 +**Returns:** `list`: 动态图片 @@ -264,7 +256,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** Optional[dict]: 动态话题 +**Returns:** `Optional[dict]`: 动态话题 @@ -278,9 +270,8 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| oid | int | 卡片oid | +| `oid` | `int` | 卡片oid | -**Returns:** None @@ -291,10 +282,9 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| up_choose_comment | bool | 精选评论flag | -| close_comment | bool | 关闭评论flag | +| `up_choose_comment` | `bool` | 精选评论flag | +| `close_comment` | `bool` | 关闭评论flag | -**Returns:** None @@ -305,9 +295,8 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| time | datetime | 发送时间 | +| `time` | `datetime` | 发送时间 | -**Returns:** None @@ -318,9 +307,8 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| topic_id | int | 话题ID | +| `topic_id` | `int` | 话题ID | -**Returns:** None @@ -333,7 +321,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | ### def \_\_init\_\_() @@ -341,8 +329,8 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| dynamic_id | int | 动态 ID | -| credential | Credential \| None, optional | 凭据类. Defaults to None. | +| `dynamic_id` | `int` | 动态 ID | +| `credential` | `Credential \| None, optional` | 凭据类. Defaults to None. | ### async def delete() @@ -351,7 +339,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -362,7 +350,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** int: 动态 ID。 +**Returns:** `int`: 动态 ID。 @@ -373,7 +361,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -385,10 +373,10 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| pn | int, optional | 页码,defaults to 1 | -| ps | int, optional | 每页大小,defaults to 30 | +| `pn` | `int, optional` | 页码,defaults to 1 | +| `ps` | `int, optional` | 每页大小,defaults to 30 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -399,7 +387,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -411,9 +399,9 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| offset | str, optional | 偏移值(下一页的第一个动态 ID,为该请求结果中的 offset 键对应的值),类似单向链表. Defaults to "" | +| `offset` | `str, optional` | 偏移值(下一页的第一个动态 ID,为该请求结果中的 offset 键对应的值),类似单向链表. Defaults to "" | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -425,9 +413,9 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| offset | str, optional | 偏移值(下一页的第一个动态 ID,为该请求结果中的 offset 键对应的值),类似单向链表. Defaults to "0" | +| `offset` | `str, optional` | 偏移值(下一页的第一个动态 ID,为该请求结果中的 offset 键对应的值),类似单向链表. Defaults to "0" | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -438,7 +426,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** int: rid +**Returns:** `int`: rid @@ -449,7 +437,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** bool: 是否为专栏 +**Returns:** `bool`: 是否为专栏 @@ -462,7 +450,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** bool: 是否为图文 +**Returns:** `bool`: 是否为图文 @@ -473,7 +461,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** str: markdown +**Returns:** `str`: markdown @@ -485,9 +473,9 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| text | str, optional | 转发动态时的文本内容. Defaults to "转发动态" | +| `text` | `str, optional` | 转发动态时的文本内容. Defaults to "转发动态" | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -499,9 +487,9 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| status | bool, optional | 收藏状态. Defaults to True | +| `status` | `bool, optional` | 收藏状态. Defaults to True | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -513,9 +501,9 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) | name | type | description | | - | - | - | -| status | bool, optional | 点赞状态. Defaults to True. | +| `status` | `bool, optional` | 点赞状态. Defaults to True. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -530,7 +518,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** Article: 专栏实例 +**Returns:** `Article`: 专栏实例 @@ -543,7 +531,7 @@ BuildDynamic.create_by_args(text="114514", topic_id=114514) -**Returns:** Opus: 图文对象 +**Returns:** `Opus`: 图文对象 @@ -604,10 +592,10 @@ scene 参数 | name | type | description | | - | - | - | -| draft_id | int | 定时动态 ID | -| credential | Credential | 凭据 | +| `draft_id` | `int` | 定时动态 ID | +| `credential` | `Credential` | 凭据 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -621,9 +609,9 @@ scene 参数 | name | type | description | | - | - | - | -| credential | Credential | 凭据类. | +| `credential` | `Credential` | 凭据类. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -641,14 +629,14 @@ scene 参数 | name | type | description | | - | - | - | -| credential | Credential | 凭据类. | -| _type | DynamicType, optional | 动态类型. Defaults to DynamicType.ALL. | -| host_mid | int, optional | 获取对应 UP 主动态的 mid. Defaults to None. | -| features | str, optional | 默认 itemOpusStyle. | -| pn | int, optional | 页码. Defaults to 1. | -| offset | int, optional | 偏移值(下一页的第一个动态 ID,为该请求结果中的 offset 键对应的值),类似单向链表. Defaults to None. | +| `credential` | `Credential` | 凭据类. | +| `_type` | `DynamicType, optional` | 动态类型. Defaults to DynamicType.ALL. | +| `host_mid` | `int, optional` | 获取对应 UP 主动态的 mid. Defaults to None. | +| `features` | `str, optional` | 默认 itemOpusStyle. | +| `pn` | `int, optional` | 页码. Defaults to 1. | +| `offset` | `int, optional` | 偏移值(下一页的第一个动态 ID,为该请求结果中的 offset 键对应的值),类似单向链表. Defaults to None. | -**Returns:** list[Dynamic]: 动态类列表 +**Returns:** `list[Dynamic]`: 动态类列表 @@ -662,10 +650,10 @@ scene 参数 | name | type | description | | - | - | - | -| size | int | 获取的数据数量. Defaults to 10. | -| credential | Credential \| None | 凭据类. Defaults to None. | +| `size` | `int` | 获取的数据数量. Defaults to 10. | +| `credential` | `Credential \| None` | 凭据类. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -679,9 +667,9 @@ scene 参数 | name | type | description | | - | - | - | -| credential | Credential \| None | 凭据类. Defaults to None. | +| `credential` | `Credential \| None` | 凭据类. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -695,9 +683,9 @@ scene 参数 | name | type | description | | - | - | - | -| credential | Credential | 凭据 | +| `credential` | `Credential` | 凭据 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -711,10 +699,10 @@ scene 参数 | name | type | description | | - | - | - | -| info | BuildDynamic | 动态内容 | -| credential | Credential | 凭据 | +| `info` | `BuildDynamic` | 动态内容 | +| `credential` | `Credential` | 凭据 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -728,10 +716,10 @@ scene 参数 | name | type | description | | - | - | - | -| draft_id | int | 定时动态 ID | -| credential | Credential | 凭据 | +| `draft_id` | `int` | 定时动态 ID | +| `credential` | `Credential` | 凭据 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -745,11 +733,11 @@ scene 参数 | name | type | description | | - | - | - | -| image | Picture | 图片流. 有格式要求. | -| credential | Credential | 凭据 | -| data | Dict | 自定义请求体 | +| `image` | `Picture` | 图片流. 有格式要求. | +| `credential` | `Credential` | 凭据 | +| `data` | `Dict` | 自定义请求体 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/emoji.md b/docs/modules/emoji.md index d80352dc..8c15ecc8 100644 --- a/docs/modules/emoji.md +++ b/docs/modules/emoji.md @@ -23,10 +23,10 @@ from bilibili_api import emoji | name | type | description | | - | - | - | -| business | str | 使用场景, reply / dynamic | -| credential | Credential | 登录凭证. Defaults to None. | +| `business` | `str` | 使用场景, reply / dynamic | +| `credential` | `Credential` | 登录凭证. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -40,10 +40,10 @@ from bilibili_api import emoji | name | type | description | | - | - | - | -| id | Union[int, List[int]] | 表情包 id,可通过 `get_emoji_list` 或 `get_all_emoji` 查询。 | -| business | str | 使用场景, reply / dynamic | +| `id` | `Union[int, List[int]]` | 表情包 id,可通过 `get_emoji_list` 或 `get_all_emoji` 查询。 | +| `business` | `str` | 使用场景, reply / dynamic | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -57,10 +57,10 @@ from bilibili_api import emoji | name | type | description | | - | - | - | -| business | str | 使用场景, reply / dynamic | -| credential | Credential | 登录凭证. Defaults to None. | +| `business` | `str` | 使用场景, reply / dynamic | +| `credential` | `Credential` | 登录凭证. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/favorite_list.md b/docs/modules/favorite_list.md index baf323e9..b27e669c 100644 --- a/docs/modules/favorite_list.md +++ b/docs/modules/favorite_list.md @@ -46,7 +46,7 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | ### def \_\_init\_\_() @@ -54,9 +54,9 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| type_ | FavoriteListType, optional | 收藏夹类型. Defaults to FavoriteListType.VIDEO. | -| media_id | int, optional | 收藏夹号(仅为视频收藏夹时提供). Defaults to None. | -| credential | Credential, optional | 凭据类. Defaults to Credential(). | +| `type_` | `FavoriteListType, optional` | 收藏夹类型. Defaults to FavoriteListType.VIDEO. | +| `media_id` | `int, optional` | 收藏夹号(仅为视频收藏夹时提供). Defaults to None. | +| `credential` | `Credential, optional` | 凭据类. Defaults to Credential(). | ### async def get_content() @@ -66,9 +66,9 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| page | int, optional | 页码. Defaults to 1. | +| `page` | `int, optional` | 页码. Defaults to 1. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -79,7 +79,7 @@ from bilibili_api import favorite_list -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -91,13 +91,13 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| page | int, optional | 页码. Defaults to 1. | -| keyword | str \| None, optional | 搜索关键词. Defaults to None. | -| order | FavoriteListContentOrder, optional | 排序方式. Defaults to FavoriteListContentOrder.MTIME. | -| mode | SearchFavoriteListMode, optional | 搜索模式,默认仅当前收藏夹. | -| tid | int, optional | 分区 ID. Defaults to 0. | +| `page` | `int, optional` | 页码. Defaults to 1. | +| `keyword` | `str \| None, optional` | 搜索关键词. Defaults to None. | +| `order` | `FavoriteListContentOrder, optional` | 排序方式. Defaults to FavoriteListContentOrder.MTIME. | +| `mode` | `SearchFavoriteListMode, optional` | 搜索模式,默认仅当前收藏夹. | +| `tid` | `int, optional` | 分区 ID. Defaults to 0. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -108,7 +108,7 @@ from bilibili_api import favorite_list -**Returns:** FavoriteListType: 收藏夹类型 +**Returns:** `FavoriteListType`: 收藏夹类型 @@ -119,7 +119,7 @@ from bilibili_api import favorite_list -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -130,7 +130,7 @@ from bilibili_api import favorite_list -**Returns:** Union[int, None]: media_id +**Returns:** `Union[int, None]`: media_id @@ -141,7 +141,7 @@ from bilibili_api import favorite_list -**Returns:** bool: 是否为视频收藏夹 +**Returns:** `bool`: 是否为视频收藏夹 @@ -199,10 +199,10 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| media_id | int | 收藏夹 ID | -| credential | Credential | 凭据 | +| `media_id` | `int` | 收藏夹 ID | +| `credential` | `Credential` | 凭据 | -**Returns:** dict: API 调用结果。 +**Returns:** `dict`: API 调用结果。 @@ -216,12 +216,12 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| media_id_from | int | 要复制的源收藏夹 ID。 | -| media_id_to | int | 目标收藏夹 ID。 | -| aids | List[int] | 被复制的视频 ID 列表。 | -| credential | Credential | 凭据 | +| `media_id_from` | `int` | 要复制的源收藏夹 ID。 | +| `media_id_to` | `int` | 目标收藏夹 ID。 | +| `aids` | `List[int]` | 被复制的视频 ID 列表。 | +| `credential` | `Credential` | 凭据 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -235,12 +235,12 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| title | str | 收藏夹名。 | -| introduction | str, optional | 收藏夹简介. Defaults to ''. | -| private | bool, optional | 是否为私有. Defaults to False. | -| credential | Credential, optional | 凭据. Defaults to None. | +| `title` | `str` | 收藏夹名。 | +| `introduction` | `str, optional` | 收藏夹简介. Defaults to ''. | +| `private` | `bool, optional` | 是否为私有. Defaults to False. | +| `credential` | `Credential, optional` | 凭据. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -254,10 +254,10 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| media_ids | List[int] | 收藏夹 ID 列表。 | -| credential | Credential | Credential. | +| `media_ids` | `List[int]` | 收藏夹 ID 列表。 | +| `credential` | `Credential` | Credential. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -271,11 +271,11 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| media_id | int | 收藏夹 ID。 | -| aids | List[int] | 被删除的视频 ID 列表。 | -| credential | Credential | 凭据 | +| `media_id` | `int` | 收藏夹 ID。 | +| `aids` | `List[int]` | 被删除的视频 ID 列表。 | +| `credential` | `Credential` | 凭据 | -**Returns:** dict: API 调用结果。 +**Returns:** `dict`: API 调用结果。 @@ -289,10 +289,10 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| page | int, optional | 页码. Defaults to 1. | -| credential | Credential \| None, optional | Credential. Defaults to None. | +| `page` | `int, optional` | 页码. Defaults to 1. | +| `credential` | `Credential \| None, optional` | Credential. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -306,10 +306,10 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| page | int, optional | 页码. Defaults to 1. | -| credential | Credential \| None, optional | Credential. Defaults to None. | +| `page` | `int, optional` | 页码. Defaults to 1. | +| `credential` | `Credential \| None, optional` | Credential. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -323,12 +323,11 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| uid | int | 用户 UID。 | -| pn | int, optional | 页码. Defaults to 1. | -| ps | int, optional | 每页数据大小. Defaults to 20. | -| credential | Credential \| None, optional | Credential. Defaults to None. | +| `uid` | `int` | 用户 UID。 | +| `pn` | `int, optional` | 页码. Defaults to 1. | +| `ps` | `int, optional` | 每页数据大小. Defaults to 20. | +| `credential` | `Credential \| None, optional` | Credential. Defaults to None. | -**Returns:** None @@ -341,10 +340,10 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| page | int, optional | 页码. Defaults to 1. | -| credential | Credential \| None, optional | Credential. Defaults to None. | +| `page` | `int, optional` | 页码. Defaults to 1. | +| `credential` | `Credential \| None, optional` | Credential. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -358,10 +357,10 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| page | int, optional | 页码. Defaults to 1. | -| credential | Credential \| None, optional | Credential | +| `page` | `int, optional` | 页码. Defaults to 1. | +| `credential` | `Credential \| None, optional` | Credential | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -375,11 +374,11 @@ from bilibili_api import favorite_list | name | type | description | | - | - | - | -| uid | int | 用户 UID。 | -| video | Video \| None, optional | 视频类。若提供该参数则结果会附带该收藏夹是否存在该视频。Defaults to None. | -| credential | Credential \| None, optional | 凭据. Defaults to None. | +| `uid` | `int` | 用户 UID。 | +| `video` | `Video \| None, optional` | 视频类。若提供该参数则结果会附带该收藏夹是否存在该视频。Defaults to None. | +| `credential` | `Credential \| None, optional` | 凭据. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -395,15 +394,15 @@ mode 参数见 SearchFavoriteListMode 枚举。 | name | type | description | | - | - | - | -| media_id | int | 收藏夹 ID。 | -| page | int, optional | 页码. Defaults to 1. | -| keyword | str, optional | 搜索关键词. Defaults to None. | -| order | FavoriteListContentOrder, optional | 排序方式. Defaults to FavoriteListContentOrder.MTIME. | -| tid | int, optional | 分区 ID. Defaults to 0. | -| mode | SearchFavoriteListMode, optional | 搜索模式,默认仅当前收藏夹. | -| credential | Credential, optional | Credential. Defaults to None. | +| `media_id` | `int` | 收藏夹 ID。 | +| `page` | `int, optional` | 页码. Defaults to 1. | +| `keyword` | `str, optional` | 搜索关键词. Defaults to None. | +| `order` | `FavoriteListContentOrder, optional` | 排序方式. Defaults to FavoriteListContentOrder.MTIME. | +| `tid` | `int, optional` | 分区 ID. Defaults to 0. | +| `mode` | `SearchFavoriteListMode, optional` | 搜索模式,默认仅当前收藏夹. | +| `credential` | `Credential, optional` | Credential. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -417,13 +416,13 @@ mode 参数见 SearchFavoriteListMode 枚举。 | name | type | description | | - | - | - | -| media_id | int | 收藏夹 ID. | -| title | str | 收藏夹名。 | -| introduction | str, optional | 收藏夹简介. Defaults to ''. | -| private | bool, optional | 是否为私有. Defaults to False. | -| credential | Credential, optional | Credential. Defaults to None. | +| `media_id` | `int` | 收藏夹 ID. | +| `title` | `str` | 收藏夹名。 | +| `introduction` | `str, optional` | 收藏夹简介. Defaults to ''. | +| `private` | `bool, optional` | 是否为私有. Defaults to False. | +| `credential` | `Credential, optional` | Credential. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -437,12 +436,12 @@ mode 参数见 SearchFavoriteListMode 枚举。 | name | type | description | | - | - | - | -| media_id_from | int | 要移动的源收藏夹 ID。 | -| media_id_to | int | 目标收藏夹 ID。 | -| aids | List[int] | 被移动的视频 ID 列表。 | -| credential | Credential | 凭据 | +| `media_id_from` | `int` | 要移动的源收藏夹 ID。 | +| `media_id_to` | `int` | 目标收藏夹 ID。 | +| `aids` | `List[int]` | 被移动的视频 ID 列表。 | +| `credential` | `Credential` | 凭据 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/festival.md b/docs/modules/festival.md index aa409a2e..706c2085 100644 --- a/docs/modules/festival.md +++ b/docs/modules/festival.md @@ -23,8 +23,8 @@ from bilibili_api import festival | name | type | description | | - | - | - | -| fes_id | str | 节日专门页编号 | -| credential | Credential | 凭证类 | +| `fes_id` | `str` | 节日专门页编号 | +| `credential` | `Credential` | 凭证类 | ### def \_\_init\_\_() @@ -32,8 +32,8 @@ from bilibili_api import festival | name | type | description | | - | - | - | -| fes_id | str | 节日专门页编号 | -| credential | Credential, optional | 凭据类. Defaults to None. | +| `fes_id` | `str` | 节日专门页编号 | +| `credential` | `Credential, optional` | 凭据类. Defaults to None. | ### async def get_info() @@ -42,7 +42,7 @@ from bilibili_api import festival -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/game.md b/docs/modules/game.md index 5e96afa1..10021f6b 100644 --- a/docs/modules/game.md +++ b/docs/modules/game.md @@ -33,7 +33,7 @@ from bilibili_api import game | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | ### def \_\_init\_\_() @@ -41,8 +41,8 @@ from bilibili_api import game | name | type | description | | - | - | - | -| game_id | int | 游戏 id | -| credential | Credential | 凭据类. Defaults to None. | +| `game_id` | `int` | 游戏 id | +| `credential` | `Credential` | 凭据类. Defaults to None. | ### async def get_detail() @@ -51,7 +51,7 @@ from bilibili_api import game -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -62,7 +62,7 @@ from bilibili_api import game -**Returns:** int: 游戏 id +**Returns:** `int`: 游戏 id @@ -73,7 +73,7 @@ from bilibili_api import game -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -84,7 +84,7 @@ from bilibili_api import game -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -95,7 +95,7 @@ from bilibili_api import game -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -106,7 +106,7 @@ from bilibili_api import game -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -138,9 +138,9 @@ from bilibili_api import game | name | type | description | | - | - | - | -| game_name | str | 游戏名 | +| `game_name` | `str` | 游戏名 | -**Returns:** str: 游戏编码 +**Returns:** `str`: 游戏编码 @@ -154,11 +154,11 @@ from bilibili_api import game | name | type | description | | - | - | - | -| rank_type | GameRankType | 游戏排行榜类型 | -| page_num | int, optional | 页码. Defaults to 1. | -| page_size | int, optional | 每页游戏数量. Defaults to 20. | +| `rank_type` | `GameRankType` | 游戏排行榜类型 | +| `page_num` | `int, optional` | 页码. Defaults to 1. | +| `page_size` | `int, optional` | 每页游戏数量. Defaults to 20. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -172,10 +172,10 @@ from bilibili_api import game | name | type | description | | - | - | - | -| page_num | int, optional | 页码. Defaults to 1. | -| page_size | int, optional | 每页游戏数量. Defaults to 20. | +| `page_num` | `int, optional` | 页码. Defaults to 1. | +| `page_size` | `int, optional` | 每页游戏数量. Defaults to 20. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -189,9 +189,9 @@ from bilibili_api import game | name | type | description | | - | - | - | -| game_id | str | 游戏编码 | +| `game_id` | `str` | 游戏编码 | -**Returns:** str: 游戏 WIKI 对应的 api 链接 +**Returns:** `str`: 游戏 WIKI 对应的 api 链接 diff --git a/docs/modules/homepage.md b/docs/modules/homepage.md index 56afbaa0..535d54ec 100644 --- a/docs/modules/homepage.md +++ b/docs/modules/homepage.md @@ -25,9 +25,9 @@ from bilibili_api import homepage | name | type | description | | - | - | - | -| credential | Credential \| None | 凭据类 | +| `credential` | `Credential \| None` | 凭据类 | -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -42,9 +42,9 @@ from bilibili_api import homepage | name | type | description | | - | - | - | -| credential | Credential \| None | 凭据类 | +| `credential` | `Credential \| None` | 凭据类 | -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -58,7 +58,7 @@ from bilibili_api import homepage -**Returns:** 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -72,9 +72,9 @@ from bilibili_api import homepage | name | type | description | | - | - | - | -| credential | Credential \| None | 凭据类 | +| `credential` | `Credential \| None` | 凭据类 | -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/hot.md b/docs/modules/hot.md index b0466f6a..74ff2369 100644 --- a/docs/modules/hot.md +++ b/docs/modules/hot.md @@ -24,7 +24,7 @@ from bilibili_api import hot -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -38,10 +38,10 @@ from bilibili_api import hot | name | type | description | | - | - | - | -| page_num | int | 页码. Defaults to 1. | -| page_size | int | 每一页的数据大小. Defaults to 20. | +| `page_num` | `int` | 页码. Defaults to 1. | +| `page_size` | `int` | 每一页的数据大小. Defaults to 20. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -55,10 +55,10 @@ from bilibili_api import hot | name | type | description | | - | - | - | -| pn | int | 第几页. Default to 1. | -| ps | int | 每页视频数. Default to 20. | +| `pn` | `int` | 第几页. Default to 1. | +| `ps` | `int` | 每页视频数. Default to 20. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -72,9 +72,9 @@ from bilibili_api import hot | name | type | description | | - | - | - | -| week | int | 第几周. Default to 1. | +| `week` | `int` | 第几周. Default to 1. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -87,7 +87,7 @@ from bilibili_api import hot -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/interactive_video.md b/docs/modules/interactive_video.md index c31d3d37..ffe8ae29 100644 --- a/docs/modules/interactive_video.md +++ b/docs/modules/interactive_video.md @@ -80,10 +80,10 @@ from bilibili_api import interactive_video | name | type | description | | - | - | - | -| text | str | 文字 | -| x | int | x 轴 | -| y | int | y 轴 | -| align | InteractiveButtonAlign \| int | 按钮的文字在按钮中的位置 | +| `text` | `str` | 文字 | +| `x` | `int` | x 轴 | +| `y` | `int` | y 轴 | +| `align` | `InteractiveButtonAlign \| int` | 按钮的文字在按钮中的位置 | ### def get_align() @@ -92,7 +92,7 @@ from bilibili_api import interactive_video -**Returns:** int: 按钮文字布局 +**Returns:** `int`: 按钮文字布局 @@ -103,7 +103,7 @@ from bilibili_api import interactive_video -**Returns:** Tuple[int, int]: 按钮位置 +**Returns:** `Tuple[int, int]`: 按钮位置 @@ -114,7 +114,7 @@ from bilibili_api import interactive_video -**Returns:** str: 按钮文字 +**Returns:** `str`: 按钮文字 @@ -165,9 +165,9 @@ o----|xxx| (TEXT_RIGHT) | name | type | description | | - | - | - | -| video | InteractiveVideo | 互动视频类 | -| skin | Dict | 样式 | -| root_cid | int | 根节点 CID | +| `video` | `InteractiveVideo` | 互动视频类 | +| `skin` | `Dict` | 样式 | +| `root_cid` | `int` | 根节点 CID | ### async def get_children() @@ -176,7 +176,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** List[InteractiveNode]: 子节点 +**Returns:** `List[InteractiveNode]`: 子节点 @@ -187,7 +187,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** InteractiveNode: 根节点 +**Returns:** `InteractiveNode`: 根节点 @@ -198,7 +198,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** dict: 按钮样式 +**Returns:** `dict`: 按钮样式 @@ -209,7 +209,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** InteractiveVideo: 视频 +**Returns:** `InteractiveVideo`: 视频 @@ -228,8 +228,8 @@ o----|xxx| (TEXT_RIGHT) | name | type | description | | - | - | - | -| var | List[InteractiveVariable] | 所有变量 | -| command | str | 公式 | +| `var` | `List[InteractiveVariable]` | 所有变量 | +| `command` | `str` | 公式 | ### def run_command() @@ -238,7 +238,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** List[InteractiveVariable] +**Returns:** `List[InteractiveVariable]`: 所有变量的最终值 @@ -257,8 +257,8 @@ o----|xxx| (TEXT_RIGHT) | name | type | description | | - | - | - | -| var | List[InteractiveVariable] | 所有变量 | -| condition | str | 公式 | +| `var` | `List[InteractiveVariable]` | 所有变量 | +| `condition` | `str` | 公式 | ### def get_result() @@ -267,7 +267,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** bool: 是否成立 +**Returns:** `bool`: 是否成立 @@ -286,14 +286,14 @@ o----|xxx| (TEXT_RIGHT) | name | type | description | | - | - | - | -| video | InteractiveVideo | 视频类 | -| node_id | int | 节点 id | -| cid | int | CID | -| vars | List[InteractiveVariable] | 变量 | -| button | InteractiveButton | 对应的按钮 | -| condition | InteractiveJumpingCondition | 跳转公式 | -| native_command | InteractiveJumpingCommand | 跳转时变量操作 | -| is_default | bool | 是不是默认的跳转的节点 | +| `video` | `InteractiveVideo` | 视频类 | +| `node_id` | `int` | 节点 id | +| `cid` | `int` | CID | +| `vars` | `List[InteractiveVariable]` | 变量 | +| `button` | `InteractiveButton` | 对应的按钮 | +| `condition` | `InteractiveJumpingCondition` | 跳转公式 | +| `native_command` | `InteractiveJumpingCommand` | 跳转时变量操作 | +| `is_default` | `bool` | 是不是默认的跳转的节点 | ### async def get_children() @@ -302,7 +302,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** List[InteractiveNode]: 所有子节点 +**Returns:** `List[InteractiveNode]`: 所有子节点 @@ -313,7 +313,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** int: 节点 cid +**Returns:** `int`: 节点 cid @@ -324,7 +324,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -335,7 +335,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** InteractiveJumpingCondition: 跳转条件 +**Returns:** `InteractiveJumpingCondition`: 跳转条件 @@ -346,7 +346,6 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** None @@ -356,7 +355,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** int: 节点 id +**Returns:** `int`: 节点 id @@ -367,7 +366,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** InteractiveButton: 所对应的按钮 +**Returns:** `InteractiveButton`: 所对应的按钮 @@ -378,7 +377,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** List[InteractiveVariable]: 节点的所有变量 +**Returns:** `List[InteractiveVariable]`: 节点的所有变量 @@ -389,7 +388,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** InteractiveVideo: 对应视频 +**Returns:** `InteractiveVideo`: 对应视频 @@ -400,7 +399,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** bool: 是否为跳转中默认节点 +**Returns:** `bool`: 是否为跳转中默认节点 @@ -434,11 +433,11 @@ o----|xxx| (TEXT_RIGHT) | name | type | description | | - | - | - | -| name | str | 变量名 | -| var_id | str | 变量 id | -| var_value | int | 变量的值 | -| show | bool | 是否显示 | -| random | bool | 是否为随机值(1-100) | +| `name` | `str` | 变量名 | +| `var_id` | `str` | 变量 id | +| `var_value` | `int` | 变量的值 | +| `show` | `bool` | 是否显示 | +| `random` | `bool` | 是否为随机值(1-100) | ### def get_id() @@ -447,7 +446,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** str: 变量 id +**Returns:** `str`: 变量 id @@ -458,7 +457,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** str: 变量的名字 +**Returns:** `str`: 变量的名字 @@ -469,7 +468,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** int: 变量对应的值 +**Returns:** `int`: 变量对应的值 @@ -480,7 +479,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** bool: 变量是否随机生成 +**Returns:** `bool`: 变量是否随机生成 @@ -491,7 +490,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** bool: 变量是否显示 +**Returns:** `bool`: 变量是否显示 @@ -502,7 +501,6 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** None @@ -529,7 +527,6 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** None @@ -540,9 +537,9 @@ o----|xxx| (TEXT_RIGHT) | name | type | description | | - | - | - | -| edge_id | int, optional | 节点 ID,为 None 时获取根节点信息. Defaults to None. | +| `edge_id` | `int, optional` | 节点 ID,为 None 时获取根节点信息. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -553,7 +550,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** InteractiveGraph: 情节树 +**Returns:** `InteractiveGraph`: 情节树 @@ -564,7 +561,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** int: 剧情图版本号 +**Returns:** `int`: 剧情图版本号 @@ -576,9 +573,9 @@ o----|xxx| (TEXT_RIGHT) | name | type | description | | - | - | - | -| score | int | 互动视频分数. Defaults to 5. | +| `score` | `int` | 互动视频分数. Defaults to 5. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -589,7 +586,7 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -601,9 +598,9 @@ o----|xxx| (TEXT_RIGHT) | name | type | description | | - | - | - | -| story_tree | str | 情节树的描述,参考 bilibili_storytree.StoryGraph, 需要 Serialize 这个结构 | +| `story_tree` | `str` | 情节树的描述,参考 bilibili_storytree.StoryGraph, 需要 Serialize 这个结构 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -628,12 +625,12 @@ o----|xxx| (TEXT_RIGHT) | name | type | description | | - | - | - | -| video | InteractiveVideo | 互动视频类 | -| out | str | 输出文件地址 (如果模式为 NODE_VIDEOS/NO_PACKAGING 则此参数表示所有节点视频的存放目录) | -| self_download_func | Coroutine | 自定义下载函数(需 async 函数). Defaults to None. | -| downloader_mode | InteractiveVideoDownloaderMode | 下载模式 | -| stream_detecting_params | Dict | `VideoDownloadURLDataDetecter` 提取最佳流时传入的参数,可控制视频及音频品质 | -| fetching_nodes_retry_times | int | 获取节点时的最大重试次数 | +| `video` | `InteractiveVideo` | 互动视频类 | +| `out` | `str` | 输出文件地址 (如果模式为 NODE_VIDEOS/NO_PACKAGING 则此参数表示所有节点视频的存放目录) | +| `self_download_func` | `Coroutine` | 自定义下载函数(需 async 函数). Defaults to None. | +| `downloader_mode` | `InteractiveVideoDownloaderMode` | 下载模式 | +| `stream_detecting_params` | `Dict` | `VideoDownloadURLDataDetecter` 提取最佳流时传入的参数,可控制视频及音频品质 | +| `fetching_nodes_retry_times` | `int` | 获取节点时的最大重试次数 | ### async def abort() @@ -642,7 +639,6 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** None @@ -652,7 +648,6 @@ o----|xxx| (TEXT_RIGHT) -**Returns:** None @@ -705,9 +700,9 @@ o----|xxx| (TEXT_RIGHT) | name | type | description | | - | - | - | -| path | str | 文件地址 | +| `path` | `str` | 文件地址 | -**Returns:** dict: 文件信息 +**Returns:** `dict`: 文件信息 diff --git a/docs/modules/live.md b/docs/modules/live.md index 2ec338bc..32e620c6 100644 --- a/docs/modules/live.md +++ b/docs/modules/live.md @@ -125,11 +125,11 @@ Events: | name | type | description | | - | - | - | -| room_display_id | int | 房间展示 ID | -| debug | bool, optional | 调试模式,将输出更多信息。. Defaults to False. | -| credential | Credential \| None, optional | 凭据. Defaults to None. | -| max_retry | int, optional | 连接出错后最大重试次数. Defaults to 5 | -| retry_after | int, optional | 连接出错后重试间隔时间(秒). Defaults to 1 | +| `room_display_id` | `int` | 房间展示 ID | +| `debug` | `bool, optional` | 调试模式,将输出更多信息。. Defaults to False. | +| `credential` | `Credential \| None, optional` | 凭据. Defaults to None. | +| `max_retry` | `int, optional` | 连接出错后最大重试次数. Defaults to 5 | +| `retry_after` | `int, optional` | 连接出错后重试间隔时间(秒). Defaults to 1 | ### async def connect() @@ -138,7 +138,6 @@ Events: -**Returns:** None @@ -148,7 +147,6 @@ Events: -**Returns:** None @@ -158,7 +156,7 @@ Events: -**Returns:** int: 0 初始化,1 连接建立中,2 已连接,3 断开连接中,4 已断开,5 错误 +**Returns:** `int`: 0 初始化,1 连接建立中,2 已连接,3 断开连接中,4 已断开,5 错误 @@ -205,8 +203,8 @@ Events: | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | -| room_display_id | int | 房间展示 id | +| `credential` | `Credential` | 凭据类 | +| `room_display_id` | `int` | 房间展示 id | ### def \_\_init\_\_() @@ -214,8 +212,8 @@ Events: | name | type | description | | - | - | - | -| room_display_id | int | 房间展示 ID(即 URL 中的 ID) | -| credential | Credential, optional | 凭据. Defaults to None. | +| `room_display_id` | `int` | 房间展示 ID(即 URL 中的 ID) | +| `credential` | `Credential, optional` | 凭据. Defaults to None. | ### async def ban_user() @@ -225,10 +223,10 @@ Events: | name | type | description | | - | - | - | -| uid | int | 用户 UID | -| hour | int | 禁言时长,-1为永久,0为直到本场结束 | +| `uid` | `int` | 用户 UID | +| `hour` | `int` | 禁言时长,-1为永久,0为直到本场结束 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -239,7 +237,7 @@ Events: -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -251,9 +249,9 @@ Events: | name | type | description | | - | - | - | -| page | int, optional | 页码. Defaults to 1. | +| `page` | `int, optional` | 页码. Defaults to 1. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -264,7 +262,7 @@ Events: -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -275,7 +273,7 @@ Events: -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -291,11 +289,11 @@ Events: | name | type | description | | - | - | - | -| roomId | int, optional | 指定房间,查询是否拥有此房间的粉丝牌 | -| target_id | int \| None, optional | 指定返回一个主播的粉丝牌,留空就不返回 | -| page_num | int \| None, optional | 粉丝牌列表,默认 1 | +| `roomId` | `int, optional` | 指定房间,查询是否拥有此房间的粉丝牌 | +| `target_id` | `int \| None, optional` | 指定返回一个主播的粉丝牌,留空就不返回 | +| `page_num` | `int \| None, optional` | 粉丝牌列表,默认 1 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -306,7 +304,7 @@ Events: -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -318,9 +316,9 @@ Events: | name | type | description | | - | - | - | -| page | int, optional | 页码. Defaults to 1 | +| `page` | `int, optional` | 页码. Defaults to 1 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -332,9 +330,9 @@ Events: | name | type | description | | - | - | - | -| act_id | int, optional | 未知,Defaults to 100061 | +| `act_id` | `int, optional` | 未知,Defaults to 100061 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -345,7 +343,7 @@ Events: -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -359,9 +357,9 @@ Events: | name | type | description | | - | - | - | -| tab_id | int | 2:特权礼物,3:定制礼物 | +| `tab_id` | `int` | 2:特权礼物,3:定制礼物 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -372,7 +370,7 @@ Events: -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -383,7 +381,7 @@ Events: -**Returns:** int: 直播间 id +**Returns:** `int`: 直播间 id @@ -394,7 +392,7 @@ Events: -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -405,7 +403,7 @@ Events: -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -417,12 +415,12 @@ Events: | name | type | description | | - | - | - | -| live_protocol | LiveProtocol, optional | 直播源流协议. Defaults to LiveProtocol.DEFAULT. | -| live_format | LiveFormat, optional | 直播源容器格式. Defaults to LiveFormat.DEFAULT. | -| live_codec | LiveCodec, optional | 直播源视频编码. Defaults to LiveCodec.DEFAULT. | -| live_qn | ScreenResolution, optional | 直播源清晰度. Defaults to ScreenResolution.ORIGINAL. | +| `live_protocol` | `LiveProtocol, optional` | 直播源流协议. Defaults to LiveProtocol.DEFAULT. | +| `live_format` | `LiveFormat, optional` | 直播源容器格式. Defaults to LiveFormat.DEFAULT. | +| `live_codec` | `LiveCodec, optional` | 直播源视频编码. Defaults to LiveCodec.DEFAULT. | +| `live_qn` | `ScreenResolution, optional` | 直播源清晰度. Defaults to ScreenResolution.ORIGINAL. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -434,9 +432,9 @@ Events: | name | type | description | | - | - | - | -| screen_resolution | ScreenResolution, optional | 清晰度. Defaults to ScreenResolution.ORIGINAL | +| `screen_resolution` | `ScreenResolution, optional` | 清晰度. Defaults to ScreenResolution.ORIGINAL | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -447,7 +445,7 @@ Events: -**Returns:** int: 真实房间 id +**Returns:** `int`: 真实房间 id @@ -458,7 +456,7 @@ Events: -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -469,7 +467,7 @@ Events: -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -481,9 +479,9 @@ Events: | name | type | description | | - | - | - | -| receive_type | int | 领取类型,Defaults to 2. | +| `receive_type` | `int` | 领取类型,Defaults to 2. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -495,10 +493,10 @@ Events: | name | type | description | | - | - | - | -| danmaku | Danmaku | 弹幕类 | -| reply_mid | int, optional | @的 UID. Defaults to None. | +| `danmaku` | `Danmaku` | 弹幕类 | +| `reply_mid` | `int, optional` | @的 UID. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -510,9 +508,9 @@ Events: | name | type | description | | - | - | - | -| emoticon | Danmaku | text为表情包代号 | +| `emoticon` | `Danmaku` | text为表情包代号 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -524,14 +522,14 @@ Events: | name | type | description | | - | - | - | -| uid | int | 赠送用户的 UID | -| bag_id | int | 礼物背包 ID | -| gift_id | int | 礼物 ID | -| gift_num | int | 礼物数量 | -| storm_beat_id | int, optional | 未知, Defaults to 0 | -| price | int, optional | 礼物单价,Defaults to 0 | +| `uid` | `int` | 赠送用户的 UID | +| `bag_id` | `int` | 礼物背包 ID | +| `gift_id` | `int` | 礼物 ID | +| `gift_num` | `int` | 礼物数量 | +| `storm_beat_id` | `int, optional` | 未知, Defaults to 0 | +| `price` | `int, optional` | 礼物单价,Defaults to 0 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -543,13 +541,13 @@ Events: | name | type | description | | - | - | - | -| uid | int | 赠送用户的 UID | -| gift_id | int | 礼物 ID (可以通过 get_gift_common 或 get_gift_special 或 get_gift_config 获取) | -| gift_num | int | 赠送礼物数量 | -| price | int | 礼物单价 | -| storm_beat_id | int, Optional | 未知,Defaults to 0 | +| `uid` | `int` | 赠送用户的 UID | +| `gift_id` | `int` | 礼物 ID (可以通过 get_gift_common 或 get_gift_special 或 get_gift_config 获取) | +| `gift_num` | `int` | 赠送礼物数量 | +| `price` | `int` | 礼物单价 | +| `storm_beat_id` | `int, Optional` | 未知,Defaults to 0 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -561,13 +559,13 @@ Events: | name | type | description | | - | - | - | -| uid | int | 赠送用户的 UID | -| gift_id | int | 礼物 ID (可以通过 get_gift_common 或 get_gift_special 或 get_gift_config 获取) | -| gift_num | int | 赠送礼物数量 | -| price | int | 礼物单价 | -| storm_beat_id | int, Optional | 未知, Defaults to 0 | +| `uid` | `int` | 赠送用户的 UID | +| `gift_id` | `int` | 礼物 ID (可以通过 get_gift_common 或 get_gift_special 或 get_gift_config 获取) | +| `gift_num` | `int` | 赠送礼物数量 | +| `price` | `int` | 礼物单价 | +| `storm_beat_id` | `int, Optional` | 未知, Defaults to 0 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -578,7 +576,7 @@ Events: -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -590,9 +588,9 @@ Events: | name | type | description | | - | - | - | -| task_id | int, optional | 签到任务 ID. Defaults to 1447 | +| `task_id` | `int, optional` | 签到任务 ID. Defaults to 1447 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -604,9 +602,9 @@ Events: | name | type | description | | - | - | - | -| area_id | int | 直播分区id(子分区id)。可使用 live_area 模块查询。 | +| `area_id` | `int` | 直播分区id(子分区id)。可使用 live_area 模块查询。 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -617,7 +615,7 @@ Events: -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -629,9 +627,9 @@ Events: | name | type | description | | - | - | - | -| uid | int | 用户 UID | +| `uid` | `int` | 用户 UID | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -643,9 +641,9 @@ Events: | name | type | description | | - | - | - | -| content: 最多60字符 | | 最多60字符 | +| `content` | `str` | 最多 60 字符 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -679,10 +677,10 @@ Events: | name | type | description | | - | - | - | -| title | str | 直播间标题 | -| start_time | int | 开播时间戳 | +| `title` | `str` | 直播间标题 | +| `start_time` | `int` | 开播时间戳 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -695,7 +693,7 @@ Events: -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -713,11 +711,11 @@ Events: | name | type | description | | - | - | - | -| room_id | int, optional | 房间显示 ID. Defaults to None. | -| area_id | int, optional | 子分区 ID. Defaults to None. | -| area_parent_id | int, optional | 父分区 ID. Defaults to None. | +| `room_id` | `int, optional` | 房间显示 ID. Defaults to None. | +| `area_id` | `int, optional` | 子分区 ID. Defaults to None. | +| `area_parent_id` | `int, optional` | 父分区 ID. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -731,9 +729,9 @@ Events: | name | type | description | | - | - | - | -| need_recommend | bool, optional | 是否接受推荐直播间,Defaults to True | +| `need_recommend` | `bool, optional` | 是否接受推荐直播间,Defaults to True | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -746,7 +744,7 @@ Events: -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -760,10 +758,10 @@ Events: | name | type | description | | - | - | - | -| page | int, optional | 页数. Defaults to 1. | -| page_size | int, optional | 每页数量. Defaults to 10. | +| `page` | `int, optional` | 页数. Defaults to 1. | +| `page_size` | `int, optional` | 每页数量. Defaults to 10. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 总页数取得方法: @@ -785,7 +783,7 @@ pages = math.ceil(info['data']['guards'] / 10) -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -798,7 +796,7 @@ pages = math.ceil(info['data']['guards'] / 10) -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -812,10 +810,10 @@ pages = math.ceil(info['data']['guards'] / 10) | name | type | description | | - | - | - | -| page | int, optional | 页码, Defaults to 1. | -| page_size | int, optional | 每页数量 Defaults to 30. | +| `page` | `int, optional` | 页码, Defaults to 1. | +| `page_size` | `int, optional` | 每页数量 Defaults to 30. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/live_area.md b/docs/modules/live_area.md index 8379541a..0f8bba43 100644 --- a/docs/modules/live_area.md +++ b/docs/modules/live_area.md @@ -44,7 +44,6 @@ from bilibili_api import live_area -**Returns:** None @@ -57,9 +56,9 @@ from bilibili_api import live_area | name | type | description | | - | - | - | -| id | int | 分区的 id。 | +| `id` | `int` | 分区的 id。 | -**Returns:** `Tuple[dict | None, dict | None]`: 第一个是主分区,第二个是子分区,没有时返回 None。 +**Returns:** `Tuple[dict | None, dict | None]`: 第一个是主分区,第二个是子分区,没有时返回 None。 @@ -73,9 +72,9 @@ from bilibili_api import live_area | name | type | description | | - | - | - | -| name | str | 分区的名称。 | +| `name` | `str` | 分区的名称。 | -**Returns:** Tuple[dict | None, dict | None]: 第一个是主分区,第二个是子分区,没有时返回 None。 +**Returns:** `Tuple[dict | None, dict | None]`: 第一个是主分区,第二个是子分区,没有时返回 None。 @@ -88,7 +87,7 @@ from bilibili_api import live_area -**Returns:** List[dict]: 所有分区的数据 +**Returns:** `List[dict]`: 所有分区的数据 @@ -102,7 +101,7 @@ from bilibili_api import live_area -**Returns:** dict: 所有分区的数据 +**Returns:** `dict`: 所有分区的数据 @@ -116,11 +115,11 @@ from bilibili_api import live_area | name | type | description | | - | - | - | -| area_id | int | 分区 id | -| page | int | 第几页. Defaults to 1. | -| order | LiveRoomOrder | 直播间排序方式. Defaults to LiveRoomOrder.RECOMMEND. | +| `area_id` | `int` | 分区 id | +| `page` | `int` | 第几页. Defaults to 1. | +| `order` | `LiveRoomOrder` | 直播间排序方式. Defaults to LiveRoomOrder.RECOMMEND. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/login_v2.md b/docs/modules/login_v2.md index 94ad5acd..b61d3057 100644 --- a/docs/modules/login_v2.md +++ b/docs/modules/login_v2.md @@ -52,7 +52,7 @@ from bilibili_api import login_v2 | name | type | description | | - | - | - | -| check_url | str | 验证链接 | +| `check_url` | `str` | 验证链接 | ### async def complete_check() @@ -62,9 +62,9 @@ from bilibili_api import login_v2 | name | type | description | | - | - | - | -| code | str | 验证码 | +| `code` | `str` | 验证码 | -**Returns:** Credential: 凭据类 +**Returns:** `Credential`: 凭据类 @@ -75,7 +75,7 @@ from bilibili_api import login_v2 -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -87,9 +87,8 @@ from bilibili_api import login_v2 | name | type | description | | - | - | - | -| geetest | Geetest | 极验验证码实例,须完成。验证码类型应为 `GeetestType.VERIFY` | +| `geetest` | `Geetest` | 极验验证码实例,须完成。验证码类型应为 `GeetestType.VERIFY` | -**Returns:** None @@ -107,8 +106,8 @@ from bilibili_api import login_v2 | name | type | description | | - | - | - | -| number | str | 手机号 | -| country | str | 地区/地区码,如 +86 | +| `number` | `str` | 手机号 | +| `country` | `str` | 地区/地区码,如 +86 | --- @@ -127,7 +126,7 @@ from bilibili_api import login_v2 | name | type | description | | - | - | - | -| platform | QrCodeLoginChannel, optional | 平台. (web/tv) Defaults to QrCodeLoginChannel.WEB. | +| `platform` | `QrCodeLoginChannel, optional` | 平台. (web/tv) Defaults to QrCodeLoginChannel.WEB. | ### async def check_state() @@ -136,7 +135,7 @@ from bilibili_api import login_v2 -**Returns:** QrCodeLoginEvents: 二维码登录状态 +**Returns:** `QrCodeLoginEvents`: 二维码登录状态 @@ -147,7 +146,6 @@ from bilibili_api import login_v2 -**Returns:** None @@ -157,7 +155,7 @@ from bilibili_api import login_v2 -**Returns:** Credential: 凭据 +**Returns:** `Credential`: 凭据 @@ -168,7 +166,7 @@ from bilibili_api import login_v2 -**Returns:** Picture: 二维码 +**Returns:** `Picture`: 二维码 @@ -179,7 +177,7 @@ from bilibili_api import login_v2 -**Returns:** str: 二维码的终端字符串 +**Returns:** `str`: 二维码的终端字符串 @@ -190,7 +188,7 @@ from bilibili_api import login_v2 -**Returns:** bool: 是否已经成功登录 +**Returns:** `bool`: 是否已经成功登录 @@ -201,7 +199,7 @@ from bilibili_api import login_v2 -**Returns:** bool: 是否已有二维码 +**Returns:** `bool`: 是否已有二维码 @@ -245,9 +243,9 @@ from bilibili_api import login_v2 | name | type | description | | - | - | - | -| country | str | 地区名 | +| `country` | `str` | 地区名 | -**Returns:** int: 对应的代码,没有返回 -1 +**Returns:** `int`: 对应的代码,没有返回 -1 @@ -260,7 +258,7 @@ from bilibili_api import login_v2 -**Returns:** List[dict]: 地区列表 +**Returns:** `List[dict]`: 地区列表 @@ -274,9 +272,9 @@ from bilibili_api import login_v2 | name | type | description | | - | - | - | -| code | int | 地区吗 | +| `code` | `int` | 地区吗 | -**Returns:** int: 对应的代码,没有返回 -1 +**Returns:** `int`: 对应的代码,没有返回 -1 @@ -290,9 +288,9 @@ from bilibili_api import login_v2 | name | type | description | | - | - | - | -| code | Union[str, int] | 代码 | +| `code` | `Union[str, int]` | 代码 | -**Returns:** bool: 是否存在 +**Returns:** `bool`: 是否存在 @@ -306,9 +304,9 @@ from bilibili_api import login_v2 | name | type | description | | - | - | - | -| keyword | str | 关键词 | +| `keyword` | `str` | 关键词 | -**Returns:** bool: 是否存在 +**Returns:** `bool`: 是否存在 @@ -322,11 +320,11 @@ from bilibili_api import login_v2 | name | type | description | | - | - | - | -| username | str | 用户手机号、邮箱 | -| password | str | 密码 | -| geetest | Geetest | 极验验证码实例,须完成。验证码类型应为 `GeetestType.LOGIN` | +| `username` | `str` | 用户手机号、邮箱 | +| `password` | `str` | 密码 | +| `geetest` | `Geetest` | 极验验证码实例,须完成。验证码类型应为 `GeetestType.LOGIN` | -**Returns:** Union[Credential, LoginCheck]: 如果需要验证,会返回 `LoginCheck` 类,否则返回 `Credential` 类。 +**Returns:** `Union[Credential, LoginCheck]`: 如果需要验证,会返回 `LoginCheck` 类,否则返回 `Credential` 类。 @@ -340,11 +338,11 @@ from bilibili_api import login_v2 | name | type | description | | - | - | - | -| phonenumber | str | 手机号类 | -| code | str | 验证码 | -| captcha_id | str | captcha_id,为 `send_sms` 调用返回结果 | +| `phonenumber` | `str` | 手机号类 | +| `code` | `str` | 验证码 | +| `captcha_id` | `str` | captcha_id,为 `send_sms` 调用返回结果 | -**Returns:** Union[Credential, LoginCheck]: 如果需要验证,会返回 `LoginCheck` 类,否则返回 `Credential` 类。 +**Returns:** `Union[Credential, LoginCheck]`: 如果需要验证,会返回 `LoginCheck` 类,否则返回 `Credential` 类。 @@ -358,9 +356,9 @@ from bilibili_api import login_v2 | name | type | description | | - | - | - | -| keyword | str | 关键词 | +| `keyword` | `str` | 关键词 | -**Returns:** List[dict]: 地区列表 +**Returns:** `List[dict]`: 地区列表 @@ -374,10 +372,10 @@ from bilibili_api import login_v2 | name | type | description | | - | - | - | -| phonenumber | PhoneNumber | 手机号类 | -| geetest | Geetest | 极验验证码实例,须完成。验证码类型应为 `GeetestType.LOGIN` | +| `phonenumber` | `PhoneNumber` | 手机号类 | +| `geetest` | `Geetest` | 极验验证码实例,须完成。验证码类型应为 `GeetestType.LOGIN` | -**Returns:** str: captcha_id,需传入 `login_with_sms` +**Returns:** `str`: captcha_id,需传入 `login_with_sms` diff --git a/docs/modules/manga.md b/docs/modules/manga.md index b01611bd..84e22415 100644 --- a/docs/modules/manga.md +++ b/docs/modules/manga.md @@ -34,7 +34,7 @@ from bilibili_api import manga | name | type | description | | - | - | - | -| credential | Credential | 凭据类。 | +| `credential` | `Credential` | 凭据类。 | ### def \_\_init\_\_() @@ -42,8 +42,8 @@ from bilibili_api import manga | name | type | description | | - | - | - | -| manga_id | int | 漫画 id | -| credential | Credential \| None | 凭据类. Defaults to None. | +| `manga_id` | `int` | 漫画 id | +| `credential` | `Credential \| None` | 凭据类. Defaults to None. | ### def get_manga_id() @@ -52,7 +52,7 @@ from bilibili_api import manga -**Returns:** int: 漫画的 id +**Returns:** `int`: 漫画的 id @@ -173,12 +173,12 @@ from bilibili_api import manga | name | type | description | | - | - | - | -| pn | int | 页码。Defaults to 1. | -| ps | int | 每页数量。Defaults to 18. | -| order | MangaOrderType | 排序方式。Defaults to MangaOrderType.FOLLOW. | -| credential | Credential | 凭据类. | +| `pn` | `int` | 页码。Defaults to 1. | +| `ps` | `int` | 每页数量。Defaults to 18. | +| `order` | `MangaOrderType` | 排序方式。Defaults to MangaOrderType.FOLLOW. | +| `credential` | `Credential` | 凭据类. | -**Returns:** List[Manga]: 追漫列表 +**Returns:** `List[Manga]`: 追漫列表 @@ -192,11 +192,11 @@ from bilibili_api import manga | name | type | description | | - | - | - | -| pn | int | 页码。Defaults to 1. | -| seed | Optional, str | Unknown param,无需传入. | -| credential | Credential | 凭据类. Defaults to None. | +| `pn` | `int` | 页码。Defaults to 1. | +| `seed` | `Optional, str` | Unknown param,无需传入. | +| `credential` | `Credential` | 凭据类. Defaults to None. | -**Returns:** List[Manga]: 漫画列表 +**Returns:** `List[Manga]`: 漫画列表 @@ -210,12 +210,12 @@ from bilibili_api import manga | name | type | description | | - | - | - | -| date | Union[str, datetime.datetime] | 日期,默认为今日。 | -| pn | int | 页码。Defaults to 1. | -| ps | int | 每页数量。Defaults to 8. | -| credential | Credential | 凭据类. Defaults to None. | +| `date` | `Union[str, datetime.datetime]` | 日期,默认为今日。 | +| `pn` | `int` | 页码。Defaults to 1. | +| `ps` | `int` | 每页数量。Defaults to 8. | +| `credential` | `Credential` | 凭据类. Defaults to None. | -**Returns:** List[Manga]: 漫画列表 +**Returns:** `List[Manga]`: 漫画列表 @@ -229,11 +229,10 @@ from bilibili_api import manga | name | type | description | | - | - | - | -| manga | Manga | 漫画类。 | -| status | bool | 设置是否追漫。是为 True,否为 False。Defaults to True. | -| credential | Credential | 凭据类。 | +| `manga` | `Manga` | 漫画类。 | +| `status` | `bool` | 设置是否追漫。是为 True,否为 False。Defaults to True. | +| `credential` | `Credential` | 凭据类。 | -**Returns:** None diff --git a/docs/modules/music.md b/docs/modules/music.md index c2a9c517..83c8f08d 100644 --- a/docs/modules/music.md +++ b/docs/modules/music.md @@ -42,7 +42,7 @@ from bilibili_api import music | name | type | description | | - | - | - | -| music_id | str | 音乐 id,例如 MA436038343856245020 | +| `music_id` | `str` | 音乐 id,例如 MA436038343856245020 | ### async def get_info() @@ -51,7 +51,7 @@ from bilibili_api import music -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -62,7 +62,7 @@ from bilibili_api import music -**Returns:** str: 音乐 id +**Returns:** `str`: 音乐 id @@ -73,7 +73,7 @@ from bilibili_api import music -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -158,9 +158,9 @@ from bilibili_api import music | name | type | description | | - | - | - | -| credential | Credential \| None | 凭据类. Defaults to None. | +| `credential` | `Credential \| None` | 凭据类. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -174,14 +174,13 @@ from bilibili_api import music | name | type | description | | - | - | - | -| keyword | str | 关键词. Defaults to None. | -| lang | MusicIndexTags.Lang | 语言. Defaults to MusicIndexTags.Lang.ALL | -| genre | MusicIndexTags.Genre | 类型. Defaults to MusicIndexTags.Genre.ALL | -| order | MusicOrder | 排序方式. Defaults to OrderAudio.NEW | -| page_num | int | 页码. Defaults to 1. | -| page_size | int | 每页的数据大小. Defaults to 10. | - -**Returns:** None +| `keyword` | `str` | 关键词. Defaults to None. | +| `lang` | `MusicIndexTags.Lang` | 语言. Defaults to MusicIndexTags.Lang.ALL | +| `genre` | `MusicIndexTags.Genre` | 类型. Defaults to MusicIndexTags.Genre.ALL | +| `order` | `MusicOrder` | 排序方式. Defaults to OrderAudio.NEW | +| `page_num` | `int` | 页码. Defaults to 1. | +| `page_size` | `int` | 每页的数据大小. Defaults to 10. | + diff --git a/docs/modules/note.md b/docs/modules/note.md index 26aa6ab5..9a7bb4e5 100644 --- a/docs/modules/note.md +++ b/docs/modules/note.md @@ -45,11 +45,11 @@ from bilibili_api import note | name | type | description | | - | - | - | -| cvid | int | 公开笔记 ID (对应专栏的 cvid) (公开笔记必要) | -| aid | int | 稿件 ID(oid_type 为 0 时是 avid) (私有笔记必要) | -| note_id | int | 私有笔记 ID (私有笔记必要) | -| note_type | str | 笔记类型 (private, public) | -| credential | Credential, optional | Credential. Defaults to None. | +| `cvid` | `int` | 公开笔记 ID (对应专栏的 cvid) (公开笔记必要) | +| `aid` | `int` | 稿件 ID(oid_type 为 0 时是 avid) (私有笔记必要) | +| `note_id` | `int` | 私有笔记 ID (私有笔记必要) | +| `note_type` | `str` | 笔记类型 (private, public) | +| `credential` | `Credential, optional` | Credential. Defaults to None. | ### async def add_coins() @@ -60,7 +60,7 @@ from bilibili_api import note -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -73,7 +73,6 @@ from bilibili_api import note -**Returns:** None @@ -83,7 +82,7 @@ from bilibili_api import note -**Returns:** int: aid +**Returns:** `int`: aid @@ -96,7 +95,7 @@ from bilibili_api import note -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -107,7 +106,7 @@ from bilibili_api import note -**Returns:** int: 公开笔记 cvid +**Returns:** `int`: 公开笔记 cvid @@ -118,7 +117,7 @@ from bilibili_api import note -**Returns:** list: 图片信息 +**Returns:** `list`: 图片信息 @@ -129,7 +128,7 @@ from bilibili_api import note -**Returns:** list: 图片信息 +**Returns:** `list`: 图片信息 @@ -140,7 +139,7 @@ from bilibili_api import note -**Returns:** dict: 笔记信息 +**Returns:** `dict`: 笔记信息 @@ -151,7 +150,7 @@ from bilibili_api import note -**Returns:** int: note_id +**Returns:** `int`: note_id @@ -162,7 +161,7 @@ from bilibili_api import note -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -173,7 +172,7 @@ from bilibili_api import note -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -186,7 +185,7 @@ from bilibili_api import note -**Returns:** dict: JSON 数据 +**Returns:** `dict`: JSON 数据 @@ -199,7 +198,7 @@ from bilibili_api import note -**Returns:** str: Markdown 内容 +**Returns:** `str`: Markdown 内容 @@ -213,9 +212,9 @@ from bilibili_api import note | name | type | description | | - | - | - | -| status | bool, optional | 收藏状态. Defaults to True | +| `status` | `bool, optional` | 收藏状态. Defaults to True | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -229,9 +228,9 @@ from bilibili_api import note | name | type | description | | - | - | - | -| status | bool, optional | 点赞状态. Defaults to True | +| `status` | `bool, optional` | 点赞状态. Defaults to True | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -242,7 +241,7 @@ from bilibili_api import note -**Returns:** Note: 专栏类 +**Returns:** `Note`: 专栏类 @@ -267,10 +266,10 @@ from bilibili_api import note | name | type | description | | - | - | - | -| img | Picture | 图片 | -| credential | Credential | 凭据类 | +| `img` | `Picture` | 图片 | +| `credential` | `Credential` | 凭据类 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/opus.md b/docs/modules/opus.md index 159d849b..73901464 100644 --- a/docs/modules/opus.md +++ b/docs/modules/opus.md @@ -33,7 +33,7 @@ from bilibili_api import opus | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | ### def \_\_init\_\_() @@ -48,7 +48,7 @@ from bilibili_api import opus -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -59,7 +59,7 @@ from bilibili_api import opus -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -70,7 +70,7 @@ from bilibili_api import opus -**Returns:** int: 图文 idd +**Returns:** `int`: 图文 idd @@ -82,9 +82,9 @@ from bilibili_api import opus | name | type | description | | - | - | - | -| offset | str, optional | 偏移值(下一页的第一个动态 ID,为该请求结果中的 offset 键对应的值),类似单向链表. Defaults to "" | +| `offset` | `str, optional` | 偏移值(下一页的第一个动态 ID,为该请求结果中的 offset 键对应的值),类似单向链表. Defaults to "" | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -95,7 +95,7 @@ from bilibili_api import opus -**Returns:** int: rid +**Returns:** `int`: rid @@ -108,7 +108,7 @@ from bilibili_api import opus -**Returns:** bool: 是否同时为专栏 +**Returns:** `bool`: 是否同时为专栏 @@ -119,7 +119,7 @@ from bilibili_api import opus -**Returns:** str: markdown 内容 +**Returns:** `str`: markdown 内容 @@ -131,9 +131,9 @@ from bilibili_api import opus | name | type | description | | - | - | - | -| status | bool, optional | 收藏状态. Defaults to True | +| `status` | `bool, optional` | 收藏状态. Defaults to True | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -145,9 +145,9 @@ from bilibili_api import opus | name | type | description | | - | - | - | -| status | bool, optional | 点赞状态. Defaults to True. | +| `status` | `bool, optional` | 点赞状态. Defaults to True. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -160,7 +160,7 @@ from bilibili_api import opus -**Returns:** article.Article: 专栏类 +**Returns:** `article.Article`: 专栏类 @@ -173,7 +173,7 @@ from bilibili_api import opus -**Returns:** dynamic.Dynamic: 对应的动态类 +**Returns:** `dynamic.Dynamic`: 对应的动态类 diff --git a/docs/modules/rank.md b/docs/modules/rank.md index d4126624..7b580401 100644 --- a/docs/modules/rank.md +++ b/docs/modules/rank.md @@ -176,11 +176,11 @@ RankAPIType.PGC 排行榜时间类型 | name | type | description | | - | - | - | -| date | LiveEnergyRankType | 月份. Defaults to LiveEnergyRankType.MONTH | -| pn | int | 页码. Defaults to 1 | -| ps | int | 每页数量. Defaults to 20 | +| `date` | `LiveEnergyRankType` | 月份. Defaults to LiveEnergyRankType.MONTH | +| `pn` | `int` | 页码. Defaults to 1 | +| `ps` | `int` | 每页数量. Defaults to 20 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -193,7 +193,7 @@ RankAPIType.PGC 排行榜时间类型 -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -207,11 +207,11 @@ RankAPIType.PGC 排行榜时间类型 | name | type | description | | - | - | - | -| _type | LiveRankType | 榜单类型. Defaults to LiveRankType.VALUE | -| pn | int | 页码. Defaults to 1 | -| ps | int | 每页数量. Defaults to 20 | +| `_type` | `LiveRankType` | 榜单类型. Defaults to LiveRankType.VALUE | +| `pn` | `int` | 页码. Defaults to 1 | +| `ps` | `int` | 每页数量. Defaults to 20 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -224,7 +224,7 @@ RankAPIType.PGC 排行榜时间类型 -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -238,10 +238,10 @@ RankAPIType.PGC 排行榜时间类型 | name | type | description | | - | - | - | -| pn | int | 页码. Defaults to 1 | -| ps | int | 每页数量. Defaults to 20 | +| `pn` | `int` | 页码. Defaults to 1 | +| `ps` | `int` | 每页数量. Defaults to 20 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -255,9 +255,9 @@ RankAPIType.PGC 排行榜时间类型 | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -270,7 +270,7 @@ RankAPIType.PGC 排行榜时间类型 -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -284,9 +284,9 @@ RankAPIType.PGC 排行榜时间类型 | name | type | description | | - | - | - | -| week | int | 第几周. Defaults to 1. | +| `week` | `int` | 第几周. Defaults to 1. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -300,9 +300,9 @@ RankAPIType.PGC 排行榜时间类型 | name | type | description | | - | - | - | -| week | int | 第几周. Defaults to 1. | +| `week` | `int` | 第几周. Defaults to 1. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -318,9 +318,9 @@ https://www.bilibili.com/v/popular/drama/ | name | type | description | | - | - | - | -| phase_id | int | 期数,从 get_playlet_rank_phase 获取 | +| `phase_id` | `int` | 期数,从 get_playlet_rank_phase 获取 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -333,7 +333,7 @@ https://www.bilibili.com/v/popular/drama/ -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -347,10 +347,10 @@ https://www.bilibili.com/v/popular/drama/ | name | type | description | | - | - | - | -| type_ | RankType | 排行榜类型. Defaults to RankType.All | -| day | RankDayType | 排行榜时间. Defaults to RankDayType.THREE_DAY. 仅对 api_type 为 RankAPIType.PGC 有效 | +| `type_` | `RankType` | 排行榜类型. Defaults to RankType.All | +| `day` | `RankDayType` | 排行榜时间. Defaults to RankDayType.THREE_DAY. 仅对 api_type 为 RankAPIType.PGC 有效 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -364,9 +364,9 @@ https://www.bilibili.com/v/popular/drama/ | name | type | description | | - | - | - | -| type_ | VIPRankType | 排行榜类型. Defaults to VIPRankType.VIP | +| `type_` | `VIPRankType` | 排行榜类型. Defaults to VIPRankType.VIP | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -380,10 +380,9 @@ https://www.bilibili.com/v/popular/drama/ | name | type | description | | - | - | - | -| status | bool | 关注状态. Defaults to True. | -| credential | Credential | 凭据类. Defaults to None. | +| `status` | `bool` | 关注状态. Defaults to True. | +| `credential` | `Credential` | 凭据类. Defaults to None. | -**Returns:** None diff --git a/docs/modules/search.md b/docs/modules/search.md index 230bd8b0..bf8e9dfe 100644 --- a/docs/modules/search.md +++ b/docs/modules/search.md @@ -164,7 +164,7 @@ Ps: Api 中 的 order_sort 字段决定顺序还是倒序 -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -177,7 +177,7 @@ Ps: Api 中 的 order_sort 字段决定顺序还是倒序 -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -191,9 +191,9 @@ Ps: Api 中 的 order_sort 字段决定顺序还是倒序 | name | type | description | | - | - | - | -| keyword | str | 搜索关键词 | +| `keyword` | `str` | 搜索关键词 | -**Returns:** List[str]: 关键词列表 +**Returns:** `List[str]`: 关键词列表 @@ -207,10 +207,10 @@ Ps: Api 中 的 order_sort 字段决定顺序还是倒序 | name | type | description | | - | - | - | -| keyword | str | 搜索关键词 | -| page | int | 页码. Defaults to 1. | +| `keyword` | `str` | 搜索关键词 | +| `page` | `int` | 页码. Defaults to 1. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -226,19 +226,19 @@ Ps: Api 中 的 order_sort 字段决定顺序还是倒序 | name | type | description | | - | - | - | -| keyword | str | 搜索关键词 | -| search_type | SearchObjectType \| None, optional | 搜索类型 | -| order_type | OrderUser \| OrderLiveRoom \| OrderArticle \| OrderVideo \| None, optional | 排序分类类型 | -| time_range | int, optional | 指定时间,自动转换到指定区间,只在视频类型下生效 有四种:10分钟以下,10-30分钟,30-60分钟,60分钟以上 | -| video_zone_type | int \| ZoneTypes \| None, optional | 话题类型,指定 tid (可使用 video_zone 模块查询) | -| order_sort | int \| None, optional | 用户粉丝数及等级排序顺序 默认为0 由高到低:0 由低到高:1 | -| category_id | CategoryTypeArticle \| CategoryTypePhoto \| int \| None, optional | 专栏/相簿分区筛选,指定分类,只在相册和专栏类型下生效 | -| time_start | str, optional | 指定开始时间,与结束时间搭配使用,格式为:"YYYY-MM-DD" | -| time_end | str, optional | 指定结束时间,与开始时间搭配使用,格式为:"YYYY-MM-DD" | -| page | int, optional | 页码 | -| page_size | int, optional | 每一页的数据大小 | +| `keyword` | `str` | 搜索关键词 | +| `search_type` | `SearchObjectType \| None, optional` | 搜索类型 | +| `order_type` | `OrderUser \| OrderLiveRoom \| OrderArticle \| OrderVideo \| None, optional` | 排序分类类型 | +| `time_range` | `int, optional` | 指定时间,自动转换到指定区间,只在视频类型下生效 有四种:10分钟以下,10-30分钟,30-60分钟,60分钟以上 | +| `video_zone_type` | `int \| ZoneTypes \| None, optional` | 话题类型,指定 tid (可使用 video_zone 模块查询) | +| `order_sort` | `int \| None, optional` | 用户粉丝数及等级排序顺序 默认为0 由高到低:0 由低到高:1 | +| `category_id` | `CategoryTypeArticle \| CategoryTypePhoto \| int \| None, optional` | 专栏/相簿分区筛选,指定分类,只在相册和专栏类型下生效 | +| `time_start` | `str, optional` | 指定开始时间,与结束时间搭配使用,格式为:"YYYY-MM-DD" | +| `time_end` | `str, optional` | 指定结束时间,与开始时间搭配使用,格式为:"YYYY-MM-DD" | +| `page` | `int, optional` | 页码 | +| `page_size` | `int, optional` | 每一页的数据大小 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -252,12 +252,12 @@ Ps: Api 中 的 order_sort 字段决定顺序还是倒序 | name | type | description | | - | - | - | -| keyword | str | 搜索关键词 | -| page_num | int | 页码. Defaults to 1. | -| page_size | int | 每一页的数据大小. Defaults to 30. | -| order | OrderCheese | 排序方式. Defaults to OrderCheese.RECOMMEND | +| `keyword` | `str` | 搜索关键词 | +| `page_num` | `int` | 页码. Defaults to 1. | +| `page_size` | `int` | 每一页的数据大小. Defaults to 30. | +| `order` | `OrderCheese` | 排序方式. Defaults to OrderCheese.RECOMMEND | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -271,9 +271,9 @@ Ps: Api 中 的 order_sort 字段决定顺序还是倒序 | name | type | description | | - | - | - | -| keyword | str | 搜索关键词 | +| `keyword` | `str` | 搜索关键词 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -287,12 +287,12 @@ Ps: Api 中 的 order_sort 字段决定顺序还是倒序 | name | type | description | | - | - | - | -| keyword | str | 搜索关键词 | -| page_num | int | 页码. Defaults to 1. | -| page_size | int | 每一页的数据大小. Defaults to 9. | -| credential | Credential | 凭据类. Defaults to None. | +| `keyword` | `str` | 搜索关键词 | +| `page_num` | `int` | 页码. Defaults to 1. | +| `page_size` | `int` | 每一页的数据大小. Defaults to 9. | +| `credential` | `Credential` | 凭据类. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/session.md b/docs/modules/session.md index 944a1062..382da6bd 100644 --- a/docs/modules/session.md +++ b/docs/modules/session.md @@ -58,8 +58,8 @@ from bilibili_api import session | name | type | description | | - | - | - | -| data: 接收到的事件详细信息 | | 接收到的事件详细信息 | -| self_uid: 用户自身 UID | | 用户自身 UID | +| `data` | `Dict` | 接收到的事件详细信息 | +| `self_uid` | `int` | 用户自身 UID | --- @@ -104,7 +104,6 @@ from bilibili_api import session 结束轮询 -**Returns:** None @@ -114,7 +113,7 @@ from bilibili_api import session -**Returns:** int: 0 初始化,1 已连接,2 断开连接中,3 已断开,4 错误 +**Returns:** `int`: 0 初始化,1 已连接,2 断开连接中,3 已断开,4 错误 @@ -126,9 +125,8 @@ from bilibili_api import session | name | type | description | | - | - | - | -| event_type | EventType | 事件类型 | +| `event_type` | `EventType` | 事件类型 | -**Returns:** None @@ -139,10 +137,10 @@ from bilibili_api import session | name | type | description | | - | - | - | -| event : Event 要回复的消息 | | Event 要回复的消息 | -| content: str | Picture 要回复的文字内容 | | str | Picture 要回复的文字内容 | +| `event` | `Event` | 要回复的消息 | +| `content` | `str \| Picture` | 要回复的文字内容 | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -154,9 +152,8 @@ from bilibili_api import session | name | type | description | | - | - | - | -| exclude_self: bool 是否排除自己发出的消息,默认排除 | | bool 是否排除自己发出的消息,默认排除 | +| `exclude_self` | `bool` | 是否排除自己发出的消息,默认排除 | -**Returns:** None @@ -167,9 +164,8 @@ from bilibili_api import session | name | type | description | | - | - | - | -| exclude_self: bool 是否排除自己发出的消息,默认排除 | | bool 是否排除自己发出的消息,默认排除 | +| `exclude_self` | `bool` | 是否排除自己发出的消息,默认排除 | -**Returns:** None @@ -182,12 +178,12 @@ from bilibili_api import session | name | type | description | | - | - | - | -| talker_id | int | 用户 UID | -| credential | Credential | Credential | -| session_type | int | 会话类型 1 私聊 2 应援团 | -| begin_seqno | int | 起始 Seqno | +| `talker_id` | `int` | 用户 UID | +| `credential` | `Credential` | Credential | +| `session_type` | `int` | 会话类型 1 私聊 2 应援团 | +| `begin_seqno` | `int` | 起始 Seqno | -**Returns:** dict: 调用 API 返回结果 +**Returns:** `dict`: 调用 API 返回结果 @@ -201,11 +197,11 @@ from bilibili_api import session | name | type | description | | - | - | - | -| credential | Credential | 凭据类. | -| last_id | Optional, int | 最后一个 ID | -| at_time | Optional, int | 最后一个点赞发送时间 | +| `credential` | `Credential` | 凭据类. | +| `last_id` | `Optional, int` | 最后一个 ID | +| `at_time` | `Optional, int` | 最后一个点赞发送时间 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -219,11 +215,11 @@ from bilibili_api import session | name | type | description | | - | - | - | -| credential | Credential | 凭据类. | -| last_id | Optional, int | 最后一个 ID | -| like_time | Optional, int | 最后一个点赞发送时间 | +| `credential` | `Credential` | 凭据类. | +| `last_id` | `Optional, int` | 最后一个 ID | +| `like_time` | `Optional, int` | 最后一个点赞发送时间 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -237,11 +233,11 @@ from bilibili_api import session | name | type | description | | - | - | - | -| credential | Credential | 凭据类. | -| last_reply_id | Optional, int | 最后一个评论的 ID | -| reply_time | Optional, int | 最后一个评论发送时间 | +| `credential` | `Credential` | 凭据类. | +| `last_reply_id` | `Optional, int` | 最后一个评论的 ID | +| `reply_time` | `Optional, int` | 最后一个评论发送时间 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -255,11 +251,11 @@ from bilibili_api import session | name | type | description | | - | - | - | -| credential | Credential | Credential | -| session_type | int | 会话类型 | -| talker_id | int | 会话对象的UID | +| `credential` | `Credential` | Credential | +| `session_type` | `int` | 会话类型 | +| `talker_id` | `int` | 会话对象的UID | -**Returns:** dict: 调用 API 返回结果 +**Returns:** `dict`: 调用 API 返回结果 @@ -273,9 +269,9 @@ from bilibili_api import session | name | type | description | | - | - | - | -| credential | Credential | 凭据类. | +| `credential` | `Credential` | 凭据类. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -289,10 +285,10 @@ from bilibili_api import session | name | type | description | | - | - | - | -| credential | Credential | Credential | -| session_type | int | 会话类型 1 | +| `credential` | `Credential` | Credential | +| `session_type` | `int` | 会话类型 1 | -**Returns:** dict: 调用 API 返回结果 +**Returns:** `dict`: 调用 API 返回结果 @@ -306,9 +302,9 @@ from bilibili_api import session | name | type | description | | - | - | - | -| credential | Credential | 凭据类. | +| `credential` | `Credential` | 凭据类. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -322,9 +318,9 @@ from bilibili_api import session | name | type | description | | - | - | - | -| credential | Credential | 凭据类. | +| `credential` | `Credential` | 凭据类. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -338,10 +334,10 @@ from bilibili_api import session | name | type | description | | - | - | - | -| credential | Credential | Credential | -| begin_ts | int | 起始时间戳 | +| `credential` | `Credential` | Credential | +| `begin_ts` | `int` | 起始时间戳 | -**Returns:** dict: 调用 API 返回结果 +**Returns:** `dict`: 调用 API 返回结果 @@ -355,12 +351,12 @@ from bilibili_api import session | name | type | description | | - | - | - | -| credential | Credential | 凭证 | -| receiver_id | int | 接收者 UID | -| msg_type | EventType | 信息类型,参考 Event 类的事件类型。 | -| content | str \| Picture | 信息内容。支持文字和图片。 | +| `credential` | `Credential` | 凭证 | +| `receiver_id` | `int` | 接收者 UID | +| `msg_type` | `EventType` | 信息类型,参考 Event 类的事件类型。 | +| `content` | `str \| Picture` | 信息内容。支持文字和图片。 | -**Returns:** dict: 调用 API 返回结果 +**Returns:** `dict`: 调用 API 返回结果 diff --git a/docs/modules/show.md b/docs/modules/show.md index 80abdf06..1ff64a90 100644 --- a/docs/modules/show.md +++ b/docs/modules/show.md @@ -73,11 +73,11 @@ isBuyerValid (bool): 默认为 True | name | type | description | | - | - | - | -| credential | Credential | Credential 对象 | -| target_buyer | BuyerInfo | 购票人 | -| project_id | int | 展出id | -| session | Session | Session 对象 | -| ticket | Ticket | Ticket 对象 | +| `credential` | `Credential` | Credential 对象 | +| `target_buyer` | `BuyerInfo` | 购票人 | +| `project_id` | `int` | 展出id | +| `session` | `Session` | Session 对象 | +| `ticket` | `Ticket` | Ticket 对象 | ### async def create_order() @@ -86,7 +86,7 @@ isBuyerValid (bool): 默认为 True -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -97,7 +97,7 @@ isBuyerValid (bool): 默认为 True -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -151,9 +151,9 @@ sale_end (str): 开售结束时间 | name | type | description | | - | - | - | -| credential | Credential | 登录凭证 | +| `credential` | `Credential` | 登录凭证 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -167,9 +167,9 @@ sale_end (str): 开售结束时间 | name | type | description | | - | - | - | -| credential | Credential | 登录凭证 | +| `credential` | `Credential` | 登录凭证 | -**Returns:** list[BuyerInfo]: BuyerInfo对象列表 +**Returns:** `list[BuyerInfo]`: BuyerInfo对象列表 @@ -183,9 +183,9 @@ sale_end (str): 开售结束时间 | name | type | description | | - | - | - | -| project_id | int | 项目id | +| `project_id` | `int` | 项目id | -**Returns:** list[Session]: 存放场次对象的list +**Returns:** `list[Session]`: 存放场次对象的list @@ -199,9 +199,9 @@ sale_end (str): 开售结束时间 | name | type | description | | - | - | - | -| project_id | int | 项目id | +| `project_id` | `int` | 项目id | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/topic.md b/docs/modules/topic.md index ea9698a9..8d03e782 100644 --- a/docs/modules/topic.md +++ b/docs/modules/topic.md @@ -30,7 +30,7 @@ from bilibili_api import topic | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | ### def \_\_init\_\_() @@ -38,8 +38,8 @@ from bilibili_api import topic | name | type | description | | - | - | - | -| topic_id | int | 话题 id | -| credential | Credential | 凭据类 | +| `topic_id` | `int` | 话题 id | +| `credential` | `Credential` | 凭据类 | ### async def get_cards() @@ -51,11 +51,11 @@ from bilibili_api import topic | name | type | description | | - | - | - | -| ps | int | 数据数量. Defaults to 100. | -| offset | Optional, str | 偏移量. 生成格式为 f'{页码}_{页码*数据量]}' 如'2_40' Defaults to None. | -| sort_by | TopicCardsSortBy | 排序方式. Defaults to TopicCardsSortBy.HOT. | +| `ps` | `int` | 数据数量. Defaults to 100. | +| `offset` | `Optional, str` | 偏移量. 生成格式为 f'{页码}_{页码*数据量]}' 如'2_40' Defaults to None. | +| `sort_by` | `TopicCardsSortBy` | 排序方式. Defaults to TopicCardsSortBy.HOT. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -66,7 +66,7 @@ from bilibili_api import topic -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -77,7 +77,7 @@ from bilibili_api import topic -**Returns:** int: 话题 id +**Returns:** `int`: 话题 id @@ -89,9 +89,9 @@ from bilibili_api import topic | name | type | description | | - | - | - | -| status | bool | 是否设置点赞. Defaults to True. | +| `status` | `bool` | 是否设置点赞. Defaults to True. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -103,9 +103,9 @@ from bilibili_api import topic | name | type | description | | - | - | - | -| status | bool | 是否设置收藏. Defaults to True. | +| `status` | `bool` | 是否设置收藏. Defaults to True. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -134,9 +134,9 @@ from bilibili_api import topic | name | type | description | | - | - | - | -| numbers | int | 话题数量. Defaults to 33. | +| `numbers` | `int` | 话题数量. Defaults to 33. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -152,11 +152,11 @@ from bilibili_api import topic | name | type | description | | - | - | - | -| keyword | str | 搜索关键词 | -| ps | int | 每页数量. Defaults to 20. | -| pn | int | 页数. Defaults to 1. | +| `keyword` | `str` | 搜索关键词 | +| `ps` | `int` | 每页数量. Defaults to 20. | +| `pn` | `int` | 页数. Defaults to 1. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/user.md b/docs/modules/user.md index c76e6768..be1bde42 100644 --- a/docs/modules/user.md +++ b/docs/modules/user.md @@ -289,8 +289,8 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| uid | int | 用户 UID | -| credential | Credential \| None, optional | 凭据. Defaults to None. | +| `uid` | `int` | 用户 UID | +| `credential` | `Credential \| None, optional` | 凭据. Defaults to None. | ### async def get_access_id() @@ -299,7 +299,7 @@ medialist排序顺序。 -**Returns:** str: access_id +**Returns:** `str`: access_id @@ -311,11 +311,11 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| biz | AlbumType, optional | 排序方式. Defaults to AlbumType.ALL. | -| page_num | int, optional | 页码数,从 1 开始。 Defaults to 1. | -| page_size | int | 每一页的相簿条目. Defaults to 30. | +| `biz` | `AlbumType, optional` | 排序方式. Defaults to AlbumType.ALL. | +| `page_num` | `int, optional` | 页码数,从 1 开始。 Defaults to 1. | +| `page_size` | `int` | 每一页的相簿条目. Defaults to 30. | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -326,7 +326,7 @@ medialist排序顺序。 -**Returns:** list: 关注列表 +**Returns:** `list`: 关注列表 @@ -338,9 +338,9 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| order | ArticleListOrder, optional | 排序方式. Defaults to ArticleListOrder.LATEST | +| `order` | `ArticleListOrder, optional` | 排序方式. Defaults to ArticleListOrder.LATEST | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -352,11 +352,11 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| order | ArticleOrder, optional | 排序方式. Defaults to ArticleOrder.PUBDATE. | -| pn | int, optional | 页码数,从 1 开始。 Defaults to 1. | -| ps | int, optional | 每一页的视频数. Defaults to 30. | +| `order` | `ArticleOrder, optional` | 排序方式. Defaults to ArticleOrder.PUBDATE. | +| `pn` | `int, optional` | 页码数,从 1 开始。 Defaults to 1. | +| `ps` | `int, optional` | 每一页的视频数. Defaults to 30. | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -368,11 +368,11 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| order | AudioOrder, optional | 排序方式. Defaults to AudioOrder.PUBDATE. | -| pn | int, optional | 页码数,从 1 开始。 Defaults to 1. | -| ps | int, optional | 每一页的视频数. Defaults to 30. | +| `order` | `AudioOrder, optional` | 排序方式. Defaults to AudioOrder.PUBDATE. | +| `pn` | `int, optional` | 页码数,从 1 开始。 Defaults to 1. | +| `ps` | `int, optional` | 每一页的视频数. Defaults to 30. | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -387,7 +387,7 @@ medialist排序顺序。 -**Returns:** dict: 调用接口返回的结果 +**Returns:** `dict`: 调用接口返回的结果 @@ -399,12 +399,12 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| sid | int | 频道的 season_id | -| sort | ChannelOrder | 排序方式 | -| pn | int | 页数,默认为 1 | -| ps | int | 每一页显示的视频数量 | +| `sid` | `int` | 频道的 season_id | +| `sort` | `ChannelOrder` | 排序方式 | +| `pn` | `int` | 页数,默认为 1 | +| `ps` | `int` | 每一页显示的视频数量 | -**Returns:** dict: 调用接口返回的内容 +**Returns:** `dict`: 调用接口返回的内容 @@ -416,11 +416,11 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| sid | int | 频道的 series_id | -| pn | int | 页数,默认为 1 | -| ps | int | 每一页显示的视频数量 | +| `sid` | `int` | 频道的 series_id | +| `pn` | `int` | 页数,默认为 1 | +| `ps` | `int` | 每一页显示的视频数量 | -**Returns:** dict: 调用接口返回的内容 +**Returns:** `dict`: 调用接口返回的内容 @@ -431,7 +431,7 @@ medialist排序顺序。 -**Returns:** List[ChannelSeries]: 合集与列表类的列表 +**Returns:** `List[ChannelSeries]`: 合集与列表类的列表 @@ -442,7 +442,7 @@ medialist排序顺序。 -**Returns:** dict: 调用接口返回的结果 +**Returns:** `dict`: 调用接口返回的结果 @@ -456,10 +456,10 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| offset | str, optional | 该值为第一次调用本方法时,数据中会有个 next_offset 字段,指向下一动态列表第一条动态(类似单向链表)。根据上一次获取结果中的 next_offset 字段值,循环填充该值即可获取到全部动态。0 为从头开始。Defaults to 0. | -| need_top | bool, optional | 显示置顶动态. Defaults to False. | +| `offset` | `str, optional` | 该值为第一次调用本方法时,数据中会有个 next_offset 字段,指向下一动态列表第一条动态(类似单向链表)。根据上一次获取结果中的 next_offset 字段值,循环填充该值即可获取到全部动态。0 为从头开始。Defaults to 0. | +| `need_top` | `bool, optional` | 显示置顶动态. Defaults to False. | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -471,9 +471,9 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| offset | str, optional | 该值为第一次调用本方法时,数据中会有个 offset 字段,指向下一动态列表第一条动态(类似单向链表)。根据上一次获取结果中的 next_offset 字段值,循环填充该值即可获取到全部动态。空字符串为从头开始。Defaults to "". | +| `offset` | `str, optional` | 该值为第一次调用本方法时,数据中会有个 offset 字段,指向下一动态列表第一条动态(类似单向链表)。根据上一次获取结果中的 next_offset 字段值,循环填充该值即可获取到全部动态。空字符串为从头开始。Defaults to "". | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -484,7 +484,7 @@ medialist排序顺序。 -**Returns:** dict: 调用接口返回的结果 +**Returns:** `dict`: 调用接口返回的结果 @@ -496,11 +496,11 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| pn | int, optional | 页码,从 1 开始. Defaults to 1. | -| ps | int, optional | 每页的数据量. Defaults to 100. | -| desc | bool, optional | 倒序排序. Defaults to True. | +| `pn` | `int, optional` | 页码,从 1 开始. Defaults to 1. | +| `ps` | `int, optional` | 每页的数据量. Defaults to 100. | +| `desc` | `bool, optional` | 倒序排序. Defaults to True. | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -512,12 +512,12 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| pn | int, optional | 页码,从 1 开始. Defaults to 1. | -| ps | int, optional | 每页的数据量. Defaults to 100. | -| attention | bool, optional | 是否采用“最常访问”排序,否则为“关注顺序”排序. Defaults to False. | -| order | OrderType, optional | 排序方式. Defaults to OrderType.desc. | +| `pn` | `int, optional` | 页码,从 1 开始. Defaults to 1. | +| `ps` | `int, optional` | 每页的数据量. Defaults to 100. | +| `attention` | `bool, optional` | 是否采用“最常访问”排序,否则为“关注顺序”排序. Defaults to False. | +| `order` | `OrderType, optional` | 排序方式. Defaults to OrderType.desc. | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -528,7 +528,7 @@ medialist排序顺序。 -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -539,7 +539,7 @@ medialist排序顺序。 -**Returns:** list: 调用接口返回的内容。 +**Returns:** `list`: 调用接口返回的内容。 @@ -551,15 +551,15 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| oid | int, optional | 起始视频 aid, 默认为列表开头 | -| ps | int, optional | 每一页的视频数. Defaults to 20. Max 100 | -| direction | bool, optional | 相对于给定oid的查询方向 True 向列表末尾方向 False 向列表开头方向 Defaults to False. | -| desc | bool, optional | 倒序排序. Defaults to True. | -| sort_field | int, optional | 用于排序的栏 1 发布时间,2 播放量,3 收藏量 | -| tid | int, optional | 分区 ID. Defaults to 0(全部). 1 部分(未知) | -| with_current | bool, optional | 返回的列表中是否包含给定oid自身 Defaults to False. | +| `oid` | `int, optional` | 起始视频 aid, 默认为列表开头 | +| `ps` | `int, optional` | 每一页的视频数. Defaults to 20. Max 100 | +| `direction` | `bool, optional` | 相对于给定oid的查询方向 True 向列表末尾方向 False 向列表开头方向 Defaults to False. | +| `desc` | `bool, optional` | 倒序排序. Defaults to True. | +| `sort_field` | `int, optional` | 用于排序的栏 1 发布时间,2 播放量,3 收藏量 | +| `tid` | `int, optional` | 分区 ID. Defaults to 0(全部). 1 部分(未知) | +| `with_current` | `bool, optional` | 返回的列表中是否包含给定oid自身 Defaults to False. | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -571,10 +571,10 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| type_ | OpusType, optional | 获取的图文类型. Defaults to OpusType.ALL. | -| offset | str, optional | 偏移量。每次请求可获取下次请求对应的偏移量,类似单向链表。对应返回结果的 `["offset"]` Defaults to "". | +| `type_` | `OpusType, optional` | 获取的图文类型. Defaults to OpusType.ALL. | +| `offset` | `str, optional` | 偏移量。每次请求可获取下次请求对应的偏移量,类似单向链表。对应返回结果的 `["offset"]` Defaults to "". | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -585,7 +585,7 @@ medialist排序顺序。 -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -596,7 +596,7 @@ medialist排序顺序。 -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -607,7 +607,7 @@ medialist排序顺序。 -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -618,7 +618,7 @@ medialist排序顺序。 -**Returns:** dict: 调用接口返回的结果 +**Returns:** `dict`: 调用接口返回的结果 @@ -630,10 +630,10 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| pn | int | 页码. Defaults to 1. | -| ps | int | 单页数据量. Defaults to 50. | +| `pn` | `int` | 页码. Defaults to 1. | +| `ps` | `int` | 单页数据量. Defaults to 50. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -644,7 +644,7 @@ medialist排序顺序。 -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -656,12 +656,12 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| pn | int, optional | 页码数,从 1 开始。 Defaults to 1. | -| ps | int, optional | 每一页的番剧数. Defaults to 15. | -| type_ | BangumiType, optional | 资源类型. Defaults to BangumiType.BANGUMI | -| follow_status | BangumiFollowStatus, optional | 追番状态. Defaults to BangumiFollowStatus.ALL | +| `pn` | `int, optional` | 页码数,从 1 开始。 Defaults to 1. | +| `ps` | `int, optional` | 每一页的番剧数. Defaults to 15. | +| `type_` | `BangumiType, optional` | 资源类型. Defaults to BangumiType.BANGUMI | +| `follow_status` | `BangumiFollowStatus, optional` | 追番状态. Defaults to BangumiFollowStatus.ALL | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -672,7 +672,7 @@ medialist排序顺序。 -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -683,7 +683,7 @@ medialist排序顺序。 -**Returns:** int: 用户 UID +**Returns:** `int`: 用户 UID @@ -694,7 +694,7 @@ medialist排序顺序。 -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -705,7 +705,7 @@ medialist排序顺序。 -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -717,10 +717,10 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| pn | int, optional | 页码,从 1 开始. Defaults to 1. | -| ps | int, optional | 每页的数据量. Defaults to 20. | +| `pn` | `int, optional` | 页码,从 1 开始. Defaults to 1. | +| `ps` | `int, optional` | 每页的数据量. Defaults to 20. | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -731,7 +731,7 @@ medialist排序顺序。 -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 [用户空间详细信息](https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/user/info.md#%E7%94%A8%E6%88%B7%E7%A9%BA%E9%97%B4%E8%AF%A6%E7%BB%86%E4%BF%A1%E6%81%AF) @@ -744,7 +744,7 @@ medialist排序顺序。 -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -756,13 +756,13 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| tid | int, optional | 分区 ID. Defaults to 0(全部). | -| pn | int, optional | 页码,从 1 开始. Defaults to 1. | -| ps | int, optional | 每一页的视频数. Defaults to 30. | -| keyword | str, optional | 搜索关键词. Defaults to "". | -| order | VideoOrder, optional | 排序方式. Defaults to VideoOrder.PUBDATE | +| `tid` | `int, optional` | 分区 ID. Defaults to 0(全部). | +| `pn` | `int, optional` | 页码,从 1 开始. Defaults to 1. | +| `ps` | `int, optional` | 每一页的视频数. Defaults to 30. | +| `keyword` | `str, optional` | 搜索关键词. Defaults to "". | +| `order` | `VideoOrder, optional` | 排序方式. Defaults to VideoOrder.PUBDATE | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -773,7 +773,7 @@ medialist排序顺序。 -**Returns:** bool: 是否有效 +**Returns:** `bool`: 是否有效 @@ -785,9 +785,9 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| relation | RelationType | 用户关系。 | +| `relation` | `RelationType` | 用户关系。 | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -799,9 +799,9 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| content | str | 需要修改的内容 | +| `content` | `str` | 需要修改的内容 | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -812,9 +812,9 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| since | int, optional | 开始时间(msec) | +| `since` | `int, optional` | 开始时间(msec) | -**Returns:** dict: 调用接口返回的内容。 +**Returns:** `dict`: 调用接口返回的内容。 @@ -843,9 +843,9 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| nick_name | str | 昵称 | +| `nick_name` | `str` | 昵称 | -**Returns:** List[bool, str]: 昵称是否可用 + 不可用原因 +**Returns:** `List[bool, str]`: 昵称是否可用 + 不可用原因 @@ -859,9 +859,9 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -875,10 +875,10 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| name | str | 分组名 | -| credential | Credential | Credential | +| `name` | `str` | 分组名 | +| `credential` | `Credential` | Credential | -**Returns:** API 调用返回结果。 +**Returns:** `dict`: API 调用返回结果。 @@ -892,10 +892,10 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| group_id | int | 分组 ID | -| credential | Credential | Credential | +| `group_id` | `int` | 分组 ID | +| `credential` | `Credential` | Credential | -**Returns:** 调用 API 返回结果 +**Returns:** `dict`: 调用 API 返回结果 @@ -909,9 +909,9 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -925,13 +925,12 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| birthday | str | 生日 YYYY-MM-DD | -| sex | str | 性别 男|女|保密 | -| uname | str | 用户名 | -| usersign | str | 个性签名 | -| credential | Credential | Credential | +| `birthday` | `str` | 生日 YYYY-MM-DD | +| `sex` | `str` | 性别 男|女|保密 | +| `uname` | `str` | 用户名 | +| `usersign` | `str` | 个性签名 | +| `credential` | `Credential` | Credential | -**Returns:** None @@ -944,11 +943,10 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | -| pn | int, optional | 页码. Defaults to 1. | -| ps | int, optional | 每页数据大小. Defaults to 50. | +| `credential` | `Credential` | 凭据类 | +| `pn` | `int, optional` | 页码. Defaults to 1. | +| `ps` | `int, optional` | 每页数据大小. Defaults to 50. | -**Returns:** None @@ -960,7 +958,7 @@ medialist排序顺序。 -**Returns:** int: 硬币数量 +**Returns:** `int`: 硬币数量 @@ -974,10 +972,10 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| ts | int, optional | 时间戳. Defaults to 0. | -| credential | Credential \| None, optional | 凭据. Defaults to None. | +| `ts` | `int, optional` | 时间戳. Defaults to 0. | +| `credential` | `Credential \| None, optional` | 凭据. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -991,9 +989,9 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| credential | Credential | 凭证。 | +| `credential` | `Credential` | 凭证。 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -1007,9 +1005,8 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | -**Returns:** None @@ -1022,11 +1019,11 @@ medialist排序顺序。 | name | type | description | | - | - | - | -| page_num | int | 页码数 | -| per_page_item | int | 每页多少条历史记录 | -| credential | Credential | Credential | +| `page_num` | `int` | 页码数 | +| `per_page_item` | `int` | 每页多少条历史记录 | +| `credential` | `Credential` | Credential | -**Returns:** list(dict): 返回当前页的指定历史记录列表 +**Returns:** `list(dict)`: 返回当前页的指定历史记录列表 @@ -1044,13 +1041,13 @@ max、business、view_at 参数用于历史记录列表的 IFS (无限滚动), | name | type | description | | - | - | - | -| credential | Credential | Credential | -| _type | HistroyType | 历史记录分类, 默认为 HistroyType.ALL | -| ps | int | 每页多少条历史记录, 默认为 20 | -| view_at | int | 时间戳,获取此时间戳之前的历史记录 | -| max | int | 历史记录截止目标 oid | +| `credential` | `Credential` | Credential | +| `_type` | `HistroyType` | 历史记录分类, 默认为 HistroyType.ALL | +| `ps` | `int` | 每页多少条历史记录, 默认为 20 | +| `view_at` | `int` | 时间戳,获取此时间戳之前的历史记录 | +| `max` | `int` | 历史记录截止目标 oid | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -1064,9 +1061,8 @@ max、business、view_at 参数用于历史记录列表的 IFS (无限滚动), | name | type | description | | - | - | - | -| credential | Credential | Credential | +| `credential` | `Credential` | Credential | -**Returns:** None @@ -1078,7 +1074,6 @@ max、business、view_at 参数用于历史记录列表的 IFS (无限滚动), -**Returns:** None @@ -1091,9 +1086,9 @@ max、business、view_at 参数用于历史记录列表的 IFS (无限滚动), | name | type | description | | - | - | - | -| credential | Credential | 凭证。 | +| `credential` | `Credential` | 凭证。 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -1107,9 +1102,9 @@ max、business、view_at 参数用于历史记录列表的 IFS (无限滚动), | name | type | description | | - | - | - | -| credential | Credential | 凭证。 | +| `credential` | `Credential` | 凭证。 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -1123,11 +1118,11 @@ max、business、view_at 参数用于历史记录列表的 IFS (无限滚动), | name | type | description | | - | - | - | -| page_num: 页码 | | 页码 | -| page_size: 每页项数 | | 每页项数 | -| credential | Credential | 凭据类 | +| `page_num` | `int` | 页码 | +| `page_size` | `int` | 每页项数 | +| `credential` | `Credential` | 凭据类 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -1141,11 +1136,11 @@ max、business、view_at 参数用于历史记录列表的 IFS (无限滚动), | name | type | description | | - | - | - | -| page_num: 页码 | | 页码 | -| page_size: 每页项数 | | 每页项数 | -| credential | Credential | 凭据类 | +| `page_num` | `int` | 页码 | +| `page_size` | `int` | 每页项数 | +| `credential` | `Credential` | 凭据类 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -1159,11 +1154,10 @@ max、business、view_at 参数用于历史记录列表的 IFS (无限滚动), | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | -| pn | int, optional | 页码. Defaults to 1. | -| ps | int, optional | 每页数据大小. Defaults to 50. | +| `credential` | `Credential` | 凭据类 | +| `pn` | `int, optional` | 页码. Defaults to 1. | +| `ps` | `int, optional` | 每页数据大小. Defaults to 50. | -**Returns:** None @@ -1176,11 +1170,10 @@ max、business、view_at 参数用于历史记录列表的 IFS (无限滚动), | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | -| pn | int, optional | 页码. Defaults to 1. | -| ps | int, optional | 每页数据大小. Defaults to 50. | +| `credential` | `Credential` | 凭据类 | +| `pn` | `int, optional` | 页码. Defaults to 1. | +| `ps` | `int, optional` | 每页数据大小. Defaults to 50. | -**Returns:** None @@ -1193,9 +1186,9 @@ max、business、view_at 参数用于历史记录列表的 IFS (无限滚动), | name | type | description | | - | - | - | -| credential | Credential | 凭据类 | +| `credential` | `Credential` | 凭据类 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -1209,10 +1202,10 @@ max、business、view_at 参数用于历史记录列表的 IFS (无限滚动), | name | type | description | | - | - | - | -| names | str/List[str] | 用户名 | -| credential | Credential, optional | 凭据类. Defaults to None. | +| `names` | `str/List[str]` | 用户名 | +| `credential` | `Credential, optional` | 凭据类. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -1226,11 +1219,11 @@ max、business、view_at 参数用于历史记录列表的 IFS (无限滚动), | name | type | description | | - | - | - | -| group_id | int | 分组 ID | -| new_name | str | 新的分组名 | -| credential | Credential | Credential | +| `group_id` | `int` | 分组 ID | +| `new_name` | `str` | 新的分组名 | +| `credential` | `Credential` | Credential | -**Returns:** 调用 API 返回结果 +**Returns:** `dict`: 调用 API 返回结果 @@ -1244,11 +1237,11 @@ max、business、view_at 参数用于历史记录列表的 IFS (无限滚动), | name | type | description | | - | - | - | -| uids | List[int] | 要设置的用户 UID 列表,必须已关注。 | -| group_ids | List[int] | 要复制到的分组列表 | -| credential | Credential | Credential | +| `uids` | `List[int]` | 要设置的用户 UID 列表,必须已关注。 | +| `group_ids` | `List[int]` | 要复制到的分组列表 | +| `credential` | `Credential` | Credential | -**Returns:** API 调用结果 +**Returns:** `dict`: API 调用结果 diff --git a/docs/modules/video.md b/docs/modules/video.md index 83a68d6d..00950eb9 100644 --- a/docs/modules/video.md +++ b/docs/modules/video.md @@ -116,8 +116,8 @@ from bilibili_api import video | name | type | description | | - | - | - | -| url | str | 音频流 url | -| audio_quality | AudioQuality | 音频流清晰度 | +| `url` | `str` | 音频流 url | +| `audio_quality` | `AudioQuality` | 音频流清晰度 | --- @@ -148,7 +148,7 @@ FLV 视频流 | name | type | description | | - | - | - | -| url | str | FLV 流 url | +| `url` | `str` | FLV 流 url | --- @@ -164,7 +164,7 @@ MP4 视频流 | name | type | description | | - | - | - | -| url | str | HTML5 mp4 视频流 | +| `url` | `str` | HTML5 mp4 视频流 | --- @@ -181,9 +181,9 @@ MP4 视频流 | name | type | description | | - | - | - | -| bvid | str \| None, optional | BV 号. bvid 和 aid 必须提供其中之一。 | -| aid | int \| None, optional | AV 号. bvid 和 aid 必须提供其中之一。 | -| credential | Credential \| None, optional | Credential 类. Defaults to None. | +| `bvid` | `str \| None, optional` | BV 号. bvid 和 aid 必须提供其中之一。 | +| `aid` | `int \| None, optional` | AV 号. bvid 和 aid 必须提供其中之一。 | +| `credential` | `Credential \| None, optional` | Credential 类. Defaults to None. | ### async def add_tag() @@ -193,9 +193,9 @@ MP4 视频流 | name | type | description | | - | - | - | -| name | str | 标签名字。 | +| `name` | `str` | 标签名字。 | -**Returns:** dict: 调用 API 返回的结果。会返回标签 ID。 +**Returns:** `dict`: 调用 API 返回的结果。会返回标签 ID。 @@ -206,7 +206,7 @@ MP4 视频流 -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -218,10 +218,10 @@ MP4 视频流 | name | type | description | | - | - | - | -| reason | Any | 投诉类型。传入 VideoAppealReasonType 中的项目即可。 | -| detail | str | 详情信息。 | +| `reason` | `Any` | 投诉类型。传入 VideoAppealReasonType 中的项目即可。 | +| `detail` | `str` | 详情信息。 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -232,7 +232,7 @@ MP4 视频流 -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -244,9 +244,9 @@ MP4 视频流 | name | type | description | | - | - | - | -| tag_id | int | 标签 ID。 | +| `tag_id` | `int` | 标签 ID。 | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -260,11 +260,11 @@ cid 和 page_index 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| cid | Optional, int | 分 P 的 cid。 | -| page_index | Optional, int | 分 P 号,从 0 开始。 | -| up_mid | Optional, int | up 主的 mid。 | +| `cid` | `Optional, int` | 分 P 的 cid。 | +| `page_index` | `Optional, int` | 分 P 号,从 0 开始。 | +| `up_mid` | `Optional, int` | up 主的 mid。 | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -275,7 +275,7 @@ cid 和 page_index 至少提供其中一个,其中 cid 优先级最高 -**Returns:** int: aid。 +**Returns:** `int`: aid。 @@ -286,7 +286,7 @@ cid 和 page_index 至少提供其中一个,其中 cid 优先级最高 -**Returns:** str: BVID。 +**Returns:** `str`: BVID。 @@ -297,7 +297,7 @@ cid 和 page_index 至少提供其中一个,其中 cid 优先级最高 -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -309,9 +309,9 @@ cid 和 page_index 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| page_index | int | 分 P | +| `page_index` | `int` | 分 P | -**Returns:** int: cid +**Returns:** `int`: cid @@ -322,7 +322,7 @@ cid 和 page_index 至少提供其中一个,其中 cid 优先级最高 -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -334,10 +334,10 @@ cid 和 page_index 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| page_index | int, optional | 分 P 号,从 0 开始。Defaults to None | -| cid | int, optional | 分 P 的 ID。Defaults to None | +| `page_index` | `int, optional` | 分 P 号,从 0 开始。Defaults to None | +| `cid` | `int, optional` | 分 P 的 ID。Defaults to None | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -349,10 +349,10 @@ cid 和 page_index 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| page_index | int, optional | 分 P 序号. Defaults to 0. | -| cid | int \| None, optional | cid. Defaults to None. | +| `page_index` | `int, optional` | 分 P 序号. Defaults to 0. | +| `cid` | `int \| None, optional` | cid. Defaults to None. | -**Returns:** xml 文件源 +**Returns:** `str`: xml 文件源 @@ -364,13 +364,13 @@ cid 和 page_index 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| page_index | int, optional | 分 P 号,从 0 开始。Defaults to None | -| date | datetime.Date \| None, optional | 指定日期后为获取历史弹幕,精确到年月日。Defaults to None. | -| cid | int \| None, optional | 分 P 的 ID。Defaults to None | -| from_seg | int, optional | 从第几段开始(0 开始编号,None 为从第一段开始,一段 6 分钟). Defaults to None. | -| to_seg | int, optional | 到第几段结束(0 开始编号,None 为到最后一段,包含编号的段,一段 6 分钟). Defaults to None. | +| `page_index` | `int, optional` | 分 P 号,从 0 开始。Defaults to None | +| `date` | `datetime.Date \| None, optional` | 指定日期后为获取历史弹幕,精确到年月日。Defaults to None. | +| `cid` | `int \| None, optional` | 分 P 的 ID。Defaults to None | +| `from_seg` | `int, optional` | 从第几段开始(0 开始编号,None 为从第一段开始,一段 6 分钟). Defaults to None. | +| `to_seg` | `int, optional` | 到第几段结束(0 开始编号,None 为到最后一段,包含编号的段,一段 6 分钟). Defaults to None. | -**Returns:** List[Danmaku]: Danmaku 类的列表。 +**Returns:** `List[Danmaku]`: Danmaku 类的列表。 注意: @@ -386,7 +386,7 @@ cid 和 page_index 至少提供其中一个,其中 cid 优先级最高 -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -402,10 +402,10 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| page_index | int \| None, optional | 分 P 号,从 0 开始。Defaults to None | -| cid | int \| None, optional | 分 P 的 ID。Defaults to None | +| `page_index` | `int \| None, optional` | 分 P 号,从 0 开始。Defaults to None | +| `cid` | `int \| None, optional` | 分 P 的 ID。Defaults to None | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -417,11 +417,11 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| page_index | int \| None, optional | 分 P 号,从 0 开始。Defaults to None | -| date | datetime.date \| None | 精确到年月. Defaults to None。 | -| cid | int \| None, optional | 分 P 的 ID。Defaults to None | +| `page_index` | `int \| None, optional` | 分 P 号,从 0 开始。Defaults to None | +| `date` | `datetime.date \| None` | 精确到年月. Defaults to None。 | +| `cid` | `int \| None, optional` | 分 P 的 ID。Defaults to None | -**Returns:** None | List[str]: 调用 API 返回的结果。不存在时为 None。 +**Returns:** `None | List[str]`: 调用 API 返回的结果。不存在时为 None。 @@ -432,7 +432,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -443,7 +443,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -454,7 +454,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -465,7 +465,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** int: 视频已投币数量。 +**Returns:** `int`: 视频已投币数量。 @@ -477,10 +477,10 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| page_index | int \| None | 分 P 号 | -| cid | int \| None | 分 P 编码 | +| `page_index` | `int \| None` | 分 P 号 | +| `cid` | `int \| None` | 分 P 编码 | -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -492,10 +492,10 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| cid | int \| None | 分 P ID,从视频信息中获取 | -| epid | int \| None | 番剧分集 ID,从番剧信息中获取 | +| `cid` | `int \| None` | 分 P ID,从视频信息中获取 | +| `epid` | `int \| None` | 番剧分集 ID,从番剧信息中获取 | -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -506,7 +506,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** list: note_Ids。 +**Returns:** `list`: note_Ids。 @@ -518,10 +518,10 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| pn | int | 页码 | -| ps | int | 每页项数 | +| `pn` | `int` | 页码 | +| `ps` | `int` | 每页项数 | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -532,7 +532,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -543,7 +543,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -555,10 +555,10 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| page_index | int, optional | 分 P 号. Defaults to 0. | -| cid | int \| None, optional | 分 P id. Defaults to None. | +| `page_index` | `int, optional` | 分 P 号. Defaults to 0. | +| `cid` | `int \| None, optional` | 分 P id. Defaults to None. | -**Returns:** List[SpecialDanmaku]: 调用接口解析后的结果 +**Returns:** `List[SpecialDanmaku]`: 调用接口解析后的结果 @@ -570,9 +570,9 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| cid | int \| None | 分 P ID,从视频信息中获取 | +| `cid` | `int \| None` | 分 P ID,从视频信息中获取 | -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -584,10 +584,10 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| page_index | int \| None | 分 P 序号. Defaults to 0. | -| cid | int \| None | 分 P 编码. Defaults to None. | +| `page_index` | `int \| None` | 分 P 序号. Defaults to 0. | +| `cid` | `int \| None` | 分 P 编码. Defaults to None. | -**Returns:** List[dict]: 调用 API 返回的结果。 +**Returns:** `List[dict]`: 调用 API 返回的结果。 @@ -598,7 +598,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** int: up_mid +**Returns:** `int`: up_mid @@ -610,11 +610,11 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| cid | int | 分 P CID(可选) | -| json_index | bool | json 数组截取时间表 True 为需要,False 不需要 | -| pvideo | bool | 是否只获取预览 | +| `cid` | `int` | 分 P CID(可选) | +| `json_index` | `bool` | json 数组截取时间表 True 为需要,False 不需要 | +| `pvideo` | `bool` | 是否只获取预览 | -**Returns:** dict: 调用 API 返回的结果,数据中 Url 没有 http 头 +**Returns:** `dict`: 调用 API 返回的结果,数据中 Url 没有 http 头 @@ -625,7 +625,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** bool: 视频是否已收藏。 +**Returns:** `bool`: 视频是否已收藏。 @@ -636,7 +636,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** bool: 视频是否点赞过。 +**Returns:** `bool`: 视频是否点赞过。 @@ -648,11 +648,11 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| page_index | int \| None, optional | 分 P 号,从 0 开始。Defaults to None | -| ids | List[int] \| None | 要查询的弹幕 ID 列表。 | -| cid | int \| None, optional | 分 P 的 ID。Defaults to None | +| `page_index` | `int \| None, optional` | 分 P 号,从 0 开始。Defaults to None | +| `ids` | `List[int] \| None` | 要查询的弹幕 ID 列表。 | +| `cid` | `int \| None, optional` | 分 P 的 ID。Defaults to None | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -663,7 +663,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** bool: 是否禁止笔记。 +**Returns:** `bool`: 是否禁止笔记。 @@ -675,9 +675,9 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| status | bool, optional | 点赞状态。Defaults to True. | +| `status` | `bool, optional` | 点赞状态。Defaults to True. | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -689,12 +689,12 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| page_index | int \| None, optional | 分 P 号,从 0 开始。Defaults to None | -| dmid | int \| None | 弹幕 ID。 | -| status | bool \| None, optional | 点赞状态。Defaults to True | -| cid | int \| None, optional | 分 P 的 ID。Defaults to None | +| `page_index` | `int \| None, optional` | 分 P 号,从 0 开始。Defaults to None | +| `dmid` | `int \| None` | 弹幕 ID。 | +| `status` | `bool \| None, optional` | 点赞状态。Defaults to True | +| `cid` | `int \| None, optional` | 分 P 的 ID。Defaults to None | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -706,12 +706,12 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| page_index | int \| None, optional | 分 P 号,从 0 开始。Defaults to None | -| dmids | List[int] \| None | 弹幕 ID 列表。 | -| cid | int \| None, optional | 分 P 的 ID。Defaults to None | -| type_ | DanmakuOperatorType \| None | 操作类型 | +| `page_index` | `int \| None, optional` | 分 P 号,从 0 开始。Defaults to None | +| `dmids` | `List[int] \| None` | 弹幕 ID 列表。 | +| `cid` | `int \| None, optional` | 分 P 的 ID。Defaults to None | +| `type_` | `DanmakuOperatorType \| None` | 操作类型 | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -723,10 +723,10 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| num | int, optional | 硬币数量,为 1 ~ 2 个。Defaults to 1. | -| like | bool, optional | 是否同时点赞。Defaults to False. | +| `num` | `int, optional` | 硬币数量,为 1 ~ 2 个。Defaults to 1. | +| `like` | `bool, optional` | 是否同时点赞。Defaults to False. | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -738,11 +738,11 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| page_index | int \| None, optional | 分 P 号 | -| dmid | int | 弹幕 id | -| cid | int \| None, optional | 分 P 编码 | +| `page_index` | `int \| None, optional` | 分 P 号 | +| `dmid` | `int` | 弹幕 id | +| `cid` | `int \| None, optional` | 分 P 编码 | -**Returns:** 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -754,11 +754,11 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| page_index | int \| None, optional | 分 P 号,从 0 开始。Defaults to None | -| danmaku | Danmaku \| None | Danmaku 类。 | -| cid | int \| None, optional | 分 P 的 ID。Defaults to None | +| `page_index` | `int \| None, optional` | 分 P 号,从 0 开始。Defaults to None | +| `danmaku` | `Danmaku \| None` | Danmaku 类。 | +| `cid` | `int \| None, optional` | 分 P 的 ID。Defaults to None | -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -770,9 +770,8 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| aid | int | AV 号。 | +| `aid` | `int` | AV 号。 | -**Returns:** None @@ -783,9 +782,8 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| bvid | str | 要设置的 bvid。 | +| `bvid` | `str` | 要设置的 bvid。 | -**Returns:** None @@ -796,10 +794,10 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| add_media_ids | List[int], optional | 要添加到的收藏夹 ID. Defaults to []. | -| del_media_ids | List[int], optional | 要移出的收藏夹 ID. Defaults to []. | +| `add_media_ids` | `List[int], optional` | 要添加到的收藏夹 ID. Defaults to []. | +| `del_media_ids` | `List[int], optional` | 要移出的收藏夹 ID. Defaults to []. | -**Returns:** dict: 调用 API 返回结果。 +**Returns:** `dict`: 调用 API 返回结果。 @@ -810,7 +808,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** int: 当前分享数 +**Returns:** `int`: 当前分享数 @@ -842,14 +840,14 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| lan | str | 字幕语言代码,参考 https | -| data | Dict | 字幕数据 | -| submit | bool | 是否提交,不提交为草稿 | -| sign | bool | 是否署名 | -| page_index | int \| None, optional | 分 P 索引. Defaults to None. | -| cid | int \| None, optional | 分 P id. Defaults to None. | +| `lan` | `str` | 字幕语言代码,参考 https | +| `data` | `Dict` | 字幕数据 | +| `submit` | `bool` | 是否提交,不提交为草稿 | +| `sign` | `bool` | 是否署名 | +| `page_index` | `int \| None, optional` | 分 P 索引. Defaults to None. | +| `cid` | `int \| None, optional` | 分 P id. Defaults to None. | -**Returns:** dict: API 调用返回结果 +**Returns:** `dict`: API 调用返回结果 @@ -861,7 +859,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -912,9 +910,8 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| bvid | str | 撞车对象 | +| `bvid` | `str` | 撞车对象 | -**Returns:** None @@ -927,9 +924,8 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| source | str | 原创视频出处 | +| `source` | `str` | 原创视频出处 | -**Returns:** None @@ -971,7 +967,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| data | Dict | `Video.get_download_url` 返回的结果 | +| `data` | `Dict` | `Video.get_download_url` 返回的结果 | ### def check_flv_mp4_stream() @@ -980,7 +976,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** bool: 是否为 FLV / MP4 流 +**Returns:** `bool`: 是否为 FLV / MP4 流 @@ -991,7 +987,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** bool: 是否为 DASH +**Returns:** `bool`: 是否为 DASH @@ -1003,19 +999,19 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| video_max_quality | VideoQuality, optional | 设置提取的视频流清晰度最大值,设置此参数绝对不会禁止 HDR/杜比. Defaults to VideoQuality._8K. | -| audio_max_quality | AudioQuality, optional | 设置提取的音频流清晰度最大值. 设置此参数绝对不会禁止 Hi-Res/杜比. Defaults to AudioQuality._192K. | -| video_min_quality | VideoQuality, optional | 设置提取的视频流清晰度最小值,设置此参数绝对不会禁止 HDR/杜比. Defaults to VideoQuality._360P. | -| audio_min_quality | AudioQuality, optional | 设置提取的音频流清晰度最小值. 设置此参数绝对不会禁止 Hi-Res/杜比. Defaults to AudioQuality._64K. | -| video_accepted_qualities | List[VideoQuality], optional | 设置允许的所有视频流清晰度. Defaults to ALL. | -| audio_accepted_qualities | List[AudioQuality], optional | 设置允许的所有音频清晰度. Defaults to ALL. | -| codecs | List[VideoCodecs], optional | 设置所有允许提取出来的视频编码. 此项不会忽略 HDR/杜比. Defaults to ALL codecs. | -| no_dolby_video | bool, optional | 是否禁止提取杜比视界视频流. Defaults to False. | -| no_dolby_audio | bool, optional | 是否禁止提取杜比全景声音频流. Defaults to False. | -| no_hdr | bool, optional | 是否禁止提取 HDR 视频流. Defaults to False. | -| no_hires | bool, optional | 是否禁止提取 Hi-Res 音频流. Defaults to False. | +| `video_max_quality` | `VideoQuality, optional` | 设置提取的视频流清晰度最大值,设置此参数绝对不会禁止 HDR/杜比. Defaults to VideoQuality._8K. | +| `audio_max_quality` | `AudioQuality, optional` | 设置提取的音频流清晰度最大值. 设置此参数绝对不会禁止 Hi-Res/杜比. Defaults to AudioQuality._192K. | +| `video_min_quality` | `VideoQuality, optional` | 设置提取的视频流清晰度最小值,设置此参数绝对不会禁止 HDR/杜比. Defaults to VideoQuality._360P. | +| `audio_min_quality` | `AudioQuality, optional` | 设置提取的音频流清晰度最小值. 设置此参数绝对不会禁止 Hi-Res/杜比. Defaults to AudioQuality._64K. | +| `video_accepted_qualities` | `List[VideoQuality], optional` | 设置允许的所有视频流清晰度. Defaults to ALL. | +| `audio_accepted_qualities` | `List[AudioQuality], optional` | 设置允许的所有音频清晰度. Defaults to ALL. | +| `codecs` | `List[VideoCodecs], optional` | 设置所有允许提取出来的视频编码. 此项不会忽略 HDR/杜比. Defaults to ALL codecs. | +| `no_dolby_video` | `bool, optional` | 是否禁止提取杜比视界视频流. Defaults to False. | +| `no_dolby_audio` | `bool, optional` | 是否禁止提取杜比全景声音频流. Defaults to False. | +| `no_hdr` | `bool, optional` | 是否禁止提取 HDR 视频流. Defaults to False. | +| `no_hires` | `bool, optional` | 是否禁止提取 Hi-Res 音频流. Defaults to False. | -**Returns:** List[VideoStreamDownloadURL | AudioStreamDownloadURL | FLVStreamDownloadURL | HTML5MP4DownloadURL | EpisodeTryMP4DownloadURL]: 提取出来的视频/音频流 +**Returns:** `List[VideoStreamDownloadURL | AudioStreamDownloadURL | FLVStreamDownloadURL | HTML5MP4DownloadURL | EpisodeTryMP4DownloadURL]`: 提取出来的视频/音频流 **参数仅能在音视频流分离的情况下产生作用,flv / mp4 流下以下参数均没有作用** @@ -1028,7 +1024,7 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 -**Returns:** List[VideoStreamDownloadURL | AudioStreamDownloadURL | FLVStreamDownloadURL | HTML5MP4DownloadURL | EpisodeTryMP4DownloadURL]: 所有的视频/音频流 +**Returns:** `List[VideoStreamDownloadURL | AudioStreamDownloadURL | FLVStreamDownloadURL | HTML5MP4DownloadURL | EpisodeTryMP4DownloadURL]`: 所有的视频/音频流 @@ -1040,19 +1036,19 @@ page_index 和 cid 至少提供其中一个,其中 cid 优先级最高 | name | type | description | | - | - | - | -| video_max_quality | VideoQuality | 设置提取的视频流清晰度最大值,设置此参数绝对不会禁止 HDR/杜比. Defaults to VideoQuality._8K. | -| audio_max_quality | AudioQuality | 设置提取的音频流清晰度最大值. 设置此参数绝对不会禁止 Hi-Res/杜比. Defaults to AudioQuality._192K. | -| video_min_quality | VideoQuality, optional | 设置提取的视频流清晰度最小值,设置此参数绝对不会禁止 HDR/杜比. Defaults to VideoQuality._360P. | -| audio_min_quality | AudioQuality, optional | 设置提取的音频流清晰度最小值. 设置此参数绝对不会禁止 Hi-Res/杜比. Defaults to AudioQuality._64K. | -| video_accepted_qualities | List[VideoQuality], optional | 设置允许的所有视频流清晰度. Defaults to ALL. | -| audio_accepted_qualities | List[AudioQuality], optional | 设置允许的所有音频清晰度. Defaults to ALL. | -| codecs | List[VideoCodecs] | 设置所有允许提取出来的视频编码. 在数组中越靠前的编码选择优先级越高. 此项不会忽略 HDR/杜比. Defaults to [VideoCodecs.AV1, VideoCodecs.AVC, VideoCodecs.HEV]. | -| no_dolby_video | bool | 是否禁止提取杜比视界视频流. Defaults to False. | -| no_dolby_audio | bool | 是否禁止提取杜比全景声音频流. Defaults to False. | -| no_hdr | bool | 是否禁止提取 HDR 视频流. Defaults to False. | -| no_hires | bool | 是否禁止提取 Hi-Res 音频流. Defaults to False. | +| `video_max_quality` | `VideoQuality` | 设置提取的视频流清晰度最大值,设置此参数绝对不会禁止 HDR/杜比. Defaults to VideoQuality._8K. | +| `audio_max_quality` | `AudioQuality` | 设置提取的音频流清晰度最大值. 设置此参数绝对不会禁止 Hi-Res/杜比. Defaults to AudioQuality._192K. | +| `video_min_quality` | `VideoQuality, optional` | 设置提取的视频流清晰度最小值,设置此参数绝对不会禁止 HDR/杜比. Defaults to VideoQuality._360P. | +| `audio_min_quality` | `AudioQuality, optional` | 设置提取的音频流清晰度最小值. 设置此参数绝对不会禁止 Hi-Res/杜比. Defaults to AudioQuality._64K. | +| `video_accepted_qualities` | `List[VideoQuality], optional` | 设置允许的所有视频流清晰度. Defaults to ALL. | +| `audio_accepted_qualities` | `List[AudioQuality], optional` | 设置允许的所有音频清晰度. Defaults to ALL. | +| `codecs` | `List[VideoCodecs]` | 设置所有允许提取出来的视频编码. 在数组中越靠前的编码选择优先级越高. 此项不会忽略 HDR/杜比. Defaults to [VideoCodecs.AV1, VideoCodecs.AVC, VideoCodecs.HEV]. | +| `no_dolby_video` | `bool` | 是否禁止提取杜比视界视频流. Defaults to False. | +| `no_dolby_audio` | `bool` | 是否禁止提取杜比全景声音频流. Defaults to False. | +| `no_hdr` | `bool` | 是否禁止提取 HDR 视频流. Defaults to False. | +| `no_hires` | `bool` | 是否禁止提取 Hi-Res 音频流. Defaults to False. | -**Returns:** List[VideoStreamDownloadURL | AudioStreamDownloadURL | FLVStreamDownloadURL | HTML5MP4DownloadURL | None]: FLV 视频流 / HTML5 MP4 视频流 / 番剧或课程试看 MP4 视频流返回 `[FLVStreamDownloadURL | HTML5MP4StreamDownloadURL | EpisodeTryMP4DownloadURL]`, 否则为 `[VideoStreamDownloadURL, AudioStreamDownloadURL]`, 如果未匹配上任何合适的流则对应的位置位 `None` +**Returns:** `List[VideoStreamDownloadURL | AudioStreamDownloadURL | FLVStreamDownloadURL | HTML5MP4DownloadURL | None]`: FLV 视频流 / HTML5 MP4 视频流 / 番剧或课程试看 MP4 视频流返回 `[FLVStreamDownloadURL | HTML5MP4StreamDownloadURL | EpisodeTryMP4DownloadURL]`, 否则为 `[VideoStreamDownloadURL, AudioStreamDownloadURL]`, 如果未匹配上任何合适的流则对应的位置位 `None` **以上参数仅能在音视频流分离的情况下产生作用,flv / mp4 试看流 / html5 mp4 流下以下参数均没有作用** @@ -1109,11 +1105,11 @@ CONNECTED: 成功连接。 CallbackData: None。 | name | type | description | | - | - | - | -| bvid | str \| None, optional | BVID. Defaults to None. | -| aid | int \| None, optional | AID. Defaults to None. | -| page_index | int, optional | 分 P 序号. Defaults to 0. | -| credential | Credential \| None, optional | Credential 类. Defaults to None. | -| debug | bool, optional | 调试模式,将输出更详细信息. Defaults to False. | +| `bvid` | `str \| None, optional` | BVID. Defaults to None. | +| `aid` | `int \| None, optional` | AID. Defaults to None. | +| `page_index` | `int, optional` | 分 P 序号. Defaults to 0. | +| `credential` | `Credential \| None, optional` | Credential 类. Defaults to None. | +| `debug` | `bool, optional` | 调试模式,将输出更详细信息. Defaults to False. | ### async def connect() @@ -1122,7 +1118,6 @@ CONNECTED: 成功连接。 CallbackData: None。 -**Returns:** None @@ -1132,7 +1127,6 @@ CONNECTED: 成功连接。 CallbackData: None。 -**Returns:** None @@ -1171,9 +1165,9 @@ CONNECTED: 成功连接。 CallbackData: None。 | name | type | description | | - | - | - | -| url | str | 视频流 url | -| video_quality | VideoQuality | 视频流清晰度 | -| video_codecs | VideoCodecs | 视频流编码 | +| `url` | `str` | 视频流 url | +| `video_quality` | `VideoQuality` | 视频流清晰度 | +| `video_codecs` | `VideoCodecs` | 视频流编码 | --- @@ -1184,7 +1178,7 @@ CONNECTED: 成功连接。 CallbackData: None。 -**Returns:** dict: 调用 https://hd.biliplus.com 的 API 返回的结果 +**Returns:** `dict`: 调用 https//hd.biliplus.com 的 API 返回的结果 diff --git a/docs/modules/video_tag.md b/docs/modules/video_tag.md index 688f4af1..200a3511 100644 --- a/docs/modules/video_tag.md +++ b/docs/modules/video_tag.md @@ -35,9 +35,9 @@ from bilibili_api import video_tag | name | type | description | | - | - | - | -| tag_name | str \| None | 标签名. Defaults to None. | -| tag_id | int \| None | 标签 id. Defaults to None. | -| credential | Credential | 凭据类. Defaults to None. | +| `tag_name` | `str \| None` | 标签名. Defaults to None. | +| `tag_id` | `int \| None` | 标签 id. Defaults to None. | +| `credential` | `Credential` | 凭据类. Defaults to None. | ### async def get_similar_tags() @@ -46,7 +46,7 @@ from bilibili_api import video_tag -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -57,7 +57,7 @@ from bilibili_api import video_tag -**Returns:** int: 标签 id +**Returns:** `int`: 标签 id @@ -68,7 +68,7 @@ from bilibili_api import video_tag -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -79,7 +79,7 @@ from bilibili_api import video_tag -**Returns:** str: 标签名 +**Returns:** `str`: 标签名 @@ -90,7 +90,7 @@ from bilibili_api import video_tag -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 @@ -101,7 +101,7 @@ from bilibili_api import video_tag -**Returns:** dict: 调用 API 返回的结果。 +**Returns:** `dict`: 调用 API 返回的结果。 diff --git a/docs/modules/video_uploader.md b/docs/modules/video_uploader.md index 146e313a..930b43c0 100644 --- a/docs/modules/video_uploader.md +++ b/docs/modules/video_uploader.md @@ -65,14 +65,16 @@ bupfetch 模式下 kodo 目前弃用 `{'error': 'no such bucket'}` | name | type | description | | - | - | - | -| bvid | str | 稿件 BVID | -| meta | Dict | 视频信息 | -| cover_path | str | 封面路径. Defaults to None(不更换封面). | -| credential | Credential | 凭据类. Defaults to None. | +| `bvid` | `str` | 稿件 BVID | +| `meta` | `Dict` | 视频信息 | +| `cover_path` | `str` | 封面路径. Defaults to None(不更换封面). | +| `credential` | `Credential` | 凭据类. Defaults to None. | ### def \_\_init\_\_() +meta 参数示例: (保留 video, cover, tid, aid 字段) + ``` json { "title": "str: 标题", @@ -98,11 +100,10 @@ bupfetch 模式下 kodo 目前弃用 `{'error': 'no such bucket'}` | name | type | description | | - | - | - | -| bvid | str | 稿件 BVID | -| meta | Dict | 视频信息 | -| cover | str \| Picture | 封面地址. Defaults to None(不更改封面). | -| credential | Credential \| None | 凭据类. Defaults to None. | -| meta 参数示例: | | (保留 video, cover, tid, aid 字段) | +| `bvid` | `str` | 稿件 BVID | +| `meta` | `Dict` | 视频信息 | +| `cover` | `str \| Picture` | 封面地址. Defaults to None(不更改封面). | +| `credential` | `Credential \| None` | 凭据类. Defaults to None. | ### async def abort() @@ -111,7 +112,6 @@ bupfetch 模式下 kodo 目前弃用 `{'error': 'no such bucket'}` -**Returns:** None @@ -121,7 +121,7 @@ bupfetch 模式下 kodo 目前弃用 `{'error': 'no such bucket'}` -**Returns:** dict: 返回带有 bvid 和 aid 的字典。 +**Returns:** `dict`: 返回带有 bvid 和 aid 的字典。 @@ -168,28 +168,28 @@ bupfetch 模式下 kodo 目前弃用 `{'error': 'no such bucket'}` | name | type | description | | - | - | - | -| tid | int | 分区 id | -| title | str | 视频标题,最多 80 字 | -| desc | str | 视频简介,最多 2000 字 | -| cover | Union[Picture, str] | 封面,可以传入路径 | -| tags | List[str], str | 标签列表,传入 List 或者传入 str 以 "," 为分隔符,至少 1 个 Tag,最多 10 个 | -| topic | Optional[Union[int, Topic]] | 活动主题,应该从 video_uploader.get_available_topics(tid) 获取,可选 | -| mission_id | Optional[int] | 任务 id,与 topic 一同获取传入 | -| original | bool | 是否原创,默认原创 | -| source | Optional[str] | 转载来源,非原创应该提供 | -| recreate | Optional[bool] | 是否允许转载. 可选,默认为不允许二创 | -| no_reprint | Optional[bool] | 未经允许是否禁止转载. 可选,默认为允许转载 | -| open_elec | Optional[bool] | 是否开启充电. 可选,默认为关闭充电 | -| up_selection_reply | Optional[bool] | 是否开启评论精选. 可选,默认为关闭评论精选 | -| up_close_danmu | Optional[bool] | 是否关闭弹幕. 可选,默认为开启弹幕 | -| up_close_reply | Optional[bool] | 是否关闭评论. 可选,默认为开启评论 | -| lossless_music | Optional[bool] | 是否开启无损音乐. 可选,默认为关闭无损音乐 | -| dolby | Optional[bool] | 是否开启杜比音效. 可选,默认为关闭杜比音效 | -| subtitle | Optional[Dict] | 字幕信息,可选 | -| dynamic | Optional[str] | 粉丝动态,可选,最多 233 字 | -| neutral_mark | Optional[str] | 创作者声明,可选 | -| delay_time | Optional[Union[int, datetime]] | 定时发布时间,可选 | -| porder | Optional[VideoPorderMeta] | 商业相关参数,可选 | +| `tid` | `int` | 分区 id | +| `title` | `str` | 视频标题,最多 80 字 | +| `desc` | `str` | 视频简介,最多 2000 字 | +| `cover` | `Union[Picture, str]` | 封面,可以传入路径 | +| `tags` | `List[str], str` | 标签列表,传入 List 或者传入 str 以 "," 为分隔符,至少 1 个 Tag,最多 10 个 | +| `topic` | `Optional[Union[int, Topic]]` | 活动主题,应该从 video_uploader.get_available_topics(tid) 获取,可选 | +| `mission_id` | `Optional[int]` | 任务 id,与 topic 一同获取传入 | +| `original` | `bool` | 是否原创,默认原创 | +| `source` | `Optional[str]` | 转载来源,非原创应该提供 | +| `recreate` | `Optional[bool]` | 是否允许转载. 可选,默认为不允许二创 | +| `no_reprint` | `Optional[bool]` | 未经允许是否禁止转载. 可选,默认为允许转载 | +| `open_elec` | `Optional[bool]` | 是否开启充电. 可选,默认为关闭充电 | +| `up_selection_reply` | `Optional[bool]` | 是否开启评论精选. 可选,默认为关闭评论精选 | +| `up_close_danmu` | `Optional[bool]` | 是否关闭弹幕. 可选,默认为开启弹幕 | +| `up_close_reply` | `Optional[bool]` | 是否关闭评论. 可选,默认为开启评论 | +| `lossless_music` | `Optional[bool]` | 是否开启无损音乐. 可选,默认为关闭无损音乐 | +| `dolby` | `Optional[bool]` | 是否开启杜比音效. 可选,默认为关闭杜比音效 | +| `subtitle` | `Optional[Dict]` | 字幕信息,可选 | +| `dynamic` | `Optional[str]` | 粉丝动态,可选,最多 233 字 | +| `neutral_mark` | `Optional[str]` | 创作者声明,可选 | +| `delay_time` | `Optional[Union[int, datetime]]` | 定时发布时间,可选 | +| `porder` | `Optional[VideoPorderMeta]` | 商业相关参数,可选 | ### async def verify() @@ -202,7 +202,6 @@ bupfetch 模式下 kodo 目前弃用 `{'error': 'no such bucket'}` -**Returns:** None @@ -293,11 +292,11 @@ bupfetch 模式下 kodo 目前弃用 `{'error': 'no such bucket'}` | name | type | description | | - | - | - | -| pages | List[VideoUploaderPage] | 分 P 列表 | -| meta | VideoMeta, Dict | 视频信息 | -| credential | Credential | 凭据 | -| cover_path | str | 封面路径 | -| line | Lines, Optional | 线路. Defaults to None. 不选择则自动测速选择 | +| `pages` | `List[VideoUploaderPage]` | 分 P 列表 | +| `meta` | `VideoMeta, Dict` | 视频信息 | +| `credential` | `Credential` | 凭据 | +| `cover_path` | `str` | 封面路径 | +| `line` | `Lines, Optional` | 线路. Defaults to None. 不选择则自动测速选择 | ### def \_\_init\_\_() @@ -335,11 +334,11 @@ meta 保留字段:videos, cover | name | type | description | | - | - | - | -| pages | List[VideoUploaderPage] | 分 P 列表 | -| meta | VideoMeta, Dict | 视频信息 | -| credential | Credential | 凭据 | -| cover | Union[str, Picture] | 封面路径或者封面对象. Defaults to "",传入 meta 类型为 VideoMeta 时可不传 | -| line: | | (Lines, Optional) | +| `pages` | `List[VideoUploaderPage]` | 分 P 列表 | +| `meta` | `VideoMeta, Dict` | 视频信息 | +| `credential` | `Credential` | 凭据 | +| `cover` | `Union[str, Picture]` | 封面路径或者封面对象. Defaults to "",传入 meta 类型为 VideoMeta 时可不传 | +| `line` | `Lines, Optional` | 线路. Defaults to None. 不选择则自动测速选择 | ### async def abort() @@ -348,7 +347,6 @@ meta 保留字段:videos, cover -**Returns:** None @@ -358,7 +356,7 @@ meta 保留字段:videos, cover -**Returns:** dict: 返回带有 bvid 和 aid 的字典。 +**Returns:** `dict`: 返回带有 bvid 和 aid 的字典。 @@ -409,9 +407,9 @@ Events: | name | type | description | | - | - | - | -| path | str | 视频文件路径 | -| title | str | 视频标题 | -| description | str, optional | 视频简介. Defaults to "". | +| `path` | `str` | 视频文件路径 | +| `title` | `str` | 视频标题 | +| `description` | `str, optional` | 视频简介. Defaults to "". | ### def get_size() @@ -420,7 +418,7 @@ Events: -**Returns:** int: 文件大小 +**Returns:** `int`: 文件大小 @@ -433,7 +431,6 @@ Events: -**Returns:** None @@ -446,10 +443,10 @@ Events: | name | type | description | | - | - | - | -| tid | int, optional | 分区 ID. Defaults to 0. | -| credential | Credential, optional | 凭据. Defaults to None. | +| `tid` | `int, optional` | 分区 ID. Defaults to 0. | +| `credential` | `Credential, optional` | 凭据. Defaults to None. | -**Returns:** dict API 调用返回结果 +**Returns:** `dict`: API 调用返回结果 @@ -462,7 +459,7 @@ Events: -**Returns:** str: 封面 URL +**Returns:** `str`: 封面 URL diff --git a/docs/modules/video_zone.md b/docs/modules/video_zone.md index 545eed01..a0615e0c 100644 --- a/docs/modules/video_zone.md +++ b/docs/modules/video_zone.md @@ -181,9 +181,9 @@ from bilibili_api import video_zone | name | type | description | | - | - | - | -| tid | int | 分区 id | +| `tid` | `int` | 分区 id | -**Returns:** List[dict]: 热门标签 +**Returns:** `List[dict]`: 热门标签 @@ -197,9 +197,9 @@ from bilibili_api import video_zone | name | type | description | | - | - | - | -| name | str | 频道的名称。 | +| `name` | `str` | 频道的名称。 | -**Returns:** Tuple[dict | None, dict | None]: 第一个是主分区,第二个是子分区,没有时返回 None。 +**Returns:** `Tuple[dict | None, dict | None]`: 第一个是主分区,第二个是子分区,没有时返回 None。 @@ -213,9 +213,9 @@ from bilibili_api import video_zone | name | type | description | | - | - | - | -| tid | int | 频道的 tid。 | +| `tid` | `int` | 频道的 tid。 | -**Returns:** `Tuple[dict | None, dict | None]`: 第一个是主分区,第二个是子分区,没有时返回 None。 +**Returns:** `Tuple[dict | None, dict | None]`: 第一个是主分区,第二个是子分区,没有时返回 None。 @@ -228,7 +228,7 @@ from bilibili_api import video_zone -**Returns:** List[dict]: 所有分区的数据 +**Returns:** `List[dict]`: 所有分区的数据 @@ -242,7 +242,7 @@ from bilibili_api import video_zone -**Returns:** dict: 所有分区的数据 +**Returns:** `dict`: 所有分区的数据 @@ -256,11 +256,11 @@ from bilibili_api import video_zone | name | type | description | | - | - | - | -| tid | int | 分区 id | -| page_num | int | 第几页. Defaults to 1. | -| page_size | int | 每页的数据大小. Defaults to 10. | +| `tid` | `int` | 分区 id | +| `page_num` | `int` | 第几页. Defaults to 1. | +| `page_size` | `int` | 每页的数据大小. Defaults to 10. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -274,11 +274,11 @@ from bilibili_api import video_zone | name | type | description | | - | - | - | -| tid | int | 频道的 tid。 | -| day | int, optional | 3 天排行还是 7 天排行。 Defaults to 7. | -| credential | Credential \| None, optional | Credential 类。Defaults to None. | +| `tid` | `int` | 频道的 tid。 | +| `day` | `int, optional` | 3 天排行还是 7 天排行。 Defaults to 7. | +| `credential` | `Credential \| None, optional` | Credential 类。Defaults to None. | -**Returns:** list: 前 10 的视频信息。 +**Returns:** `list`: 前 10 的视频信息。 @@ -292,9 +292,9 @@ from bilibili_api import video_zone | name | type | description | | - | - | - | -| credential | Credential \| None | 凭据类 | +| `credential` | `Credential \| None` | 凭据类 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 diff --git a/docs/modules/vote.md b/docs/modules/vote.md index 85943162..79ff3d0d 100644 --- a/docs/modules/vote.md +++ b/docs/modules/vote.md @@ -35,8 +35,8 @@ from bilibili_api import vote | name | type | description | | - | - | - | -| vote_id | int | vote_id, 获取:https | -| credential | Credential | 凭据类 | +| `vote_id` | `int` | vote_id, 获取:https | +| `credential` | `Credential` | 凭据类 | ### def \_\_init\_\_() @@ -44,8 +44,8 @@ from bilibili_api import vote | name | type | description | | - | - | - | -| vote_id | int | vote_id, 获取:https | -| credential | Credential | 凭据类,非必要. | +| `vote_id` | `int` | vote_id, 获取:https | +| `credential` | `Credential` | 凭据类,非必要. | ### async def get_info() @@ -54,7 +54,7 @@ from bilibili_api import vote -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -65,7 +65,7 @@ from bilibili_api import vote -**Returns:** str: 投票标题 +**Returns:** `str`: 投票标题 @@ -76,7 +76,7 @@ from bilibili_api import vote -**Returns:** int: 投票 id +**Returns:** `int`: 投票 id @@ -88,16 +88,16 @@ from bilibili_api import vote | name | type | description | | - | - | - | -| vote_id | int | vote_id | -| title | str | 投票标题 | -| _type | VoteType | 投票类型 | -| choice_cnt | int | 最多几项 | -| duration | int | 投票持续秒数 常用 | -| choices | VoteChoices | 投票选项 | -| credential | Credential | Credential 枚举类 | -| desc | Optional[str], optional | 投票描述. Defaults to None. | +| `vote_id` | `int` | vote_id | +| `title` | `str` | 投票标题 | +| `_type` | `VoteType` | 投票类型 | +| `choice_cnt` | `int` | 最多几项 | +| `duration` | `int` | 投票持续秒数 常用 | +| `choices` | `VoteChoices` | 投票选项 | +| `credential` | `Credential` | Credential 枚举类 | +| `desc` | `Optional[str], optional` | 投票描述. Defaults to None. | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -124,10 +124,9 @@ from bilibili_api import vote | name | type | description | | - | - | - | -| desc | str | 选项描述 | -| image | str, Picture, optional | 选项的图片链接,用于图片投票。支持 Picture 类. Defaults to None. | +| `desc` | `str` | 选项描述 | +| `image` | `str, Picture, optional` | 选项的图片链接,用于图片投票。支持 Picture 类. Defaults to None. | -**Returns:** None @@ -137,7 +136,7 @@ from bilibili_api import vote -**Returns:** dict: choices +**Returns:** `dict`: choices @@ -149,9 +148,8 @@ from bilibili_api import vote | name | type | description | | - | - | - | -| index | int | 选项索引 | +| `index` | `int` | 选项索引 | -**Returns:** None @@ -178,15 +176,15 @@ from bilibili_api import vote | name | type | description | | - | - | - | -| title | str | 投票标题 | -| _type | VoteType | 投票类型 | -| choice_cnt | int | 最多几项 | -| duration | int | 投票持续秒数 常用 | -| choices | VoteChoices | 投票选项 | -| credential | Credential | Credential | -| desc | Optional[str], optional | 投票描述. Defaults to None. | - -**Returns:** Vote: Vote 类 +| `title` | `str` | 投票标题 | +| `_type` | `VoteType` | 投票类型 | +| `choice_cnt` | `int` | 最多几项 | +| `duration` | `int` | 投票持续秒数 常用 | +| `choices` | `VoteChoices` | 投票选项 | +| `credential` | `Credential` | Credential | +| `desc` | `Optional[str], optional` | 投票描述. Defaults to None. | + +**Returns:** `Vote`: Vote 类 diff --git a/docs/modules/watchroom.md b/docs/modules/watchroom.md index 0f791490..c62e727a 100644 --- a/docs/modules/watchroom.md +++ b/docs/modules/watchroom.md @@ -60,8 +60,8 @@ from bilibili_api import watchroom | name | type | description | | - | - | - | -| msg | str | 信息 | -| is_emoji | bool | 是否为表情包 | +| `msg` | `str` | 信息 | +| `is_emoji` | `bool` | 是否为表情包 | ### def \_\_init\_\_() @@ -116,8 +116,8 @@ from bilibili_api import watchroom | name | type | description | | - | - | - | -| credential | Credential | 凭据类 (大部分用户操作都需要与之匹配的 buvid3 值,务必在 credential 传入) | -| room_id | int | 放映室 id | +| `credential` | `Credential` | 凭据类 (大部分用户操作都需要与之匹配的 buvid3 值,务必在 credential 传入) | +| `room_id` | `int` | 放映室 id | ### async def close() @@ -126,7 +126,6 @@ from bilibili_api import watchroom -**Returns:** None @@ -136,7 +135,7 @@ from bilibili_api import watchroom -**Returns:** int: 番剧剧集 id +**Returns:** `int`: 番剧剧集 id @@ -147,7 +146,7 @@ from bilibili_api import watchroom -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -158,7 +157,7 @@ from bilibili_api import watchroom -**Returns:** int: 放映室 id +**Returns:** `int`: 放映室 id @@ -169,7 +168,7 @@ from bilibili_api import watchroom -**Returns:** int: 番剧季度 id +**Returns:** `int`: 番剧季度 id @@ -181,9 +180,9 @@ from bilibili_api import watchroom | name | type | description | | - | - | - | -| token | str, Optional | 邀请 Token | +| `token` | `str, Optional` | 邀请 Token | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -195,9 +194,9 @@ from bilibili_api import watchroom | name | type | description | | - | - | - | -| uid | int | 用户 uid | +| `uid` | `int` | 用户 uid | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -208,7 +207,6 @@ from bilibili_api import watchroom -**Returns:** None @@ -219,10 +217,9 @@ from bilibili_api import watchroom | name | type | description | | - | - | - | -| progress | int, None | 进度,单位为秒 | -| status | bool, None | 播放状态 1 播放中 0 暂停中 2 已结束 | +| `progress` | `int, None` | 进度,单位为秒 | +| `status` | `bool, None` | 播放状态 1 播放中 0 暂停中 2 已结束 | -**Returns:** None @@ -233,9 +230,9 @@ from bilibili_api import watchroom | name | type | description | | - | - | - | -| msg | Message | 消息 | +| `msg` | `Message` | 消息 | -**Returns:** dict: 调用 API 返回的结果 +**Returns:** `dict`: 调用 API 返回的结果 @@ -247,9 +244,8 @@ from bilibili_api import watchroom | name | type | description | | - | - | - | -| episode_id | int | 番剧剧集 id | +| `episode_id` | `int` | 番剧剧集 id | -**Returns:** None @@ -260,9 +256,8 @@ from bilibili_api import watchroom | name | type | description | | - | - | - | -| season_id | int | 季度 id | +| `season_id` | `int` | 季度 id | -**Returns:** None @@ -272,7 +267,7 @@ from bilibili_api import watchroom -**Returns:** str: 邀请 Token +**Returns:** `str`: 邀请 Token @@ -286,12 +281,12 @@ from bilibili_api import watchroom | name | type | description | | - | - | - | -| season_id | int | 每季度的 ID | -| ep_id | int | 剧集 ID | -| is_open | bool | 是否公开 | -| credential | Credential | 凭据 | +| `season_id` | `int` | 每季度的 ID | +| `ep_id` | `int` | 剧集 ID | +| `is_open` | `bool` | 是否公开 | +| `credential` | `Credential` | 凭据 | -**Returns:** Watchroom:放映室 +**Returns:** `Watchroom`: 放映室 @@ -305,10 +300,10 @@ from bilibili_api import watchroom | name | type | description | | - | - | - | -| season_id | int | 季度 ID | -| season_type | str | 季度类型 | +| `season_id` | `int` | 季度 ID | +| `season_type` | `str` | 季度类型 | -**Returns:** Watchroom:放映室 +**Returns:** `Watchroom`: 放映室 diff --git a/scripts/doc_gen.py b/scripts/doc_gen.py index 709d9b34..4c1dbe9b 100644 --- a/scripts/doc_gen.py +++ b/scripts/doc_gen.py @@ -325,20 +325,27 @@ def parse_docstring(doc: str): .replace("union", "Union") .replace("|", "\|") ) + # print(line) + # assert argtype != "" table.append((argname, argtype, arginfo)) elif state == 2: ret += line + "\n" state = 3 else: note += line + "\n" - if ret.replace(" ", "").replace("\n", "") == "": - ret = "None\n" - ret = "**Returns:** " + ret + if ret.replace(" ", "").replace("\n", "") != "": + rettype = ret.split(":")[0] + retdesc = "".join(ret.split(":")[1:]) + # print(ret.split(":")) + # assert retdesc != "" + ret = f"**Returns:** `{rettype}`: {retdesc}" + else: + ret = "" mdstring = f"{info}\n" if table != []: mdstring += "| name | type | description |\n| - | - | - |\n" for arg in table: - mdstring += f"| {arg[0]} | {arg[1]} | {arg[2]} |\n" + mdstring += f"| `{arg[0]}` | `{arg[1]}` | {arg[2]} |\n" mdstring += f"\n{ret}\n{note}\n\n" return mdstring @@ -379,12 +386,14 @@ def parse_docstring1(doc: str): .replace("union", "Union") .replace("|", "\|") ) + # print(line) + # assert argtype != "" table.append((argname, argtype, arginfo)) mdstring = f"{info}\n" if table != []: mdstring += "| name | type | description |\n| - | - | - |\n" for arg in table: - mdstring += f"| {arg[0]} | {arg[1]} | {arg[2]} |\n" + mdstring += f"| `{arg[0]}` | `{arg[1]}` | {arg[2]} |\n" mdstring += f"\n\n" return mdstring