Browse Source

修改示例

master
richie 2 years ago
parent
commit
d52ab93234
  1. 37
      README.md

37
README.md

@ -28,7 +28,7 @@ String tableId = operation.createTable("HelloTable");
Authentication authentication = new Authentication("#key", "#secret"); Authentication authentication = new Authentication("#key", "#secret");
DatasourceOperation operation = new DatasourceOperation(authentication); DatasourceOperation operation = new DatasourceOperation(authentication);
// 创建表并返回表id // 创建表并返回表id
String tableId = "tableIdText; String tableId = "上一步获取到表id";
// 获取给该表提供数据的文件的上传地址 // 获取给该表提供数据的文件的上传地址
String fileUploadUrl = operation.requestUploadUrl(tableId); String fileUploadUrl = operation.requestUploadUrl(tableId);
// 将数据文件上传 // 将数据文件上传
@ -37,6 +37,12 @@ HttpKits.upload(fileUploadUrl, new File(System.getProperty("user.dir") + "/data/
operation.markAsFinish(tableId); operation.markAsFinish(tableId);
``` ```
### 删除表(暂未实现)
### 删除所有表(暂未实现)
在调用了上述代码后,就可以在API数据源页面看到新增的表和其数据了,这时就可以和其他数据源表一样,添加到项目中使用了: 在调用了上述代码后,就可以在API数据源页面看到新增的表和其数据了,这时就可以和其他数据源表一样,添加到项目中使用了:
![api_datasource_effect](/screenshots/api_datasource_effect.png) ![api_datasource_effect](/screenshots/api_datasource_effect.png)
@ -126,3 +132,32 @@ operation.markAsFinish(tableId);
请求类型:POST 请求类型:POST
请求参数:``` {"tableId":"#表Id"} ``` 请求参数:``` {"tableId":"#表Id"} ```
#### 删除数据源表(暂未启用)
请求地址:```/api/v1/datasource/table/delete```
请求类型:POST
请求参数: ``` {"tableId":"#表Id"} ```
返回值:
```json
{
"success": true,
"code": "200"
}
```
#### 删除数据源表(暂未启用)
请求地址:```/api/v1/datasource/table/delete/all```
请求类型:POST
返回值:
```json
{
"success": true,
"code": "200"
}
```

Loading…
Cancel
Save