Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Super-Linter

# Run this workflow every time a new commit pushed to your repository
on:
push:
branches:
- master

jobs:
master-to-gh-pages:
runs-on: ubuntu-latest

steps:
- name: checkout-master
uses: actions/checkout@v2
with:
ref: master
- name: install-nodejs
uses: actions/setup-node@v2
with:
node-version: '12.16.3'
registry-url: 'https://registry.npmjs.org'

- name: config-gitbook
run: |
npm install
npm run bookinstall
npm run build

- name: push-_book-to-branch-gh-pages
env:
TOKEN: ${{ secrets.TOKEN }}
REF: github.com/${{github.repository}}
MYEMAIL: 329106954@qq.com
MYNAME: ${{github.repository_owner}}
run: |
cd _book
git config --global user.email "${MYEMAIL}"
git config --global user.name "${MYNAME}"
git init
git remote add origin https://${REF}
git add .
git commit -m "Updated By Github Actions With Build ${{github.run_number}} of ${{github.workflow}} For Github Pages"
git branch -M master
git push --force --quiet "https://${TOKEN}@${REF}" master:gh-pages
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_book/
49 changes: 49 additions & 0 deletions HTTP接口.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# HTTP接口

HTTP的域名为 **<http://yuenov.com>**

**国内运营商偶尔会屏蔽80端口所以建议不要使用80端口进行访问**

**目前除了80端口还开放了`15555` `16666` `17777` `18888` `19999`这几个端口,强烈建议使用这几个端口进行访问,访问的格式为*域名+端口+路径*。例如**

<span id="domain">**<http://yuenov.com:15555>/path**

**阅小说图片访问的格式示例**

<span>**<http://pt.yuenov.com:15555>/path**

HTTP接口返回的数据统一的格式为:

``` json
{
"result":{
"code":0,
"msg":"成功"
},
"data":{
}
}
```
返回的字段定义如下:

|名称 | 类型 | 必需 | 说明 |
| ------------ | ------------| ------------ | ------------ |
| `result` | Object | 是 | HTTP返回的数据状态信息<ul><li>`code` : `Integer类型` HTTP返回的数据状态码(非HTTP状态码)</li><li>`msg` : `String类型` HTTP返回的数据状态说明</li></ul> |
| `data` | Object | 是 | HTTP返回的数据|

数据的状态码`code`定义如下

|状态码|说明|
| ------------ | ------------ |
|0|返回数据正确|
|101|新用户创建成功|
|102|未查询到数据|
|203|书源已经失效|
|1001|参数校验出错|
|1002|返回值异常|
|1003|非法请求|
|1005|权限验证异常|
|1007|远程调用服务超时|
|9999|系统出错|

**注:下面接口返回的数据全部在`data`对象内**
Loading