Endpoint
extends BaseEndpoint
in package
Endpoint management.
Table of Contents
Properties
Methods
- __construct() : mixed
- documentQueueReqGet() : array{data: string|bool, code: int}
- Retrieves a document from its queue ID.
- predictAsyncRequestPost() : array{data: string|bool, code: int}
- Sends a document for synchronous enqueuing.
- predictRequestPost() : array{data: string|bool, code: int}
- Sends a document for asynchronous enqueuing.
- setFinalCurlOpts() : array{data: string|bool, code: int}
- initCurlSessionGet() : array{data: string|bool, code: int}
- Starts a CURL session using GET.
- initCurlSessionPost() : array{data: string|bool, code: int}
- Starts a CURL session using POST.
Properties
$owner
public
string
$owner
$settings
public
MindeeApi|MindeeWorkflowApi
$settings
$urlName
public
string
$urlName
$version
public
string
$version
Methods
__construct()
public
__construct(string $urlName, string $owner, string $version, MindeeApi $settings) : mixed
Parameters
- $urlName : string
-
Url (name) of the endpoint.
- $owner : string
-
Name of the endpoint's owner.
- $version : string
-
Version of the endpoint.
- $settings : MindeeApi
-
Settings for the endpoint.
documentQueueReqGet()
Retrieves a document from its queue ID.
public
documentQueueReqGet(string $queueId) : array{data: string|bool, code: int}
Parameters
- $queueId : string
-
ID of the queue to poll.
Return values
array{data: string|bool, code: int} —Final response.
predictAsyncRequestPost()
Sends a document for synchronous enqueuing.
public
predictAsyncRequestPost(InputSource $fileCurl, PredictMethodOptions $options) : array{data: string|bool, code: int}
Parameters
- $fileCurl : InputSource
-
File to upload.
- $options : PredictMethodOptions
-
Prediction Options.
Return values
array{data: string|bool, code: int} —Final response.
predictRequestPost()
Sends a document for asynchronous enqueuing.
public
predictRequestPost(InputSource $fileCurl, PredictMethodOptions $options) : array{data: string|bool, code: int}
Parameters
- $fileCurl : InputSource
-
File to upload.
- $options : PredictMethodOptions
-
Prediction Options.
Return values
array{data: string|bool, code: int} —Final response.
setFinalCurlOpts()
public
setFinalCurlOpts(CurlHandle $ch, string $suffix, array<string, string|array<string|int, mixed>|bool>|null $postFields[, string|null $workflowId = null ]) : array{data: string|bool, code: int}
Parameters
- $ch : CurlHandle
-
Curl Channel.
- $suffix : string
-
Optional suffix for the url call.
- $postFields : array<string, string|array<string|int, mixed>|bool>|null
-
Post fields.
- $workflowId : string|null = null
-
Optional ID of the workflow.
Return values
array{data: string|bool, code: int} —Final response.
initCurlSessionGet()
Starts a CURL session using GET.
protected
initCurlSessionGet(string $queueId) : array{data: string|bool, code: int}
Parameters
- $queueId : string
-
ID of the queue to poll.
Return values
array{data: string|bool, code: int}initCurlSessionPost()
Starts a CURL session using POST.
private
initCurlSessionPost(InputSource $inputSource, PredictMethodOptions $options, bool $async) : array{data: string|bool, code: int}
Parameters
- $inputSource : InputSource
-
File to upload.
- $options : PredictMethodOptions
-
Prediction Options.
- $async : bool
-
Whether to use the async endpoint.
Tags
Return values
array{data: string|bool, code: int} —Final response.