Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

NeteaseCloudMusicApi

Package Overview
Dependencies
Maintainers
1
Versions
336
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

NeteaseCloudMusicApi - npm Package Compare versions

Comparing version 2.4.6 to 2.5.0

router/artists_desc.js

256

app.js

@@ -5,2 +5,88 @@ const express = require('express')

// 跨域设置
app.all('*', function (req, res, next) {
res.header("Access-Control-Allow-Credentials", true)
res.header("Access-Control-Allow-Origin", "http://localhost:8080")
res.header("Access-Control-Allow-Headers", "X-Requested-With")
res.header("Access-Control-Allow-Methods", "PUT,POST,GET,DELETE,OPTIONS")
res.header("X-Powered-By", ' 3.2.1')
res.header("Content-Type", "application/json;charset=utf-8")
next()
})
// 获取专辑内容
app.use('/album', require('./router/album'))
// 获取歌手单曲
app.use('/artists', require('./router/artists'))
// 获取歌手专辑列表
app.use('/artist/album', require('./router/artist_album'))
//艺术家-信息
app.use("/artist/desc", require("./router/artists_desc"))
//艺术家-mv
app.use("/artist/mv", require("./router/artists_mv"))
// 获取 banner
app.use('/banner', require('./router/banner'))
app.use('/check/music', require('./router/check_music'))
app.use('/comment/music', require('./router/comment_music'))
app.use('/comment/mv', require('./router/comment_mv'))
app.use('/comment/album', require('./router/comment_album'))
app.use('/comment/playlist', require('./router/comment_playlist'))
//未知 api
app.use('/comment/like', require('./router/comment_like'))
app.use('/comment/dj', require('./router/comment_dj'))
//签到
app.use("/daily_signin", require("./router/daily_signin"))
//djradio detail
app.use("/dj/detail", require("./router/dj_detail"))
//dj主播 radio
app.use("/dj/program", require("./router/dj_program"))
app.use("/dj/program/detail", require("./router/dj_program_detail"))
app.use("/dj/sub", require("./router/dj_sub"))
app.use("/dj/catelist", require("./router/dj_catelist"))
app.use("/dj/hot", require("./router/dj_hot"))
// 精选电台
app.use("/dj/recommend", require("./router/dj_recommend"))
//精选电台-分类电台
app.use("/dj/recommend/type", require("./router/dj_recommend_type"))
//垃圾桶
app.use("/fm_trash", require("./router/fm_trash"))
app.use("/follow", require("./router/follow"))
// 喜欢歌曲
app.use("/like", require("./router/like"))
app.use("/likelist", require("./router/likelist"))
//手机登录

@@ -12,80 +98,154 @@ app.use('/login/cellphone', require('./router/loginCellphone'))

//获取评论
app.use('/comment', require('./router/comment'))
//登录刷新
app.use('/login/refresh', require('./router/login_refresh'))
// 不明 api
app.use('/log/web', require('./router/logWeb'))
// 获取歌词
app.use('/lyric', require('./router/lyric'))
// 获取音乐 url
app.use('/music/url', require('./router/musicUrl'))
//最新 mv
app.use("/mv/first", require("./router/mv_first"))
//播放 mv
app.use("/mv/url", require("./router/mv_url"))
//mv
app.use("/mv", require("./router/mv"))
// 私人 FM
app.use("/personal_fm", require("./router/personal_fm"))
//推荐歌单
app.use("/personalized", require("./router/personalized"))
//推荐dj
app.use("/personalized/djprogram", require("./router/personalized_djprogram"))
//推荐新音乐
app.use("/personalized/newsong", require("./router/personalized_newsong"))
//独家放送
app.use("/personalized/privatecontent", require("./router/personalized_privatecontent"))
//推荐mv
app.use("/personalized/mv", require("./router/personalized_mv"))
// 获取歌单内列表
app.use('/playlist/detail', require('./router/playlist_detail'))
//收藏单曲到歌单,从歌单删除歌曲 op=del,add;pid=歌单id,tracks=歌曲id
app.use('/playlist/tracks', require('./router/playlist_tracks'))
app.use('/playlist/hot', require('./router/playlist_hot'))
app.use('/playlist/catlist', require('./router/playlist_catlist'))
//推荐节目
app.use("/program/recommend", require("./router/program_recommend"))
// 获取每日推荐歌曲
app.use('/recommend/songs', require('./router/recommendSongs'))
app.use('/recommend/songs', require('./router/recommend_songs'))
// 获取每日推荐歌单
app.use('/recommend/resource', require('./router/recommendResource'))
app.use('/recommend/resource', require('./router/recommend_resource'))
// 获取歌词
app.use('/lyric', require('./router/lyric'))
//取消推荐
app.use('/recommend/dislike', require('./router/recommend_dislike'))
// 获取专辑内容
app.use('/album', require('./router/album'))
// 获取歌手单曲
app.use('/artists', require('./router/artists'))
app.use('/resource/like', require('./router/resource_like'))
// 搜索
app.use('/search', require('./router/search'))
// 获取歌手专辑列表
app.use('/artist_album', require('./router/artist_album'))
// 搜索 hot
app.use('/search/hot', require('./router/search_hot'))
// 歌单(网友精选碟) hot||new http://music.163.com/#/discover/playlist/
app.use('/top_playlist', require('./router/top_playlist'))
//搜索 multimatch
app.use('/search/multimatch', require('./router/search_multimatch'))
// 搜索 suggest,搜索结果包含单曲,歌手,歌单,mv信息
app.use('/search/suggest', require('./router/search_suggest'))
//simi ,相似歌单
app.use("/simi/playlist", require("./router/simi_playlist"))
//simi ,相似歌曲
app.use("/simi/song", require("./router/simi_song"))
//相似 mv
app.use("/simi/mv", require("./router/simi_mv"))
//simi ,相似关注的用户
app.use("/simi/user", require("./router/simi_user"))
//相似歌手
app.use("/simi/artist", require("./router/simi_artists"))
// 获取音乐详情
app.use('/song/detail', require('./router/song_detail'))
// 新碟上架 http://music.163.com/#/discover/album/
app.use('/new_albums', require('./router/new_albums'))
app.use('/top/album', require('./router/top_album'))
// 热门歌手 http://music.163.com/#/discover/artist/
app.use('/top_artists', require('./router/top_artists'))
app.use('/top/artists', require('./router/top_artists'))
// 获取用户歌单
app.use('/user/playlist', require('./router/userPlaylist'))
app.use('/top/list', require('./router/top_list'))
// 获取歌单内列表
app.use('/playlist/detail', require('./router/playlistDetail'))
app.use('/top/mv', require('./router/top_mv'))
//不明 api
app.use('/playlist/tracks', require('./router/playlistTracks'))
//分类歌单
app.use("/top/playlist", require("./router/top_playlist"))
// 获取音乐 url
app.use('/music/url', require('./router/musicUrl'))
//精品歌单
app.use("/top/playlist/highquality", require("./router/top_playlist_highquality"))
// 搜歌
app.use('/search', require('.//router/search'))
app.use('/top/song', require('./router/top_songs'))
// 获取音乐详情
app.use('/music/songDetail', require('./router/songDetail'))
// 不明 api
app.use('/log/web', require('./router/logWeb'))
// 私人 FM
app.use("/personal_fm",require("./router/personal_fm"))
app.use('/toplist', require('./router/toplist'))
// 喜欢歌曲
app.use("/like",require("./router/like"))
app.use('/toplist/artist', require('./router/toplist_artist'))
//签到
app.use("/daily_signin",require("./router/daily_signin"))
app.use('/toplist/detail', require('./router/toplist_detail'))
//垃圾桶
app.use("/fm_trash",require("./router/fm_trash"))
// 获取用户歌单
app.use('/user/playlist', require('./router/user_playlist'))
//排行榜
app.use("/top_list",require("./router/top_list"))
// 获取用户电台
app.use('/user/audio', require('./router/user_audio'))
//mv
app.use("/mv",require("./router/mv"))
//云盘数据
app.use("/user/cloud", require("./router/user_cloud"))
//play_mv
app.use("/play_mv",require("./router/play_mv"))
//云盘数据详情???不要使用
app.use("/user/cloud/search", require("./router/user_cloud_search"))
//用户动态
app.use("/user/event", require("./router/user_event"))
// 获取用户歌单
app.use('/user/detail', require('./router/user_detail'))
process.on('SIGHUP', () => {
console.log('server: bye bye')
process.exit()
})
app.use('/user/dj', require('./router/user_dj'))
app.use('/user/followeds', require('./router/user_followeds'))
app.use('/user/follows', require('./router/user_follows'))
app.use('/user/subcount', require('./router/user_subcount'))
app.use("/user/record", require("./router/user_playrecord"))
const port = process.env.PORT || 3000

@@ -92,0 +252,0 @@

# 更新日志
### 2.5.0 | 2017.4.29
增加 mv/专辑/歌单评论接口,增加云盘相关接口,增加获取用户动态/信息接口,增加关注/粉丝列表接口,增加收藏歌单接口,增加相似 mv/歌曲/用户接口,增加 banner 接口,增加刷新登录接口,增加电台相关接口,补充评论接口,更新文档
### 2.4.6 | 2017.4.21

@@ -3,0 +6,0 @@ 增加播放 mv 接口,更新文档

2

package.json
{
"name": "NeteaseCloudMusicApi",
"version": "2.4.6",
"version": "2.5.0",
"description": "网易云音乐 NodeJS 版 API",

@@ -5,0 +5,0 @@ "scripts": {

@@ -17,2 +17,5 @@ # 网易云音乐 API

## 版本新特性
### 2.5.0 | 2017.4.29
增加 mv/专辑/歌单评论接口,增加云盘相关接口,增加获取用户动态/信息接口,增加关注/粉丝列表接口,增加收藏歌单接口,增加相似 mv/歌曲/用户接口,增加 banner 接口,增加刷新登录接口,增加电台相关接口,补充评论接口,更新文档
### 2.4.6 | 2017.4.21

@@ -19,0 +22,0 @@ 增加播放 mv 接口,更新文档

const express = require("express")
const router = express()
const { createRequest } = require("../util/util")
const { createWebAPIRequest } = require("../util/util")
router.get("/", (req, res) => {
const cookie = req.get('Cookie') ? req.get('Cookie') : ''
const data = {
"csrf_token": ""
}
const id = req.query.id
createRequest(`/api/album/${id}`, 'GET', null)
.then(result => {
res.setHeader("Content-Type", "application/json")
res.send(result)
})
.catch(err => {
res.status(502).send('fetch error')
})
createWebAPIRequest(
'music.163.com',
`/weapi/v1/album/${id}`,
'POST',
data,
cookie,
music_req => {
res.send(music_req)
},
err => res.status(502).send('fetch error')
)
})
module.exports = router
const express = require("express")
const router = express()
const { createRequest } = require("../util/util")
const { createWebAPIRequest } = require("../util/util")
router.get("/", (req, res) => {
const cookie = req.get('Cookie') ? req.get('Cookie') : ''
const id = req.query.id
const offset = req.query.offset || 0
const limit = req.query.limit || 50
createRequest(`/api/artist/albums/${id}?offset=${offset}&limit=${limit}`, 'GET', null)
.then(result => {
res.setHeader("Content-Type", "application/json")
res.send(result)
})
.catch(err => {
res.status(502).send('fetch error')
})
const data = {
'offset': req.query.offset || 0,
'total': true,
'limit': req.query.limit || 30,
"csrf_token": ""
}
createWebAPIRequest(
'music.163.com',
`/weapi/artist/albums/${id}`,
'POST',
data,
cookie,
music_req => res.send(music_req),
err => res.status(502).send('fetch error')
)
})

@@ -18,0 +24,0 @@

@@ -9,3 +9,3 @@ const express = require("express")

const limit = req.query.limit || 50
createRequest(`/api/artist/${id}?offset=${offset}&limit=${limit}`, 'GET', null)
createRequest(`/weapi/v1/artist/${id}?offset=${offset}&limit=${limit}`, 'GET', null)
.then(result => {

@@ -12,0 +12,0 @@ res.setHeader("Content-Type", "application/json")

@@ -0,1 +1,2 @@

// 签到
const express = require("express")

@@ -15,3 +16,3 @@ const router = express()

let type = req.query.type || 0 //0为安卓端签到 3点经验,1为网页签到,2点经验
const action = `http://music.163.com/weapi/point/dailyTask?type=${type}`
const action = `/weapi/point/dailyTask?type=${type}`
createWebAPIRequest(

@@ -18,0 +19,0 @@ 'music.163.com',

@@ -15,3 +15,3 @@ const express = require("express")

'music.163.com',
`/api/radio/trash/add?alg=${alg}&songId=${songid}&time=${time}`,
`/weapi/radio/trash/add?alg=${alg}&songId=${songid}&time=${time}`,
'POST',

@@ -18,0 +18,0 @@ data,

@@ -12,7 +12,8 @@ const express = require("express")

const like = req.query.like || true
const alg = "itembased"
const alg = req.query.alg || "itembased"
const time = req.query.time || 25
console.log(alg)
createWebAPIRequest(
'music.163.com',
`/api/radio/like?alg=${alg}&trackId=${trackId}&like=${like}&time=${time}`,
`/weapi/radio/like?alg=${alg}&trackId=${trackId}&like=${like}&time=${time}`,
'POST',

@@ -19,0 +20,0 @@ data,

@@ -8,4 +8,2 @@ const express = require("express")

const data = {
"action": req.query.action,
"json": req.query.json,
"csrf_token": "",

@@ -16,3 +14,3 @@ }

'music.163.com',
'/weapi/log/web',
'/weapi/feedback/weblog',
'POST',

@@ -19,0 +17,0 @@ data,

@@ -6,4 +6,4 @@ const express = require("express")

router.get("/", (req, res) => {
const id = parseInt(req.query.id)
const br = parseInt(req.query.br || 999000)
const id = req.query.id
const br = req.query.br || 999000
const data = {

@@ -10,0 +10,0 @@ "ids": [id],

@@ -13,3 +13,3 @@ const express = require("express")

'music.163.com',
'http://music.163.com/api/radio/get',
'/weapi/v1/radio/get',
'POST',

@@ -16,0 +16,0 @@ data,

@@ -0,1 +1,2 @@

//分类歌单
const express = require("express")

@@ -12,3 +13,3 @@ const router = express()

offset: req.query.offset || 0,
total: req.query.offset ? 'true' : 'false',
total: req.query.total ? 'true' : 'false',
limit: req.query.limit || 50

@@ -18,7 +19,9 @@ }

'music.163.com',
'/api/playlist/list',
'/weapi/playlist/list',
'POST',
data,
cookie,
music_req => res.send(music_req),
music_req => {
res.send(music_req)
},
err => res.status(502).send('fetch error')

@@ -25,0 +28,0 @@ )

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc