Skip to content

Commit

Permalink
chore: add local api
Browse files Browse the repository at this point in the history
  • Loading branch information
hq001 committed Dec 2, 2020
1 parent 9935192 commit 1b9bd84
Show file tree
Hide file tree
Showing 281 changed files with 22,351 additions and 0 deletions.
34 changes: 34 additions & 0 deletions NeteaseCloudMusicApi/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,py}]
charset = utf-8

# 4 space indentation
[*.py]
indent_style = space
indent_size = 4

# Tab indentation (no size specified)
[Makefile]
indent_style = tab

# Indentation override for all JS under lib directory
[*.{js,ts}]
indent_style = space
indent_size = 2

# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml}]
indent_style = space
indent_size = 2
49 changes: 49 additions & 0 deletions NeteaseCloudMusicApi/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['html'],
extends: ['plugin:prettier/recommended'],
env: {
browser: true,
node: true,
},

rules: {
indent: ['error', 2, { SwitchCase: 1 }],
'space-infix-ops': ['error', { int32Hint: false }],
'key-spacing': [
2,
{
beforeColon: false,
afterColon: true,
},
],
'no-octal': 2,
'no-redeclare': 2,
'comma-spacing': 2,
'no-new-object': 2,
'arrow-spacing': 2,
quotes: [
2,
'single',
{
avoidEscape: true,
allowTemplateLiterals: true,
},
],
},
overrides: [
{
files: ['**/*.ts'],
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint',
],
},
],
}
42 changes: 42 additions & 0 deletions NeteaseCloudMusicApi/.github/ISSUE_TEMPLATE/------.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: 创建问题反馈
about: 问题反馈
title: "<不按照模版格式或者删除模版信息将得不到处理,确认看完了调用前须知再发 issues>"
labels: ''
assignees: ''

---

## 环境
- 系统/平台: <你的系统和平台>

- nodejs 版本: <你的 NodeJS 版本号>

- API版本: <运行的云音乐 API 的版本号, 对应 package.json 里面的 version>

## 出现问题
<请清晰描述出现的问题,不要使用xxx不行之类的模糊不清的语句,我没有读心术>

## 重现步骤
<请清晰描述重现步骤,调用的接口链接和参数以及命令行错误信息,最好贴上截图(命令行错误信息和接口返回内容)>

## 期待效果
<请清晰描述现在的效果和期待的效果>



---

>维护项目都是业余时间,精力有限,我只能挑容易解决的issues处理,为了节约双方时间,请尽可能提供足够的有用的信息,给的信息不够我只能根据精力和时间看情况处理,如果模板信息看都不看就删掉,我不会进行任何回复,并且一个月后close掉issue
>先看文档有没有相关说明,调用前须知必看,确认看完了调用前须知再发 issues
>先在 issues 搜一下是否有相似问题,没有再发,否则直接关闭
>不处理别人搭建的线上服务的问题,此项目不提供任何线上服务,请自行搭建
>重现步骤尽量详细,不能含糊不清,包含请求地址和对应参数以及操作过程描述,不是每个人都喜欢猜别人遇到了什么问题和找参数一个个试,也比较浪费时间
>如果不是提建议,提 issues 如果不照着模版来将不会优先处理或放着不管
>460 cheating 的问题把 `utils/request.js` 里面的 `headers['X-Real-IP']` 的注释取消掉就好
11 changes: 11 additions & 0 deletions NeteaseCloudMusicApi/.github/ISSUE_TEMPLATE/----.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: 功能需求
about: 希望添加新接口
title: ''
labels: 功能需求
assignees: ''

---

**功能描述**
- 请清晰描述你所希望添加的功能,最好贴上对应客户端界面的截图
55 changes: 55 additions & 0 deletions NeteaseCloudMusicApi/.github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Node.js CI

on:
pull_request:
branches: [ master ]
push:
branches: [ master ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
name: Install dependencies
- name: Test
env:
NCM_API_TEST_LOGIN_PHONE: ${{ secrets.NCM_API_TEST_LOGIN_PHONE }}
NCM_API_TEST_LOGIN_PASSWORD: ${{ secrets.NCM_API_TEST_LOGIN_PASSWORD }}
run: npm test
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
name: Install dependencies
- name: Lint
run: npm run lint
5 changes: 5 additions & 0 deletions NeteaseCloudMusicApi/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
node_modules
*.log
.idea
.vscode
3 changes: 3 additions & 0 deletions NeteaseCloudMusicApi/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
static
docs
node_modules
5 changes: 5 additions & 0 deletions NeteaseCloudMusicApi/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"trailingComma": "all",
"singleQuote": true
}
4 changes: 4 additions & 0 deletions NeteaseCloudMusicApi/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language: node_js

node_js:
- 12
Loading

0 comments on commit 1b9bd84

Please sign in to comment.