mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-07-03 06:52:08 +08:00
更新文档,优化接口 #251
This commit is contained in:
parent
5ba31b67ed
commit
3477542818
@ -1,4 +1,7 @@
|
||||
# 更新日志
|
||||
### 2.11.1 | 2018.05.24
|
||||
更新文档,优化`/dj/program`接口
|
||||
|
||||
### 2.11.0 | 2018.05.21
|
||||
增加收藏歌手列表&订阅电台列表
|
||||
|
||||
|
@ -372,7 +372,10 @@ tags:歌单tag
|
||||
|
||||
**必选参数 :** `uid` : 用户 id
|
||||
|
||||
**可选参数 :** `limit` : 返回数量 , 默认为 30 `offset` : 偏移数量,用于分页 , 如
|
||||
**可选参数 :**
|
||||
`limit` : 返回数量 , 默认为 30
|
||||
|
||||
`offset` : 偏移数量,用于分页 , 如
|
||||
: 如 :( 页数 -1)\*30, 其中 30 为 limit 的值 , 默认为 0
|
||||
|
||||
**接口地址 :** `/user/follows`
|
||||
@ -1274,9 +1277,15 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`
|
||||
|
||||
**必选参数 :** `rid`: 电台 的 id
|
||||
|
||||
**可选参数 :**
|
||||
`limit` : 返回数量 , 默认为 30
|
||||
|
||||
`offset` : 偏移数量,用于分页 , 如
|
||||
: 如 :( 页数 -1)\*30, 其中 30 为 limit 的值 , 默认为 0
|
||||
|
||||
**接口地址 :** `/dj/program`
|
||||
|
||||
**调用例子 :** `/dj/program?rid=336355127` ( 对应 ' 代码时间 ' 的节目列表 )
|
||||
**调用例子 :** `/dj/program?rid=336355127&limit=40` ( 对应 ' 代码时间 ' 的节目列表 )
|
||||
|
||||
## 离线访问此文档
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "NeteaseCloudMusicApi",
|
||||
"version": "2.11.0",
|
||||
"version": "2.11.1",
|
||||
"description": "网易云音乐 NodeJS 版 API",
|
||||
"scripts": {
|
||||
"start": "node app.js",
|
||||
|
@ -1,28 +1,28 @@
|
||||
const express = require('express')
|
||||
const router = express()
|
||||
const { createWebAPIRequest } = require('../util/util')
|
||||
const express = require("express");
|
||||
const router = express();
|
||||
const { createWebAPIRequest } = require("../util/util");
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
const rid = req.query.rid
|
||||
const cookie = req.get('Cookie') ? req.get('Cookie') : ''
|
||||
router.get("/", (req, res) => {
|
||||
const rid = req.query.rid;
|
||||
const cookie = req.get("Cookie") ? req.get("Cookie") : "";
|
||||
const data = {
|
||||
asc: req.query.asc,
|
||||
radioId: rid,
|
||||
limit: req.query.limit,
|
||||
offset: req.query.offset,
|
||||
csrf_token: ''
|
||||
}
|
||||
limit: req.query.limit || 30,
|
||||
offset: req.query.offset || 0,
|
||||
csrf_token: ""
|
||||
};
|
||||
createWebAPIRequest(
|
||||
'music.163.com',
|
||||
'/weapi/dj/program/byradio',
|
||||
'POST',
|
||||
"music.163.com",
|
||||
"/weapi/dj/program/byradio",
|
||||
"POST",
|
||||
data,
|
||||
cookie,
|
||||
music_req => {
|
||||
res.send(music_req)
|
||||
res.send(music_req);
|
||||
},
|
||||
err => res.status(502).send('fetch error')
|
||||
)
|
||||
})
|
||||
err => res.status(502).send("fetch error")
|
||||
);
|
||||
});
|
||||
|
||||
module.exports = router
|
||||
module.exports = router;
|
||||
|
Loading…
x
Reference in New Issue
Block a user