Skip to content

Commit

Permalink
新增公开隐私歌单接口
Browse files Browse the repository at this point in the history
  • Loading branch information
kengwang committed Aug 27, 2021
1 parent d8bdb40 commit 5285637
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3491,7 +3491,6 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`
说明: 可以调用此接口获取歌曲相关视频 (区别于 MV), 有些歌曲没有 MV 但是有用户上传的与此歌曲相关的 Mlog。 此功能仅在 网易云音乐 APP上存在。

请注意:此接口偶尔会在相关视频后返回不相关视频,请合理使用。
<!-- 说点实在的, 某些番剧的 OP/ED 歌曲可以通过此接口获取热心用户上传的视频版 -->

**必选参数 :** `songid` : 歌曲ID

Expand All @@ -3500,6 +3499,14 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`

**接口地址 :** `/mlog/music/rcmd`

### 公开隐私歌单

说明: 可以调用此接口将当前用户的隐私歌单公开。

**必选参数 :** `id` : 歌单ID

**接口地址 :** `/playlist/privacy`

## 离线访问此文档

此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问
Expand Down
20 changes: 20 additions & 0 deletions module/playlist_privacy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// 公开隐私歌单

module.exports = (query, request) => {
const data = {
id: query.id,
privacy: 0,
}
return request(
'POST',
`https://interface.music.163.com/eapi/playlist/update/privacy`,
data,
{
crypto: 'eapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
url: '/api/playlist/update/privacy',
},
)
}

0 comments on commit 5285637

Please sign in to comment.