提交 40fe20db 编写于 作者: B binaryify

增加 proxy 功能,修复 cookie 丢失问题

上级 752d1965
# 更新日志
### 2.8.1 | 2018.01.04
添加了proxy功能
### 2.8.0 | 2018.01.04
用 'request' 重写了请求函数
......
......@@ -6,7 +6,7 @@
<a href="https://www.npmjs.com/package/NeteaseCloudMusicApi"><img src="https://img.shields.io/david/dev/binaryify/NeteaseCloudMusicApi.svg" alt="devDependencies" ></a>
<a href="https://www.npmjs.com/package/NeteaseCloudMusicApi"><img src="https://img.shields.io/david/binaryify/NeteaseCloudMusicApi.svg" alt="devDependencies" ></a>
<a href="https://codeclimate.com/github/Binaryify/NeteaseCloudMusicApi"><img src="https://codeclimate.com/github/Binaryify/NeteaseCloudMusicApi/badges/gpa.svg" /></a>
</p>
</p>
## 灵感来自
[disoul/electron-cloud-music](https://github.com/disoul/electron-cloud-music)
......@@ -18,7 +18,7 @@
## 版本新特性
### ? ? ? | 2018.01.04
### 2.8.1 | 2018.01.04
添加了proxy功能
### 2.8.0 | 2018.01.04
......@@ -28,9 +28,9 @@
优化 CORS 设置
### 2.6.4 | 2017.7.16
添加缓存机制和随机 UA 机制 感谢[@u3u](https://github.com/u3u)
添加缓存机制和随机 UA 机制 感谢[@u3u](https://github.com/u3u)
[issue:77](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/77)
优化请求代码 感谢 [@huhuime](https://github.com/huhuime)
优化请求代码 感谢 [@huhuime](https://github.com/huhuime)
[issue:83](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/83)
### 2.6.2 | 2017.7.16
......@@ -160,22 +160,22 @@
## 环境要求
需要 NodeJS 6.0+ 环境
## 安装
## 安装
``` shell
$ git clone git@github.com:Binaryify/NeteaseCloudMusicApi.git
$ npm install
```
## 运行
``` shell
$ node app.js
$ node app.js
```
服务器启动默认端口为3000,若不想使用3000端口,可使用以下命令:
服务器启动默认端口为3000,若不想使用3000端口,可使用以下命令:
Mac/Linux
```shell
$ PORT=4000 node app.js
```
windows 下使用 git-bash 或者 cmder 等终端执行以下命令:
windows 下使用 git-bash 或者 cmder 等终端执行以下命令:
```shell
$ set PORT=4000 && node app.js
```
......@@ -186,13 +186,13 @@ $ set PORT=4000 && node app.js
![文档](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/docs.png)
## 更新日志
[changelog](https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/CHANGELOG.MD)
[changelog](https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/CHANGELOG.MD)
## 单元测试
``` shell
$ npm test
```
```
![单元测试](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/screenshot1.png)
![单元测试](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/screenshot2.png)
......
......@@ -30,7 +30,7 @@ fetch(url)
## 版本新特性
### ? ? ? | 2018.01.04
### 2.8.1 | 2018.01.04
添加了proxy功能
### 2.8.0 | 2018.01.04
......@@ -353,8 +353,8 @@ $ set PORT=4000 && node app.js
**接口地址:**
`/music/url`
**调用例子:**
`/music/url?id=33894312`
**调用例子:**
`/music/url?id=33894312`
`/music/url?id=405998841,33894312`
返回数据如下图:
......@@ -432,7 +432,7 @@ $ set PORT=4000 && node app.js
`/search/multimatch?keywords=海阔天空`
### 对歌单添加或删除歌曲
说明:调用此接口,可以添加歌曲到歌单或者从歌单删除某首歌曲(需要登录)
说明:调用此接口,可以添加歌曲到歌单或者从歌单删除某首歌曲(需要登录)
**必选参数:**
`op`: 从歌单增加单曲为add,删除为 del
......@@ -455,8 +455,8 @@ $ set PORT=4000 && node app.js
**接口地址:**
`/lyric`
**调用例子:**
`/lyric?id=33894312`
**调用例子:**
`/lyric?id=33894312`
返回数据如下图:
![获取歌词](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/%E6%AD%8C%E8%AF%8D.png)
......
{
"name": "NeteaseCloudMusicApi",
"version": "2.8.0",
"version": "2.8.1",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册