Skip to content

Commit

Permalink
Merge pull request Binaryify#1799 from nooblong/master
Browse files Browse the repository at this point in the history
播客声音详情
  • Loading branch information
Binaryify authored Sep 12, 2023
2 parents 957213b + e5db213 commit b21fc11
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
23 changes: 23 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4189,11 +4189,34 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`
**必选参数:**
`voiceListId`: 播客id

返回结果的`displayStatus`参数对应:

```
AUDITING 审核中
ONLY_SELF_SEE 仅自己可见
ONLINE 已发布
```

**可选参数:**
`limit`: 取出歌单数量 , 默认为 200

`offset`: 偏移数量 , 用于分页 , 如 :( 评论页数 -1)\*200, 其中 200 为 limit 的值

### 播客声音详情

说明: 获取播客里的声音详情

**接口地址:** `/voice/detail`

**必选参数:**
`id`: 播客声音id(voiceId)

返回结果的`displayStatus`参数对应:

```
同上
```

### 播客上传声音
说明: 可以上传声音到播客,例子在 `/public/voice_upload.html` 访问地址: <a href="/voice_upload.html" target="_blank">/voice_upload.html</a>

Expand Down
16 changes: 16 additions & 0 deletions module/voice_detail.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = (query, request) => {
const data = {
id: query.id,
}
return request(
'POST',
`https://interface.music.163.com/weapi/voice/workbench/voice/detail`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}
2 changes: 1 addition & 1 deletion public/voice_upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
this.voicelist = res.data.data.list
this.voicelist.map(async i => {
const res2 = await axios({
url: `/voicelist/list?cookie=${this.cookieToken}&voiceListId=${i.voiceListId}&limit=5`,
url: `/voicelist/list?voiceListId=${i.voiceListId}&limit=5`,
})
i.voiceListData = res2.data.data.list
console.log(res2);
Expand Down

0 comments on commit b21fc11

Please sign in to comment.