Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
╰☆╯
NeteaseCloudMusicApi
提交
d4dc1f24
N
NeteaseCloudMusicApi
项目概览
╰☆╯
/
NeteaseCloudMusicApi
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
NeteaseCloudMusicApi
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d4dc1f24
编写于
9月 12, 2020
作者:
B
binaryify
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新文档
上级
fee4eb70
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
51 addition
and
0 deletion
+51
-0
README.MD
README.MD
+33
-0
docs/README.md
docs/README.md
+9
-0
module_example/test.ts
module_example/test.ts
+9
-0
未找到文件。
README.MD
浏览文件 @
d4dc1f24
...
...
@@ -57,6 +57,39 @@ windows 下使用 git-bash 或者 cmder 等终端执行以下命令:
$
set
PORT
=
4000
&&
node app.js
```
## 可以在Node.js调用
v3.31.0后支持Node.js调用,导入的方法为
`module`
内的文件名,返回内容包含
`status`
和
`body`
,
`status`
为状态码,
`body`
为请求返回内容,参考
`module_example`
文件夹下的
`test.js`
```
js
const
{
login_cellphone
,
user_cloud
}
=
require
(
'
NeteaseCloudMusicApi
'
)
async
function
main
()
{
try
{
const
result
=
await
login_cellphone
({
phone
:
'
手机号
'
,
password
:
'
密码
'
})
console
.
log
(
result
)
const
result2
=
await
user_cloud
({
cookie
:
result
.
body
.
cookie
// 凭证
})
console
.
log
(
result2
.
body
)
}
catch
(
error
)
{
console
.
log
(
error
)
}
}
main
()
```
## 支持 TypeScript
```
ts
// test.ts
import
{
banner
}
from
'
NeteaseCloudMusicApi
'
banner
({
type
:
0
}).
then
(
res
=>
{
console
.
log
(
res
)
})
```
## 使用文档
[
文档地址
](
https://binaryify.github.io/NeteaseCloudMusicApi
)
...
...
docs/README.md
浏览文件 @
d4dc1f24
...
...
@@ -258,6 +258,15 @@ async function main() {
main
()
```
## 支持 TypeScript
```
ts
// test.ts
import
{
banner
}
from
'
NeteaseCloudMusicApi
'
banner
({
type
:
0
}).
then
(
res
=>
{
console
.
log
(
res
)
})
```
## 更新到 v3.0 说明
!>2018.10.14 更新到 3.0.0,使用了模块化机制,因为部分接口参数和 url 做了调整,如还不想升级到 3.0.0,请查看
[
v2 的文档
](
http://binaryify.github.io/NeteaseCloudMusicApi/#/v2
)
,
[
更新日志
](
https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/CHANGELOG.MD
)
,
[
2.0+下载地址
](
https://github.com/Binaryify/NeteaseCloudMusicApi/releases/tag/v2.20.5
)
, 同时 2.0+ 将不再维护
...
...
module_example/test.ts
0 → 100644
浏览文件 @
d4dc1f24
import
{
banner
,
lyric
}
from
'
../main
'
banner
({
type
:
0
}).
then
(
res
=>
{
console
.
log
(
res
)
})
lyric
({
id
:
"
33894312
"
}).
then
(
res
=>
{
console
.
log
(
res
)
})
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录