Documentation

ClientV2
in package

Mindee Client V2.

Table of Contents

Properties

$mindeeApi  : MindeeApiV2

Methods

__construct()  : mixed
Mindee Client V2.
enqueueAndGetInference()  : InferenceResponse
Send a document to an endpoint and poll the server until the result is sent or until the maximum number of tries is reached.
enqueueInference()  : JobResponse
Send the document to an asynchronous endpoint and return its ID in the queue.
getInference()  : InferenceResponse
Retrieves an inference.
getJob()  : JobResponse
Get the status of an inference that was previously enqueued.

Properties

Methods

__construct()

Mindee Client V2.

public __construct([string|null $apiKey = null ]) : mixed
Parameters
$apiKey : string|null = null

Optional API key. Will fall back to environment variable if not provided.

enqueueAndGetInference()

Send a document to an endpoint and poll the server until the result is sent or until the maximum number of tries is reached.

public enqueueAndGetInference(InputSource $inputDoc, InferenceParameters $params) : InferenceResponse
Parameters
$inputDoc : InputSource

Input document to parse.

$params : InferenceParameters

Parameters relating to prediction options.

Tags
throws
MindeeException

Throws if enqueueing fails, job fails, or times out.

category

Synchronous

Return values
InferenceResponse

A response containing parsing results.

enqueueInference()

Send the document to an asynchronous endpoint and return its ID in the queue.

public enqueueInference(InputSource $inputSource, InferenceParameters $params) : JobResponse
Parameters
$inputSource : InputSource

File to parse.

$params : InferenceParameters

Parameters relating to prediction options.

Tags
throws
MindeeException

Throws if the input document is not provided.

category

Asynchronous

Return values
JobResponse

A JobResponse containing the job (queue) corresponding to a document.

getInference()

Retrieves an inference.

public getInference(string $inferenceId) : InferenceResponse
Parameters
$inferenceId : string

ID of the queue to poll.

Tags
category

Asynchronous

Return values
InferenceResponse

An InferenceResponse containing a Job.

getJob()

Get the status of an inference that was previously enqueued.

public getJob(string $jobId) : JobResponse

Can be used for polling.

Parameters
$jobId : string

ID of the queue to poll.

Tags
category

Asynchronous

Return values
JobResponse

A JobResponse containing a Job, which also contains a Document if the parsing is complete.


        
On this page

Search results