diff --git a/README.md b/README.md index 960e988..8a93ba9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,20 @@ # jsy-api-datasource-demo -API数据源示例 \ No newline at end of file +API数据源示例 + +```java +Authentication authentication = new Authentication("#key", "#secret"); +DatasourceOperation operation = new DatasourceOperation(authentication); +operation.open(); +// 创建一个分组,如果已经存在,则直接跳过 +operation.createGroup("TestGroup"); +// 在分组下创建一个表,返回创建的表的ID,如果表已经存在,则直接返回表ID +String tableId = operation.createTable("HelloTable", "TestGroup"); +// 获取上传文件的url +String fileUploadUrl = operation.requestUploadUrl(tableId); +// 将数据文件上传 +HttpKits.upload(fileUploadUrl, new File(System.getProperty("user.dir") + "/data/地区数据分析.csv")); +// 标记该表的数据已经上传完成 +operation.markAsFinish(tableId); + +``` \ No newline at end of file