-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
111 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# 示例:获取所有的分区 | ||
|
||
``` python | ||
from bilibili_api import channel | ||
|
||
print(channel.get_channel_list()) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# 示例:查询分区 tid | ||
|
||
``` javascript | ||
const channel = require("bilibili-api-ts/channel"); | ||
|
||
console.log(channel.get_channel_info_by_name({name: "动物圈"})[0].tid) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# 示例:获取搜索结果 | ||
|
||
``` typescript | ||
const search = requier("bilibili-api-ts/search"); | ||
search.search({keyword: "奥利给"}).then(value => console.log(value)); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Module channel.ts(channel.js) | ||
|
||
```typescript | ||
import {} from "bilibili-api-ts/channel"; | ||
``` | ||
|
||
频道相关操作 | ||
|
||
## def get_channel_info_by_tid() | ||
|
||
| name | type | description | | ||
| ---- | ---- | ----------- | | ||
| tid | int | 频道的 tid | | ||
|
||
根据 tid 获取频道信息。 | ||
|
||
**Returns:** `Object[Object, Object]`: 第一个是主分区,第二个是子分区,没有时返回 None。 | ||
|
||
--- | ||
|
||
## def get_channel_info_by_name() | ||
|
||
| name | type | description | | ||
| ---- | ---- | ------------ | | ||
| name | str | 频道的名称。 | | ||
|
||
根据频道名称获取频道信息。 | ||
|
||
**Returns:** `Object[Object, Object]`: 第一个是主分区,第二个是子分区,没有时返回 None。 | ||
|
||
--- | ||
|
||
## async def get_top10() | ||
|
||
| name | type | description | | ||
| ---------- | -------------------- | -------------------------------------- | | ||
| tid | int | 频道的 tid | | ||
| day | int, optional | 3 天排行还是 7 天排行。 Defaults to 7. | | ||
| credential | Credential, optional | Credential 类。Defaults to None. | | ||
|
||
获取分区前十排行榜。 | ||
|
||
**Returns:** `Object`: 调用 API 返回的结果 | ||
|
||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters