mirror of
https://github.com/SocialSisterYi/bilibili-API-collect.git
synced 2024-12-29 14:00:09 +08:00
commit
7d4ba0289b
86
live/info.md
86
live/info.md
@ -71,3 +71,89 @@ curl -G 'http://api.live.bilibili.com/room/v1/Room/getRoomInfoOld'\
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## 根据直播间号获取直播间信息
|
||||
|
||||
> https://api.live.bilibili.com/room/v1/Room/room_init
|
||||
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| ------ | ---- | ----------- | ------ | ---- |
|
||||
| id | num | 目标直播间号 | 必要 | |
|
||||
|
||||
**json回复:**
|
||||
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | --------------------------- |
|
||||
| code | num | 返回值 | 0:成功<br />60004:直播间不存在 |
|
||||
| msg | str | 错误信息 | 默认为ok |
|
||||
| message | str | 错误信息 | 默认为ok |
|
||||
| data | obj | 信息本体 | |
|
||||
|
||||
|
||||
`data`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| -------------- | ---- | ------------- | ------------------------ |
|
||||
| room_id | num | 直播间真实ID | |
|
||||
| short_id | num | 直播间URL_ID | |
|
||||
| uid | num | 用户UID | |
|
||||
| need_p2p | num | 未知 | |
|
||||
| is_hidden | boolean | 未知 | |
|
||||
| is_locked | boolean | 未知 | |
|
||||
| is_portrait | boolean | 未知 | |
|
||||
| live_status | num | 直播状态 | 0:未开播<br />1:直播中 |
|
||||
| hidden_till | num | 未知 | |
|
||||
| lock_till | num | 未知 | |
|
||||
| encrypted | boolean | 未知 | |
|
||||
| pwd_verified | boolean | 未知 | |
|
||||
| live_time | num | 开播时长 | |
|
||||
| room_shield | num | 未知 | |
|
||||
| is_sp | num | 未知 | |
|
||||
| special_type | num | 未知 | |
|
||||
|
||||
|
||||
**示例:**
|
||||
|
||||
查询直播间`ID=76`的直播间信息
|
||||
|
||||
```shell
|
||||
curl -G 'http://api.live.bilibili.com/room/v1/Room/room_init'\
|
||||
--data-urlencode 'id=76'
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>查看响应示例:</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"code":0,
|
||||
"msg":"ok",
|
||||
"message":"ok",
|
||||
"data":{
|
||||
"room_id":14073662,
|
||||
"short_id":76,
|
||||
"uid":50333369,
|
||||
"need_p2p":0,
|
||||
"is_hidden":false,
|
||||
"is_locked":false,
|
||||
"is_portrait":false,
|
||||
"live_status":1,
|
||||
"hidden_till":0,
|
||||
"lock_till":0,
|
||||
"encrypted":false,
|
||||
"pwd_verified":false,
|
||||
"live_time":1602151186,
|
||||
"room_shield":1,
|
||||
"is_sp":0,
|
||||
"special_type":0
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
Loading…
Reference in New Issue
Block a user