forked from Binaryify/NeteaseCloudMusicApi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:Binaryify/NeteaseCloudMusicApi
- Loading branch information
Showing
4 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
//分类歌单 | ||
const express = require("express"); | ||
const router = express(); | ||
const { createWebAPIRequest } = require("../util/util"); | ||
|
||
router.get("/", (req, res) => { | ||
const cookie = req.get("Cookie") ? req.get("Cookie") : ""; | ||
|
||
// categoryCode 取值 | ||
|
||
// 入驻歌手 5001 | ||
// 华语男歌手 1001 | ||
// 华语女歌手 1002 | ||
// 华语组合/乐队 1003 | ||
// 欧美男歌手 2001 | ||
// 欧美女歌手 2002 | ||
// 欧美组合/乐队 2003 | ||
// 日本男歌手 6001 | ||
// 日本女歌手 6002 | ||
// 日本组合/乐队 6003 | ||
// 韩国男歌手 7001 | ||
// 韩国女歌手 7002 | ||
// 韩国组合/乐队 7003 | ||
// 其他男歌手 4001 | ||
// 其他女歌手 4002 | ||
// 其他组合/乐队 4003 | ||
|
||
const data = { | ||
categoryCode: req.query.cat || "1001", | ||
offset: req.query.offset || 0, | ||
total: req.query.total ? "true" : "false", | ||
limit: req.query.limit || 50 | ||
}; | ||
createWebAPIRequest( | ||
"music.163.com", | ||
"/weapi/artist/list", | ||
"POST", | ||
data, | ||
cookie, | ||
music_req => { | ||
res.send(music_req); | ||
}, | ||
err => res.status(502).send("fetch error") | ||
); | ||
}); | ||
|
||
module.exports = router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const express = require("express"); | ||
const router = express(); | ||
const { createWebAPIRequest } = require("../util/util"); | ||
|
||
router.get("/", (req, res) => { | ||
const cookie = req.get("Cookie") ? req.get("Cookie") : ""; | ||
const data = { | ||
artistId: `${req.query.id}` | ||
}; | ||
createWebAPIRequest( | ||
"music.163.com", | ||
"/weapi/artist/sub", | ||
"POST", | ||
data, | ||
cookie, | ||
music_req => { | ||
res.send(music_req); | ||
}, | ||
err => res.status(502).send("fetch error") | ||
); | ||
}); | ||
|
||
module.exports = router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const express = require("express"); | ||
const router = express(); | ||
const { createWebAPIRequest } = require("../util/util"); | ||
|
||
router.get("/", (req, res) => { | ||
const cookie = req.get("Cookie") ? req.get("Cookie") : ""; | ||
const data = { | ||
artistId: `${req.query.id}`, | ||
artistIds: `[${req.query.id}]` | ||
}; | ||
createWebAPIRequest( | ||
"music.163.com", | ||
"/weapi/artist/unsub", | ||
"POST", | ||
data, | ||
cookie, | ||
music_req => { | ||
res.send(music_req); | ||
}, | ||
err => res.status(502).send("fetch error") | ||
); | ||
}); | ||
|
||
module.exports = router; |