Skip to content

Commit

Permalink
添加 歌曲详情 - 歌曲成绩单 接口,#28
Browse files Browse the repository at this point in the history
  • Loading branch information
MakcRe committed Jul 22, 2024
1 parent 0ba4e8a commit 4b43ff9
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ $ $Env:HOST=127.0.0.1; npm run dev
112. 听书 - 每周推荐
113. 听书 - 专辑详情
114. 听书 - 专辑音乐列表
115. 歌曲详情 - 歌曲成绩单
116. 歌曲详情 - 歌曲成绩单详情

## License

Expand Down
34 changes: 34 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
112. [`听书 - 每周推荐`](#听书-每周推荐)
113. [`听书 - 专辑详情`](#听书-专辑详情)
114. [`听书 - 专辑音乐列表`](#听书-专辑音乐列表)
115. [`歌曲详情 - 歌曲成绩单`](#歌曲详情-歌曲成绩单)
116. [`歌曲详情 - 歌曲成绩单详情`](#歌曲详情---歌曲成绩单详情)

### 安装

Expand Down Expand Up @@ -249,6 +251,8 @@ $ set HOST=127.0.0.1 && npm run dev

#### 更新记录

24-07-22:添加 `歌曲详情` 接口.

24-07-17: 添加 搜索建议 接口。

24-07-14: 添加 频道、听书等多个接口。
Expand Down Expand Up @@ -2039,6 +2043,36 @@ fields: 支持多个,每个以逗号分隔,支持的值有:mkv,tags,h264,h

**调用例子:** `/longaudio/album/audios?album_id=56655759`

### 歌曲详情 - 歌曲成绩单

说明:调用此接口,可以获取`歌曲详情`里面的`歌曲成绩单`信息

**必选参数:**

`album_audio_id`: 专辑音乐 id (album_audio_id/MixSongID 均可以),

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

**调用例子:** `/song/ranking?album_audio_id=32155307`

### 歌曲详情 - 歌曲成绩单详情

说明:登陆后调用此接口,可以获取更详细的歌曲成绩单信息

**必选参数:**

`album_audio_id`: 专辑音乐 id (album_audio_id/MixSongID 均可以),

**可选参数:**

`page`:页数

`pagesize `: 每页页数, 默认为 30

**接口地址:** `/song/ranking/filter`

**调用例子:** `/song/ranking/filter?album_audio_id=32155307`

## License

[The MIT License (MIT)](https://github.com/MakcRe/KuGouMusicApi/blob/main/LICENSE)
12 changes: 12 additions & 0 deletions module/song_ranking.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// 歌曲成绩单

module.exports = (params, useAxios) => {

return useAxios({
url: '/grow/v1/song_ranking/play_page/ranking_info',
method: 'GET',
params: { album_audio_id: params.album_audio_id },
encryptType: 'android',
cookie: params?.cookie || {},
});
};
12 changes: 12 additions & 0 deletions module/song_ranking_filter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// 歌曲成绩单

module.exports = (params, useAxios) => {

return useAxios({
url: '/grow/v1/song_ranking/unlock/v2/ranking_filter',
method: 'GET',
params: { album_audio_id: params.album_audio_id, page: params.page || 1, pagesize: params.pagesize || 30 },
encryptType: 'android',
cookie: params?.cookie || {},
});
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kugoumusicapi",
"version": "1.3.1",
"version": "1.3.2",
"description": "",
"main": "main.js",
"bin": "./app.js",
Expand Down

0 comments on commit 4b43ff9

Please sign in to comment.