mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-08-12 17:10:37 +00:00
feat(artist): 添加关注歌手新作品(歌曲/MV)接口
- 新增 module/artist_new_song_mv_list_v2.js 模块实现接口逻辑 - 在文档中添加接口说明、参数详情和调用示例 - 在 TypeScript 定义文件中添加对应的接口类型声明 - 支持分页获取关注歌手的新歌曲和 MV 列表 - 实现时间游标和翻页功能支持 - 提供多种可选参数配置选项
This commit is contained in:
parent
1491b91829
commit
bf12abe2f1
10
interface.d.ts
vendored
10
interface.d.ts
vendored
@ -1478,6 +1478,16 @@ export function artist_new_song_playall(
|
|||||||
params: RequestBaseConfig,
|
params: RequestBaseConfig,
|
||||||
): Promise<Response>
|
): Promise<Response>
|
||||||
|
|
||||||
|
export function artist_new_song_mv_list_v2(
|
||||||
|
params: {
|
||||||
|
startTimestamp?: number | string
|
||||||
|
before?: number | string
|
||||||
|
sourceType?: number | string
|
||||||
|
limit?: number | string
|
||||||
|
firstRequest?: boolean | string
|
||||||
|
} & RequestBaseConfig,
|
||||||
|
): Promise<Response>
|
||||||
|
|
||||||
export function artist_detail(
|
export function artist_detail(
|
||||||
params: {
|
params: {
|
||||||
id: number | string
|
id: number | string
|
||||||
|
|||||||
16
module/artist_new_song_mv_list_v2.js
Normal file
16
module/artist_new_song_mv_list_v2.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// 获取关注歌手的新歌曲和 MV
|
||||||
|
|
||||||
|
const createOption = require('../util/option.js')
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {
|
||||||
|
startTimestamp: query.startTimestamp || query.before || Date.now(),
|
||||||
|
sourceType: query.sourceType || 1,
|
||||||
|
limit: query.limit || 10,
|
||||||
|
firstRequest: query.firstRequest ?? true,
|
||||||
|
}
|
||||||
|
return request(
|
||||||
|
`/api/sub/artist/new/works/song-mv/list/v2`,
|
||||||
|
data,
|
||||||
|
createOption(query, 'eapi'),
|
||||||
|
)
|
||||||
|
}
|
||||||
@ -3620,6 +3620,24 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`
|
|||||||
|
|
||||||
**调用例子 :** `/artist/new/song/playall`
|
**调用例子 :** `/artist/new/song/playall`
|
||||||
|
|
||||||
|
### 关注歌手新作品(歌曲/MV)
|
||||||
|
|
||||||
|
说明 : 登录后调用此接口可分页获取关注歌手的新歌曲和 MV
|
||||||
|
|
||||||
|
**可选参数 :** `limit`: 返回数量,默认为 10
|
||||||
|
|
||||||
|
`startTimestamp`: 时间游标,首次请求默认为当前时间,后续请求传入上一页返回的时间游标
|
||||||
|
|
||||||
|
`before`: `startTimestamp` 的别名
|
||||||
|
|
||||||
|
`sourceType`: 作品来源类型,默认为 1
|
||||||
|
|
||||||
|
`firstRequest`: 是否首次请求,默认为 `true`,翻页时传 `false`
|
||||||
|
|
||||||
|
**接口地址 :** `/artist/new/song/mv/list/v2`
|
||||||
|
|
||||||
|
**调用例子 :** `/artist/new/song/mv/list/v2` `/artist/new/song/mv/list/v2?startTimestamp=1783680576099&sourceType=1&limit=10&firstRequest=false`
|
||||||
|
|
||||||
### 关注歌手新 MV
|
### 关注歌手新 MV
|
||||||
|
|
||||||
说明 :登录后调用此接口可获取关注歌手新 MV
|
说明 :登录后调用此接口可获取关注歌手新 MV
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user