223 lines
5.2 KiB
Markdown
223 lines
5.2 KiB
Markdown
# 阅读API
|
||
|
||
## 对于Web的配置
|
||
|
||
您需要先在设置中启用"Web 服务"。
|
||
|
||
## 使用
|
||
|
||
### Web
|
||
|
||
以下说明假设您的操作在本机进行,且开放端口为1234。
|
||
如果您要从远程计算机访问[阅读](),请将`127.0.0.1`替换成手机IP。
|
||
|
||
#### 插入单个书源
|
||
|
||
请求BODY内容为`JSON`字符串,
|
||
格式参考[这个文件](https://github.com/gedoor/legado/blob/master/app/src/main/java/io/legado/app/data/entities/BookSource.kt)
|
||
|
||
```
|
||
URL = http://127.0.0.1:1234/saveSource
|
||
Method = POST
|
||
```
|
||
|
||
#### 插入多个书源or订阅源
|
||
|
||
请求BODY内容为`JSON`字符串,
|
||
格式参考[这个文件](https://github.com/gedoor/legado/blob/master/app/src/main/java/io/legado/app/data/entities/BookSource.kt),**为数组格式**。
|
||
|
||
```
|
||
URL = http://127.0.0.1:1234/saveBookSources
|
||
URL = http://127.0.0.1:1234/saveRssSources
|
||
Method = POST
|
||
```
|
||
|
||
#### 获取书源
|
||
|
||
```
|
||
URL = http://127.0.0.1:1234/getBookSource?url=xxx
|
||
URL = http://127.0.0.1:1234/getRssSource?url=xxx
|
||
Method = GET
|
||
```
|
||
|
||
#### 获取所有书源or订阅源
|
||
|
||
```
|
||
URL = http://127.0.0.1:1234/getBookSources
|
||
URL = http://127.0.0.1:1234/getRssSources
|
||
Method = GET
|
||
```
|
||
|
||
#### 删除多个书源or订阅源
|
||
|
||
请求BODY内容为`JSON`字符串,
|
||
格式参考[这个文件](https://github.com/gedoor/legado/blob/master/app/src/main/java/io/legado/app/data/entities/BookSource.kt),**为数组格式**。
|
||
|
||
```
|
||
URL = http://127.0.0.1:1234/deleteBookSources
|
||
URL = http://127.0.0.1:1234/deleteRssSources
|
||
Method = POST
|
||
```
|
||
|
||
#### 插入书籍
|
||
|
||
请求BODY内容为`JSON`字符串,
|