Skip to content

Commit

Permalink
📝 Update the dev guide
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Aug 28, 2024
1 parent 6fb6930 commit 79b3e17
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
28 changes: 10 additions & 18 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* [Move documents](#Move-documents)
* [Get human-readable path based on path](#Get-human-readable-path-based-on-path)
* [Get human-readable path based on ID](#Get-human-readable-path-based-on-ID)
* [Get storage path based on ID](#Get-storage-path-based-on-ID)
* [Get IDs based on human-readable path](#Get-IDs-based-on-human-readable-path)
* [Assets](#Assets)
* [Upload assets](#Upload-assets)
* [Blocks](#Blocks)
Expand Down Expand Up @@ -70,8 +72,7 @@

* Endpoint: `http://127.0.0.1:6806`
* Both are POST methods
* An interface with parameters is required, the parameter is a JSON string, placed in the body, and the header
Content-Type is `application/json`
* An interface with parameters is required, the parameter is a JSON string, placed in the body, and the header Content-Type is `application/json`
* Return value

````json
Expand Down Expand Up @@ -326,8 +327,7 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
```

* `notebook`: Notebook ID
* `path`: Document path, which needs to start with / and separate levels with / (path here corresponds to the
database hpath field)
* `path`: Document path, which needs to start with / and separate levels with / (path here corresponds to the database hpath field)
* `markdown`: GFM Markdown content
* Return value

Expand Down Expand Up @@ -522,9 +522,7 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
* `"/assets/"`: workspace/data/assets/ folder
* `"/assets/sub/"`: workspace/data/assets/sub/ folder

Under normal circumstances, it is recommended to use the first method, which is stored in the assets folder
of the workspace, putting in a subdirectory has some side effects, please refer to the assets chapter of the user
guide.
Under normal circumstances, it is recommended to use the first method, which is stored in the assets folder of the workspace, putting in a subdirectory has some side effects, please refer to the assets chapter of the user guide.
* `file[]`: Uploaded file list
* Return value

Expand All @@ -542,9 +540,7 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
```

* `errFiles`: List of filenames with errors in upload processing
* `succMap`: For successfully processed files, the key is the file name when uploading, and the value is
assets/foo-id.png, which is used to replace the asset link address in the existing Markdown content with the
uploaded address
* `succMap`: For successfully processed files, the key is the file name when uploading, and the value is assets/foo-id.png, which is used to replace the asset link address in the existing Markdown content with the uploaded address

## Blocks

Expand All @@ -569,8 +565,7 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
* `previousID`: The ID of the previous block, used to anchor the insertion position
* `parentID`: The ID of the parent block, used to anchor the insertion position

`nextID`, `previousID`, and `parentID` must have at least one value, using
priority: `nextID` > `previousID` > `parentID`
`nextID`, `previousID`, and `parentID` must have at least one value, using priority: `nextID` > `previousID` > `parentID`
* Return value

```json
Expand Down Expand Up @@ -777,8 +772,7 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T

* `id`: Block ID to move
* `previousID`: The ID of the previous block, used to anchor the insertion position
* `parentID`: The ID of the parent block, used to anchor the insertion position, `previousID` and `parentID` cannot
be empty at the same time, if they exist at the same time, `previousID` will be used first
* `parentID`: The ID of the parent block, used to anchor the insertion position, `previousID` and `parentID` cannot be empty at the same time, if they exist at the same time, `previousID` will be used first
* Return value

```json
Expand Down Expand Up @@ -1324,8 +1318,7 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
"timeout": 7000
}
```
* `timeout`: The duration of the message display in milliseconds. This field can be omitted, the default is 7000
milliseconds
* `timeout`: The duration of the message display in milliseconds. This field can be omitted, the default is 7000 milliseconds
* Return value

```json
Expand All @@ -1350,8 +1343,7 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
"timeout": 7000
}
```
* `timeout`: The duration of the message display in milliseconds. This field can be omitted, the default is 7000
milliseconds
* `timeout`: The duration of the message display in milliseconds. This field can be omitted, the default is 7000 milliseconds
* Return value

```json
Expand Down
1 change: 1 addition & 0 deletions API_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* [移动文档](#移动文档)
* [根据路径获取人类可读路径](#根据路径获取人类可读路径)
* [根据 ID 获取人类可读路径](#根据-ID-获取人类可读路径)
* [根据 ID 获取存储路径](#根据-ID-获取存储路径)
* [根据人类可读路径获取 IDs](#根据人类可读路径获取-IDs)
* [资源文件](#资源文件)
* [上传资源文件](#上传资源文件)
Expand Down

0 comments on commit 79b3e17

Please sign in to comment.