Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

增加已购单曲接口;mlog相关接口;vip相关接口 #1248

Merged
merged 1 commit into from
May 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,13 @@
206. 云盘歌曲信息匹配纠正
207. 云贝推歌
208. 云贝推歌历史记录
209. 已购单曲
210. 获取mlog播放地址
211. 将mlog id转为视频id
212. vip成长值
213. vip成长值获取记录
214. vip任务
215. 领取vip成长值

## 安装

Expand Down Expand Up @@ -3299,6 +3306,76 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`

**调用例子 :** `/yunbei/rcmd/song/history?size=10`

### 已购单曲
说明 :登录后调用此接口可获取已购买的单曲

**可选参数 :** `limit`: 取出评论数量 , 默认为 20

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

**接口地址 :** `/song/purchased`

**调用例子 :** `/song/purchased?limit=10`

### 获取mlog播放地址

说明 : 调用此接口 , 传入mlog id, 可获取mlog播放地址

**必选参数 :** `id` : mlog id

**可选参数 :** `res`: 分辨率 , 默认为 1080

**接口地址 :** `/mlog/url`

**调用例子 :** `/mlog/url?id=a1qOVPTWKS1ZrK8`

### 将mlog id转为视频id

说明 : 调用此接口 , 传入mlog id, 可获取video id,然后通过`video/url` 获取播放地址

**必选参数 :** `id` : mlog id

**接口地址 :** `/mlog/to/video`

**调用例子 :** `/mlog/to/video?id=a1qOVPTWKS1ZrK8`

### vip成长值

说明 : 登陆后调用此接口 , 可获取当前会员成长值

**接口地址 :** `/vip/growthpoint`

**调用例子 :** `/vip/growthpoint`

### vip成长值获取记录
说明 :登录后调用此接口可获取会员成长值领取记录

**可选参数 :** `limit`: 取出评论数量 , 默认为 20

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

**接口地址 :** `/vip/growthpoint/details`

**调用例子 :** `/vip/growthpoint/details?limit=10`

### vip任务

说明 : 登陆后调用此接口 , 可获取会员任务

**接口地址 :** `/vip/tasks`

**调用例子 :** `/vip/tasks`

### 领取vip成长值

说明 : 登陆后调用此接口 , 可获取会员成长值

**必选参数 :** `id` : 会员任务 id

**接口地址 :** `/vip/growthpoint/get`

**调用例子 :** `/vip/growthpoint/get?id=7043206830_7`


## 离线访问此文档

Expand Down
35 changes: 35 additions & 0 deletions interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1443,3 +1443,38 @@ export function yunbei_rcmd_song_history(
cursor?: number | string
} & RequestBaseConfig,
): Promise<Response>

export function song_purchased(
params: MultiPageConfig & RequestBaseConfig,
): Promise<Response>

export function mlog_url(
params: {
id?: number | string
res?: number | string
} & RequestBaseConfig,
): Promise<Response>

export function mlog_to_video(
params: {
id?: number | string
} & RequestBaseConfig,
): Promise<Response>

export function vip_growthpoint(
params: RequestBaseConfig,
): Promise<Response>

export function vip_growthpoint_details(
params: MultiPageConfig & RequestBaseConfig,
): Promise<Response>

export function vip_tasks(
params: RequestBaseConfig,
): Promise<Response>

export function vip_growthpoint_get(
params: {
id?: number | string
} & RequestBaseConfig,
): Promise<Response>
19 changes: 19 additions & 0 deletions module/mlog_to_video.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// 将mlog id转为video id

module.exports = (query, request) => {
const data = {
mlogId: query.id,
}
return request(
'POST',
`https://music.163.com/weapi/mlog/video/convert/id`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}

21 changes: 21 additions & 0 deletions module/mlog_url.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// mlog链接

module.exports = (query, request) => {
const data = {
id: query.id,
resolution: query.res || 1080,
type: 1,
}
return request(
'POST',
`https://music.163.com/weapi/mlog/detail/v1`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}

20 changes: 20 additions & 0 deletions module/song_purchased.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// 已购单曲

module.exports = (query, request) => {
const data = {
limit: query.limit || 20,
offset: query.offset || 0,
}
return request(
'POST',
`https://music.163.com/weapi/single/mybought/song/list`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}

17 changes: 17 additions & 0 deletions module/vip_growthpoint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 会员成长值

module.exports = (query, request) => {
const data = {}
return request(
'POST',
`https://music.163.com/weapi/vipnewcenter/app/level/growhpoint/basic`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}

20 changes: 20 additions & 0 deletions module/vip_growthpoint_details.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// 会员成长值领取记录

module.exports = (query, request) => {
const data = {
limit: query.limit || 20,
offset: query.offset || 0,
}
return request(
'POST',
`https://music.163.com/weapi/vipnewcenter/app/level/growth/details`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}

19 changes: 19 additions & 0 deletions module/vip_growthpoint_get.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// 领取会员成长值

module.exports = (query, request) => {
const data = {
taskIds: query.id,
}
return request(
'POST',
`https://music.163.com/weapi/vipnewcenter/app/level/task/reward/get`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}

17 changes: 17 additions & 0 deletions module/vip_tasks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 会员任务

module.exports = (query, request) => {
const data = {}
return request(
'POST',
`https://music.163.com/weapi/vipnewcenter/app/level/task/list`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}