https://github.com/diffbot/enhance-client-java
Java language client to Diffbot Enhance API
https://github.com/diffbot/enhance-client-java
Last synced: 5 months ago
JSON representation
Java language client to Diffbot Enhance API
- Host: GitHub
- URL: https://github.com/diffbot/enhance-client-java
- Owner: diffbot
- License: other
- Created: 2020-02-08T14:00:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-20T21:24:09.000Z (about 4 years ago)
- Last Synced: 2025-07-07T07:47:11.952Z (11 months ago)
- Language: Java
- Size: 146 KB
- Stars: 1
- Watchers: 7
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# enhance-client
Diffbot Enhance Service
- API version: v1.0.0
Enhance is an API to find a person or organization in the Knowledge Graph using partial data
*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*
## Requirements
Building the API client library requires:
1. Java 1.8+
2. Maven/Gradle
## Installation
To install the API client library to your local Maven repository, simply execute:
```shell
mvn clean install
```
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
```shell
mvn clean deploy
```
Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
### Maven users
Add this dependency to your project's POM:
```xml
com.diffbot
enhance-client
1.0.0
compile
```
### Gradle users
Add this dependency to your project's build file:
```groovy
compile "com.diffbot:enhance-client:1.0.0"
```
### Others
At first generate the JAR by executing:
```shell
mvn clean package
```
Then manually install the following JARs:
* `target/enhance-client-1.0.0.jar`
* `target/lib/*.jar`
## Getting Started
Please follow the [installation](#installation) instruction and execute the following Java code:
```java
// Import classes:
import com.diffbot.kg.enhance.openapi.invoker.ApiClient;
import com.diffbot.kg.enhance.openapi.invoker.ApiException;
import com.diffbot.kg.enhance.openapi.invoker.Configuration;
import com.diffbot.kg.enhance.openapi.invoker.models.*;
import com.diffbot.kg.enhance.openapi.api.BulkEnhanceEndpointApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://kg.diffbot.com");
BulkEnhanceEndpointApi apiInstance = new BulkEnhanceEndpointApi(defaultClient);
String bulkjobId = "bulkjobId_example"; // String | Bulkjob Id
String token = "token_example"; // String | Diffbot Token
try {
BulkjobStatusResponse result = apiInstance.bulkjobStatus(bulkjobId)
.token(token)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BulkEnhanceEndpointApi#bulkjobStatus");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
## Documentation for API Endpoints
All URIs are relative to *https://kg.diffbot.com*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BulkEnhanceEndpointApi* | [**bulkjobStatus**](docs/BulkEnhanceEndpointApi.md#bulkjobStatus) | **GET** /kg/enhance_endpoint/bulk/{bulkjobId}/status | Bulk Enhance Status Endpoint
*BulkEnhanceEndpointApi* | [**enhanceBulkjob**](docs/BulkEnhanceEndpointApi.md#enhanceBulkjob) | **POST** /kg/enhance_endpoint/bulk | Bulk Enhance Endpoint
*BulkEnhanceEndpointApi* | [**pollBulkjob**](docs/BulkEnhanceEndpointApi.md#pollBulkjob) | **GET** /kg/enhance_endpoint/bulk/{bulkjobId} | Bulk Enhance Poll Endpoint
*BulkEnhanceEndpointApi* | [**stopBulkjob**](docs/BulkEnhanceEndpointApi.md#stopBulkjob) | **GET** /kg/enhance_endpoint/bulk/{bulkjobId}/stop | Bulkjob stop
*EnhanceLiveEndpointApi* | [**enhance**](docs/EnhanceLiveEndpointApi.md#enhance) | **GET** /kg/enhance_endpoint | Live Enhance Endpoint
## Documentation for Models
- [BulkjobAccepted](docs/BulkjobAccepted.md)
- [BulkjobRecoveryStatusResponse](docs/BulkjobRecoveryStatusResponse.md)
- [BulkjobStatus](docs/BulkjobStatus.md)
- [BulkjobStatusResponse](docs/BulkjobStatusResponse.md)
- [EnhanceResponse](docs/EnhanceResponse.md)
- [RequestError](docs/RequestError.md)
## Documentation for Authorization
All endpoints do not require authorization.
Authentication schemes defined for the API:
## Recommendation
It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
## Author
support@diffbot.com