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.
增加歌单(网友精选碟),新碟上架,热门歌手等接口,更新文档,版本更新到2.4.0
- Loading branch information
binaryify
committed
Apr 20, 2017
1 parent
832eade
commit 3ccf8c4
Showing
12 changed files
with
154 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
# 更新日志 | ||
### 2.4.0 | 2017.4.20 | ||
增加歌单(网友精选碟),新碟上架,热门歌手等接口,更新文档 | ||
|
||
### 2.3.4 | 2017.4.20 | ||
增加歌曲详情接口,更新文档 | ||
|
||
|
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
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
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
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,19 @@ | ||
const express = require("express") | ||
const router = express() | ||
const { createRequest } = require("../util/util") | ||
|
||
router.get("/", (req, res) => { | ||
const offset = req.query.offset || 0 | ||
const limit = req.query.limit || 50 | ||
createRequest(`/api/album/new?area=ALL&offset=${offset}&total=true&limit=${limit}`, 'GET', null) | ||
.then(result => { | ||
res.setHeader("Content-Type", "application/json") | ||
res.send(result) | ||
}) | ||
.catch(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
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,19 @@ | ||
const express = require("express") | ||
const router = express() | ||
const { createRequest } = require("../util/util") | ||
|
||
router.get("/", (req, res) => { | ||
const offset = req.query.offset || 0 | ||
const limit = req.query.limit || 50 | ||
createRequest(`/api/artist/top?offset=${offset}&total=false&limit=${limit}`, 'GET', null) | ||
.then(result => { | ||
res.setHeader("Content-Type", "application/json") | ||
res.send(result) | ||
}) | ||
.catch(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,26 @@ | ||
const express = require("express") | ||
const router = express() | ||
const { createWebAPIRequest } = require("../util/util") | ||
|
||
router.get("/", (req, res) => { | ||
const cookie = req.get('Cookie') ? req.get('Cookie') : '' | ||
// order可为 'hot' 可为 'new' | ||
const data = { | ||
cat: req.query.cat || "全部", | ||
order: req.query.order || "hot", | ||
offset: req.query.offset || 0, | ||
total: req.query.offset ? 'true' : 'false', | ||
limit: req.query.limit || 50 | ||
} | ||
createWebAPIRequest( | ||
'music.163.com', | ||
'/api/playlist/list', | ||
'POST', | ||
data, | ||
cookie, | ||
music_req => res.send(music_req), | ||
err => res.status(502).send('fetch error') | ||
) | ||
}) | ||
|
||
module.exports = router |