feat: add analysis parameter and upgrade version to 1.0.8
https://central.sonatype.com/artifact/io.github.volcengine/dataopen-sdk-java/overview
<dependency> <groupId>io.github.volcengine</groupId> <artifactId>dataopen-sdk-java</artifactId> <version>1.0.4</version> </dependency>
import com.dataopen.sdk.Client; public class ClientTest { @Test public void requestGetTest() throws IOException { String app_id = ""; String app_secret = ""; Client client = new Client(app_id, app_secret); Map<String, String> headers = new HashMap<>(); Map<String, Object> params = new HashMap<>(); params.put("app", 46); params.put("page_size", 2); params.put("page", 1); Map<String, Object> body = new HashMap<>(); Map<String, Object> res = client.request("/dataopen/open-apis/xxx/openapi/v1/open/flight-list", "GET", headers, params, body); System.out.println("Output requestGetTest: " + res); } }
import com.dataopen.sdk.Client; public class ClientTest { @Test public void requestPostTest() throws IOException { String app_id = ""; String app_secret = ""; Client client = new Client(app_id, app_secret); Map<String, String> headers = new HashMap<>(); Map<String, Object> params = new HashMap<>(); Map<String, Object> body = new HashMap<>(); body.put("uid_list", new String[] { "1111111110000" }); Map<String, Object> res = client.request( "/dataopen/open-apis/xxx/openapi/v1/open/flight/version/6290880/add-test-user", "POST", headers, params, body); // Output results System.out.println("Output requestPostTest: " + res); } }
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
openapi 使用说明
Client参数说明
client.request参数说明
远程maven地址
https://central.sonatype.com/artifact/io.github.volcengine/dataopen-sdk-java/overview
获取与安装
举例
1、Get 方法
2、Post 方法