File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,6 +177,50 @@ title: API
177177 }}
178178/>
179179
180+ ### スナップショットを生成する
181+
182+ <APITable
183+ request = { {
184+ method: ' GET' ,
185+ url: ' /universer-api/snapshot/{type}/unit/{unitID}/rev/0/ensure' ,
186+ parametersType: ' Query' ,
187+ parameters: [{
188+ name: ' type' ,
189+ type: ' enum(int)' ,
190+ required: true ,
191+ description: ' 1(doc)、2(sheet)' ,
192+ }, {
193+ name: ' unitID' ,
194+ type: ' string' ,
195+ required: true ,
196+ description: ' ドキュメント ID' ,
197+ }],
198+ example: ` curl -X GET 'http://localhost:8000/universer-api/snapshot/2/unit/ETVf-B4lQqOSE_p09mcp9Q/rev/0/ensure' ` ,
199+ }}
200+ response = { {
201+ type: ' application/json' ,
202+ parameters: [{
203+ name: ' error' ,
204+ type: ' object' ,
205+ properties: [{
206+ name: ' code' ,
207+ type: ' enum(int)' ,
208+ description: ' 1(成功)' ,
209+ }, {
210+ name: ' message' ,
211+ type: ' string' ,
212+ description: ' エラーメッセージ' ,
213+ }],
214+ }],
215+ example: JSON .stringify ({
216+ error: {
217+ code: 1 ,
218+ message: ' ' ,
219+ },
220+ }, null , 2 ),
221+ }}
222+ />
223+
180224## ファイルとインポート/エクスポート
181225
182226### ファイルアップロード
Original file line number Diff line number Diff line change @@ -177,6 +177,50 @@ This page lists common Univer Server APIs. The default base URL is `http://local
177177 }}
178178/>
179179
180+ ### Create Snapshot
181+
182+ <APITable
183+ request = { {
184+ method: ' GET' ,
185+ url: ' /universer-api/snapshot/{type}/unit/{unitID}/rev/0/ensure' ,
186+ parametersType: ' Query' ,
187+ parameters: [{
188+ name: ' type' ,
189+ type: ' enum(int)' ,
190+ required: true ,
191+ description: ' 1 (doc), 2 (sheet) for path' ,
192+ }, {
193+ name: ' unitID' ,
194+ type: ' string' ,
195+ required: true ,
196+ description: ' Document id' ,
197+ }],
198+ example: ` curl -X GET 'http://localhost:8000/universer-api/snapshot/2/unit/ETVf-B4lQqOSE_p09mcp9Q/rev/0/ensure' ` ,
199+ }}
200+ response = { {
201+ type: ' application/json' ,
202+ parameters: [{
203+ name: ' error' ,
204+ type: ' object' ,
205+ properties: [{
206+ name: ' code' ,
207+ type: ' enum(int)' ,
208+ description: ' 1 (success)' ,
209+ }, {
210+ name: ' message' ,
211+ type: ' string' ,
212+ description: ' Error message' ,
213+ }],
214+ }],
215+ example: JSON .stringify ({
216+ error: {
217+ code: 1 ,
218+ message: ' ' ,
219+ },
220+ }, null , 2 ),
221+ }}
222+ />
223+
180224## Files and Import/Export
181225
182226### Upload File
Original file line number Diff line number Diff line change @@ -177,6 +177,50 @@ title: API
177177 }}
178178/>
179179
180+ ### 生成快照
181+
182+ <APITable
183+ request = { {
184+ method: ' GET' ,
185+ url: ' /universer-api/snapshot/{type}/unit/{unitID}/rev/0/ensure' ,
186+ parametersType: ' Query' ,
187+ parameters: [{
188+ name: ' type' ,
189+ type: ' enum(int)' ,
190+ required: true ,
191+ description: ' 1(doc),2(sheet)路径参数' ,
192+ }, {
193+ name: ' unitID' ,
194+ type: ' string' ,
195+ required: true ,
196+ description: ' 文档 id' ,
197+ }],
198+ example: ` curl -X GET 'http://localhost:8000/universer-api/snapshot/2/unit/ETVf-B4lQqOSE_p09mcp9Q/rev/0/ensure' ` ,
199+ }}
200+ response = { {
201+ type: ' application/json' ,
202+ parameters: [{
203+ name: ' error' ,
204+ type: ' object' ,
205+ properties: [{
206+ name: ' code' ,
207+ type: ' enum(int)' ,
208+ description: ' 1(成功)' ,
209+ }, {
210+ name: ' message' ,
211+ type: ' string' ,
212+ description: ' 失败信息' ,
213+ }],
214+ }],
215+ example: JSON .stringify ({
216+ error: {
217+ code: 1 ,
218+ message: ' ' ,
219+ },
220+ }, null , 2 ),
221+ }}
222+ />
223+
180224## 文件与导入导出
181225
182226### 上传文件
Original file line number Diff line number Diff line change @@ -177,6 +177,50 @@ title: API
177177 }}
178178/>
179179
180+ ### 生成快照
181+
182+ <APITable
183+ request = { {
184+ method: ' GET' ,
185+ url: ' /universer-api/snapshot/{type}/unit/{unitID}/rev/0/ensure' ,
186+ parametersType: ' Query' ,
187+ parameters: [{
188+ name: ' type' ,
189+ type: ' enum(int)' ,
190+ required: true ,
191+ description: ' 1(doc),2(sheet)路徑參數' ,
192+ }, {
193+ name: ' unitID' ,
194+ type: ' string' ,
195+ required: true ,
196+ description: ' 文檔 id' ,
197+ }],
198+ example: ` curl -X GET 'http://localhost:8000/universer-api/snapshot/2/unit/ETVf-B4lQqOSE_p09mcp9Q/rev/0/ensure' ` ,
199+ }}
200+ response = { {
201+ type: ' application/json' ,
202+ parameters: [{
203+ name: ' error' ,
204+ type: ' object' ,
205+ properties: [{
206+ name: ' code' ,
207+ type: ' enum(int)' ,
208+ description: ' 1(成功)' ,
209+ }, {
210+ name: ' message' ,
211+ type: ' string' ,
212+ description: ' 失敗信息' ,
213+ }],
214+ }],
215+ example: JSON .stringify ({
216+ error: {
217+ code: 1 ,
218+ message: ' ' ,
219+ },
220+ }, null , 2 ),
221+ }}
222+ />
223+
180224## 檔案與匯入匯出
181225
182226### 上傳檔案
Original file line number Diff line number Diff line change 22
33## Project setup
44
5- ```
5+ ``` shell
66pnpm install
77```
88
99### Compiles and hot-reloads for development
1010
11- ```
11+ ``` shell
1212pnpm run serve
1313```
1414
1515### Compiles and minifies for production
1616
17- ```
17+ ``` shell
1818pnpm run build
1919```
2020
You can’t perform that action at this time.
0 commit comments