From 13835377fea3e3051099a8cd129153047cd3b947 Mon Sep 17 00:00:00 2001 From: sebastianMindee <130448732+sebastianMindee@users.noreply.github.com> Date: Thu, 19 Mar 2026 16:19:24 +0100 Subject: [PATCH] :memo: fix code samples --- docs/code_samples/v2_classification.txt | 2 +- docs/code_samples/v2_crop.txt | 2 +- docs/code_samples/v2_extraction_polling.txt | 6 ++++-- docs/code_samples/v2_extraction_webhook.txt | 2 +- docs/code_samples/v2_ocr.txt | 2 +- docs/code_samples/v2_split.txt | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/code_samples/v2_classification.txt b/docs/code_samples/v2_classification.txt index dffea452..1995f910 100644 --- a/docs/code_samples/v2_classification.txt +++ b/docs/code_samples/v2_classification.txt @@ -22,7 +22,7 @@ $classificationParams = new ClassificationParameters( // Load a file from disk $inputSource = new PathInput($filePath); -// Upload the file +// Send for processing using polling $response = $mindeeClient->enqueueAndGetResult( ClassificationResponse::class, $inputSource, diff --git a/docs/code_samples/v2_crop.txt b/docs/code_samples/v2_crop.txt index 2d050c32..74eaabfe 100644 --- a/docs/code_samples/v2_crop.txt +++ b/docs/code_samples/v2_crop.txt @@ -22,7 +22,7 @@ $cropParams = new CropParameters( // Load a file from disk $inputSource = new PathInput($filePath); -// Upload the file +// Send for processing using polling $response = $mindeeClient->enqueueAndGetResult( CropResponse::class, $inputSource, diff --git a/docs/code_samples/v2_extraction_polling.txt b/docs/code_samples/v2_extraction_polling.txt index 047e07b7..67a55000 100644 --- a/docs/code_samples/v2_extraction_polling.txt +++ b/docs/code_samples/v2_extraction_polling.txt @@ -3,6 +3,7 @@ use Mindee\ClientV2; use Mindee\Input\InferenceParameters; use Mindee\Input\PathInput; +use Mindee\Parsing\V2\InferenceResponse; $apiKey = "MY_API_KEY"; $filePath = "/path/to/the/file.ext"; @@ -33,8 +34,9 @@ $inferenceParams = new InferenceParameters( // Load a file from disk $inputSource = new PathInput($filePath); -// Upload the file -$response = $mindeeClient->enqueueAndGetInference( +// Send for processing using polling +$response = $mindeeClient->enqueueAndGetResult( + InferenceResponse::class, $inputSource, $inferenceParams ); diff --git a/docs/code_samples/v2_extraction_webhook.txt b/docs/code_samples/v2_extraction_webhook.txt index c5046c56..32be0c69 100644 --- a/docs/code_samples/v2_extraction_webhook.txt +++ b/docs/code_samples/v2_extraction_webhook.txt @@ -34,7 +34,7 @@ $inferenceParams = new InferenceParameters( // Load a file from disk $inputSource = new PathInput($filePath); -// Upload the file +// Send for processing $response = $mindeeClient->enqueue( $inputSource, $inferenceParams diff --git a/docs/code_samples/v2_ocr.txt b/docs/code_samples/v2_ocr.txt index 22af46b8..bf5f9dbd 100644 --- a/docs/code_samples/v2_ocr.txt +++ b/docs/code_samples/v2_ocr.txt @@ -22,7 +22,7 @@ $ocrParams = new OcrParameters( // Load a file from disk $inputSource = new PathInput($filePath); -// Upload the file +// Send for processing using polling $response = $mindeeClient->enqueueAndGetResult( OcrResponse::class, $inputSource, diff --git a/docs/code_samples/v2_split.txt b/docs/code_samples/v2_split.txt index 92f3f56e..c29b2bdb 100644 --- a/docs/code_samples/v2_split.txt +++ b/docs/code_samples/v2_split.txt @@ -22,7 +22,7 @@ $splitParams = new SplitParameters( // Load a file from disk $inputSource = new PathInput($filePath); -// Upload the file +// Send for processing using polling $response = $mindeeClient->enqueueAndGetResult( SplitResponse::class, $inputSource,