Skip to content

Commit

Permalink
Update the Computer Vision API thumbnail generation service API endpo…
Browse files Browse the repository at this point in the history
…int version
  • Loading branch information
kmgalanakis committed Aug 10, 2023
1 parent eff69df commit 12069a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion includes/Classifai/Providers/Azure/SmartCropping.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SmartCropping {
*
* @var string
*/
const API_PATH = 'vision/v3.1/generateThumbnail/';
const API_PATH = 'vision/v3.2/generateThumbnail/';

/**
* ComputerVisition settings.
Expand Down
2 changes: 1 addition & 1 deletion tests/Classifai/Providers/Azure/SmartCroppingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public function test_get_cropped_thumbnail() {
*/
public function test_get_api_url() {
$this->assertEquals(
'my-api-url.com/vision/v3.1/generateThumbnail/',
'my-api-url.com/vision/v3.2/generateThumbnail/',
$this->get_smart_cropping()->get_api_url()
);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test-plugin/e2e-test-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function classifai_test_mock_http_requests( $preempt, $parsed_args, $url ) {
$response = file_get_contents( __DIR__ . '/image_analyze.json' );
} elseif ( strpos( $url, 'http://e2e-test-image-processing.test/vision/v3.2/ocr' ) !== false ) {
$response = file_get_contents( __DIR__ . '/ocr.json' );
} elseif ( strpos( $url, 'http://e2e-test-image-processing.test/vision/v3.1/generateThumbnail' ) !== false ) {
} elseif ( strpos( $url, 'http://e2e-test-image-processing.test/vision/v3.2/generateThumbnail' ) !== false ) {
$response = file_get_contents( __DIR__ . '../classifai/assets/img/icon256x256.png' );
} elseif ( strpos( $url, 'http://e2e-test-image-processing.test/pdf-read-result' ) !== false ) {
$response = file_get_contents( __DIR__ . '/pdf.json' );
Expand Down

0 comments on commit 12069a6

Please sign in to comment.