检测接口
通过文件名、检测文本及认证票据,获取检测结果。
Getting Started
请先安装SDK,然后参考如下代码调用接口:
import io.swagger.client.*;
import io.swagger.client.auth.*;
import cn.com.wanfangdata.check.client.model.*;
import cn.com.wanfangdata.check.client.api.CheckApi;
public class CheckApiExample {
public static void main(String[] args) {
ApiClient apiClient = new ApiClient();
apiClient.setBasePath("https://check.wanfangdata.com.cn/api");
// Configure API key authorization: apiKey
ApiKeyAuth apiKey = (ApiKeyAuth) apiClient.getAuthentication("apiKey");
apiKey.setApiKey("通过认证接口获取的票据");
CheckApi apiInstance = new CheckApi(apiClient);
CheckRequest checkRequest = new CheckRequest(); // CheckRequest | 检测请求
checkRequest.setFileName("fileName"); // String | 文件名
checkRequest.setContent("content"); // String | 检测文本
try {
CheckResponse result = apiInstance.check(checkRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CheckApi#check");
e.printStackTrace();
}
}
}
API Endpoints
All URIs are relative to https://check.wanfangdata.com.cn/api
Class | Method | HTTP request | Description |
---|---|---|---|
CheckApi | check | POST /Check | 检测 |
Models
授权
Authentication schemes defined for the API:
apiKey
- Type: API key
- API key parameter name: token
- Location: HTTP header