mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
新增精品歌单标签列表接口 #921, 新增用户等级信息接口 #929,增加新接口的 d.ts 文件,修复登录接口的 d.ts 的 countrycode 为非可选属性的错误
This commit is contained in:
parent
cb4c07f421
commit
50a1cb367b
@ -1,4 +1,11 @@
|
|||||||
# 更新日志
|
# 更新日志
|
||||||
|
### 3.41.0 | 2020.09.19
|
||||||
|
- 新增`精品歌单标签列表`接口 [#921](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/921)
|
||||||
|
|
||||||
|
- 新增`用户等级信息`接口 [#929](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/929)
|
||||||
|
|
||||||
|
- 增加新接口的 d.ts 文件,修复登录接口的 d.ts 的 countrycode 为非可选属性的错误
|
||||||
|
|
||||||
### 3.40.1 | 2020.09.13
|
### 3.40.1 | 2020.09.13
|
||||||
- 更新 TypeScript 声明 [#928](https://github.com/Binaryify/NeteaseCloudMusicApi/pull/928)
|
- 更新 TypeScript 声明 [#928](https://github.com/Binaryify/NeteaseCloudMusicApi/pull/928)
|
||||||
|
|
||||||
|
@ -265,6 +265,10 @@ banner({ type:0 }).then(res=>{
|
|||||||
163. 数字专辑详情
|
163. 数字专辑详情
|
||||||
164. 更新头像
|
164. 更新头像
|
||||||
165. 歌单封面上传
|
165. 歌单封面上传
|
||||||
|
166. 歌曲楼层评论
|
||||||
|
167. 歌手全部歌曲
|
||||||
|
168. 精品歌单标签列表
|
||||||
|
169. 用户等级信息
|
||||||
|
|
||||||
|
|
||||||
## 更新日志
|
## 更新日志
|
||||||
|
@ -183,6 +183,8 @@
|
|||||||
165. 歌单封面上传
|
165. 歌单封面上传
|
||||||
166. 歌曲楼层评论
|
166. 歌曲楼层评论
|
||||||
167. 歌手全部歌曲
|
167. 歌手全部歌曲
|
||||||
|
168. 精品歌单标签列表
|
||||||
|
169. 用户等级信息
|
||||||
|
|
||||||
## 安装
|
## 安装
|
||||||
|
|
||||||
@ -516,6 +518,14 @@ v3.30.0后支持手动传入cookie,登录接口返回内容新增 `cookie` 字
|
|||||||
|
|
||||||
**调用例子 :** `/user/subcount`
|
**调用例子 :** `/user/subcount`
|
||||||
|
|
||||||
|
### 获取用户等级信息
|
||||||
|
|
||||||
|
说明 : 登陆后调用此接口 , 可以获取用户等级信息,包含当前登陆天数,听歌次数,下一等级需要的登录天数和听歌次数,当前等级进度,对应 https://music.163.com/#/user/level
|
||||||
|
|
||||||
|
**接口地址 :** `/user/level`
|
||||||
|
|
||||||
|
**调用例子 :** `/user/level`
|
||||||
|
|
||||||
### 更新用户信息
|
### 更新用户信息
|
||||||
|
|
||||||
说明 : 登陆后调用此接口 , 传入相关信息,可以更新用户信息
|
说明 : 登陆后调用此接口 , 传入相关信息,可以更新用户信息
|
||||||
@ -1032,12 +1042,19 @@ tags: 歌单标签
|
|||||||
|
|
||||||
**调用例子 :** `/top/playlist?limit=10&order=new`
|
**调用例子 :** `/top/playlist?limit=10&order=new`
|
||||||
|
|
||||||
|
### 精品歌单标签列表
|
||||||
|
说明 : 调用此接口 , 可获取精品歌单标签列表
|
||||||
|
|
||||||
|
**接口地址 :** `/playlist/highquality/tags`
|
||||||
|
|
||||||
|
**调用例子 :** `/playlist/highquality/tags`
|
||||||
|
|
||||||
### 获取精品歌单
|
### 获取精品歌单
|
||||||
|
|
||||||
说明 : 调用此接口 , 可获取精品歌单
|
说明 : 调用此接口 , 可获取精品歌单
|
||||||
|
|
||||||
**可选参数 :** `cat`: tag, 比如 " 华语 "、" 古风 " 、" 欧美 "、" 流行 ", 默认为
|
**可选参数 :** `cat`: tag, 比如 " 华语 "、" 古风 " 、" 欧美 "、" 流行 ", 默认为
|
||||||
"全部",可从歌单分类接口获取(/playlist/catlist)
|
"全部",可从精品歌单标签列表接口获取(`/playlist/highquality/tags`)
|
||||||
|
|
||||||
`limit`: 取出歌单数量 , 默认为 20
|
`limit`: 取出歌单数量 , 默认为 20
|
||||||
|
|
||||||
@ -1045,7 +1062,7 @@ tags: 歌单标签
|
|||||||
|
|
||||||
**接口地址 :** `/top/playlist/highquality`
|
**接口地址 :** `/top/playlist/highquality`
|
||||||
|
|
||||||
**调用例子 :** `http://localhost:3000/top/playlist/highquality?before=1503639064232&limit=3`
|
**调用例子 :** `/top/playlist/highquality?before=1503639064232&limit=3`
|
||||||
|
|
||||||
### 相关歌单推荐
|
### 相关歌单推荐
|
||||||
|
|
||||||
|
2
interface.d.ts
vendored
2
interface.d.ts
vendored
@ -178,3 +178,5 @@ export * from './module_types/video_timeline_recommend'
|
|||||||
export * from './module_types/video_url'
|
export * from './module_types/video_url'
|
||||||
export * from './module_types/weblog'
|
export * from './module_types/weblog'
|
||||||
export * from './module_types/base'
|
export * from './module_types/base'
|
||||||
|
export * from './module_types/user_level'
|
||||||
|
export * from './module_types/playlist_highquality_tags'
|
||||||
|
8
main.d.ts
vendored
8
main.d.ts
vendored
@ -180,6 +180,8 @@ import {
|
|||||||
VideoUrlRequestConfig,
|
VideoUrlRequestConfig,
|
||||||
WeblogRequestConfig,
|
WeblogRequestConfig,
|
||||||
APIBaseResponse,
|
APIBaseResponse,
|
||||||
|
UserLevelRequestConfig,
|
||||||
|
PlaylistHighqualityTagsRequestConfig
|
||||||
} from './interface'
|
} from './interface'
|
||||||
// Start
|
// Start
|
||||||
// export interface Response<T> {
|
// export interface Response<T> {
|
||||||
@ -484,6 +486,9 @@ interface APIInstance {
|
|||||||
playlist_detail: (
|
playlist_detail: (
|
||||||
params: PlaylistDetailRequestConfig,
|
params: PlaylistDetailRequestConfig,
|
||||||
) => Promise<Response<APIBaseResponse>>
|
) => Promise<Response<APIBaseResponse>>
|
||||||
|
playlist_highquality_tags: (
|
||||||
|
params: PlaylistHighqualityTagsRequestConfig,
|
||||||
|
) => Promise<Response<APIBaseResponse>>
|
||||||
playlist_hot: (
|
playlist_hot: (
|
||||||
params: PlaylistHotRequestConfig,
|
params: PlaylistHotRequestConfig,
|
||||||
) => Promise<Response<APIBaseResponse>>
|
) => Promise<Response<APIBaseResponse>>
|
||||||
@ -620,6 +625,9 @@ interface APIInstance {
|
|||||||
params: UserDetailRequestConfig,
|
params: UserDetailRequestConfig,
|
||||||
) => Promise<Response<APIBaseResponse>>
|
) => Promise<Response<APIBaseResponse>>
|
||||||
user_dj: (params: UserDjRequestConfig) => Promise<Response<APIBaseResponse>>
|
user_dj: (params: UserDjRequestConfig) => Promise<Response<APIBaseResponse>>
|
||||||
|
user_level: (
|
||||||
|
params: UserLevelRequestConfig,
|
||||||
|
) => Promise<Response<APIBaseResponse>>
|
||||||
user_event: (
|
user_event: (
|
||||||
params: UserEventRequestConfig,
|
params: UserEventRequestConfig,
|
||||||
) => Promise<Response<APIBaseResponse>>
|
) => Promise<Response<APIBaseResponse>>
|
||||||
|
@ -6,7 +6,7 @@ module.exports = async (query, request) => {
|
|||||||
query.cookie.os = 'pc'
|
query.cookie.os = 'pc'
|
||||||
const data = {
|
const data = {
|
||||||
phone: query.phone,
|
phone: query.phone,
|
||||||
countrycode: query.countrycode,
|
countrycode: query.countrycode || '86',
|
||||||
password:
|
password:
|
||||||
query.md5_password ||
|
query.md5_password ||
|
||||||
crypto.createHash('md5').update(query.password).digest('hex'),
|
crypto.createHash('md5').update(query.password).digest('hex'),
|
||||||
|
15
module/playlist_highquality_tags.js
Normal file
15
module/playlist_highquality_tags.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// 精品歌单 tags
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {}
|
||||||
|
return request(
|
||||||
|
'POST',
|
||||||
|
`https://music.163.com/api/playlist/highquality/tags`,
|
||||||
|
data,
|
||||||
|
{
|
||||||
|
crypto: 'weapi',
|
||||||
|
cookie: query.cookie,
|
||||||
|
proxy: query.proxy,
|
||||||
|
realIP: query.realIP,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
@ -9,7 +9,7 @@ module.exports = (query, request) => {
|
|||||||
}
|
}
|
||||||
return request(
|
return request(
|
||||||
'POST',
|
'POST',
|
||||||
`https://music.163.com/weapi/playlist/highquality/list`,
|
`https://music.163.com/api/playlist/highquality/list`,
|
||||||
data,
|
data,
|
||||||
{
|
{
|
||||||
crypto: 'weapi',
|
crypto: 'weapi',
|
||||||
|
11
module/user_level.js
Normal file
11
module/user_level.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// 类别热门电台
|
||||||
|
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {}
|
||||||
|
return request('POST', `https://music.163.com/weapi/user/level`, data, {
|
||||||
|
crypto: 'weapi',
|
||||||
|
cookie: query.cookie,
|
||||||
|
proxy: query.proxy,
|
||||||
|
realIP: query.realIP,
|
||||||
|
})
|
||||||
|
}
|
2
module_types/login_cellphone.d.ts
vendored
2
module_types/login_cellphone.d.ts
vendored
@ -2,7 +2,7 @@ import { RequestBaseConfig } from './base'
|
|||||||
|
|
||||||
export interface LoginCellphoneRequestConfig extends RequestBaseConfig {
|
export interface LoginCellphoneRequestConfig extends RequestBaseConfig {
|
||||||
phone: string
|
phone: string
|
||||||
countrycode: string
|
countrycode?: string
|
||||||
password?: string
|
password?: string
|
||||||
md5_password?: string
|
md5_password?: string
|
||||||
}
|
}
|
||||||
|
4
module_types/playlist_highquality_tags.d.ts
vendored
Normal file
4
module_types/playlist_highquality_tags.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
import { RequestBaseConfig } from './base'
|
||||||
|
|
||||||
|
export interface PlaylistHighqualityTagsRequestConfig extends RequestBaseConfig {
|
||||||
|
}
|
3
module_types/user_level.d.ts
vendored
Normal file
3
module_types/user_level.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import { RequestBaseConfig } from './base'
|
||||||
|
|
||||||
|
export type UserLevelRequestConfig = RequestBaseConfig
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "NeteaseCloudMusicApi",
|
"name": "NeteaseCloudMusicApi",
|
||||||
"version": "3.40.1",
|
"version": "3.41.0",
|
||||||
"description": "网易云音乐 NodeJS 版 API",
|
"description": "网易云音乐 NodeJS 版 API",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node app.js",
|
"start": "node app.js",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user