Package com.mindee.v2.http
Class MindeeHttpApiV2
- java.lang.Object
-
- com.mindee.http.MindeeApiCommon
-
- com.mindee.v2.http.MindeeApiV2
-
- com.mindee.v2.http.MindeeHttpApiV2
-
public final class MindeeHttpApiV2 extends MindeeApiV2
HTTP Client class for the V2 API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMindeeHttpApiV2.MindeeHttpApiV2Builder
-
Constructor Summary
Constructors Constructor Description MindeeHttpApiV2(MindeeSettings mindeeSettings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static MindeeHttpApiV2.MindeeHttpApiV2Builderbuilder()JobResponsereqGetJobById(String jobId)Attempts to poll the queue.<TResponse extends CommonResponse>
TResponsereqGetResultById(Class<TResponse> responseClass, String inferenceId)Retrieves the inference from a 302 redirect.<TResponse extends CommonResponse>
TResponsereqGetResultByUrl(Class<TResponse> responseClass, String inferenceUrl)Retrieves the inference from a given URL.<TSearchResponse extends BaseSearchResponse>
TSearchResponsereqGetSearch(BaseSearchParameters<TSearchResponse> parameters)Retrieves a list of resources with the given criteria.SearchResponsereqGetSearch(ModelSearchParameters parameters)Deprecated.JobResponsereqPostEnqueue(LocalInputSource inputSource, BaseProductParameters parameters)Enqueues a doc with the POST method.JobResponsereqPostEnqueue(URLInputSource inputSource, BaseProductParameters options)Enqueues a doc with the POST method.-
Methods inherited from class com.mindee.v2.http.MindeeApiV2
getParamsProductAttributes, getResponseProductAttributes, makeUnknownError
-
Methods inherited from class com.mindee.http.MindeeApiCommon
getUserAgent, isInvalidStatusCode, readRawResponse
-
-
-
-
Constructor Detail
-
MindeeHttpApiV2
public MindeeHttpApiV2(MindeeSettings mindeeSettings)
-
-
Method Detail
-
reqPostEnqueue
public JobResponse reqPostEnqueue(LocalInputSource inputSource, BaseProductParameters parameters)
Enqueues a doc with the POST method.- Specified by:
reqPostEnqueuein classMindeeApiV2- Parameters:
inputSource- Input source to send.parameters- Options to send the file along with.- Returns:
- A job response.
-
reqPostEnqueue
public JobResponse reqPostEnqueue(URLInputSource inputSource, BaseProductParameters options)
Enqueues a doc with the POST method.- Specified by:
reqPostEnqueuein classMindeeApiV2- Parameters:
inputSource- Input source to send.options- Options to send the file along with.- Returns:
- A job response.
-
reqGetJobById
public JobResponse reqGetJobById(String jobId)
Description copied from class:MindeeApiV2Attempts to poll the queue.- Specified by:
reqGetJobByIdin classMindeeApiV2- Parameters:
jobId- id of the job to get.
-
reqGetResultById
public <TResponse extends CommonResponse> TResponse reqGetResultById(Class<TResponse> responseClass, String inferenceId)
Description copied from class:MindeeApiV2Retrieves the inference from a 302 redirect.- Specified by:
reqGetResultByIdin classMindeeApiV2inferenceId- ID of the inference to poll.
-
reqGetResultByUrl
public <TResponse extends CommonResponse> TResponse reqGetResultByUrl(Class<TResponse> responseClass, String inferenceUrl)
Description copied from class:MindeeApiV2Retrieves the inference from a given URL. The inference will only be available after it has finished processing.- Specified by:
reqGetResultByUrlin classMindeeApiV2
-
reqGetSearch
public <TSearchResponse extends BaseSearchResponse> TSearchResponse reqGetSearch(BaseSearchParameters<TSearchResponse> parameters)
Description copied from class:MindeeApiV2Retrieves a list of resources with the given criteria.- Specified by:
reqGetSearchin classMindeeApiV2
-
reqGetSearch
@Deprecated public SearchResponse reqGetSearch(ModelSearchParameters parameters)
Deprecated.- Specified by:
reqGetSearchin classMindeeApiV2
-
builder
public static MindeeHttpApiV2.MindeeHttpApiV2Builder builder()
-
-