Skip to content

Latest commit

 

History

History
186 lines (124 loc) · 5.7 KB

File metadata and controls

186 lines (124 loc) · 5.7 KB

Aspose\BarCode\ScanApi

All URIs are relative to https://api.aspose.cloud/v4.0, except if the operation defines another base path.

Method HTTP request Description
scan() GET /barcode/scan Scan a barcode from a file on an Internet server using a GET request with a query string parameter. For scanning files from your hard drive, use `scan-body` or `scan-multipart` endpoints instead.
scanBase64() POST /barcode/scan-body Scan a barcode from a file in the request body using a POST request with a JSON or XML body parameter.
scanMultipart() POST /barcode/scan-multipart Scan a barcode from a file in the request body using a POST request with a multipart form parameter.

scan()

scan($file_url): \Aspose\BarCode\Model\BarcodeResponseList

Scan a barcode from a file on an Internet server using a GET request with a query string parameter. For scanning files from your hard drive, use scan-body or scan-multipart endpoints instead.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: JWT
$config = Aspose\BarCode\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Aspose\BarCode\Api\ScanApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$file_url = 'file_url_example'; // string | URL to the barcode image.

try {
    $result = $apiInstance->scan($file_url);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ScanApi->scan: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
file_url string URL to the barcode image.

Return type

\Aspose\BarCode\Model\BarcodeResponseList

Authorization

JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

scanBase64()

scanBase64($scan_base64_request): \Aspose\BarCode\Model\BarcodeResponseList

Scan a barcode from a file in the request body using a POST request with a JSON or XML body parameter.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: JWT
$config = Aspose\BarCode\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Aspose\BarCode\Api\ScanApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$scan_base64_request = new \Aspose\BarCode\Model\ScanBase64Request(); // \Aspose\BarCode\Model\ScanBase64Request | Barcode scan request.

try {
    $result = $apiInstance->scanBase64($scan_base64_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ScanApi->scanBase64: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
scan_base64_request \Aspose\BarCode\Model\ScanBase64Request Barcode scan request.

Return type

\Aspose\BarCode\Model\BarcodeResponseList

Authorization

JWT

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

scanMultipart()

scanMultipart($file): \Aspose\BarCode\Model\BarcodeResponseList

Scan a barcode from a file in the request body using a POST request with a multipart form parameter.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: JWT
$config = Aspose\BarCode\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Aspose\BarCode\Api\ScanApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$file = '/path/to/file.txt'; // \SplFileObject | Barcode image file.

try {
    $result = $apiInstance->scanMultipart($file);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ScanApi->scanMultipart: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
file \SplFileObject**\SplFileObject** Barcode image file.

Return type

\Aspose\BarCode\Model\BarcodeResponseList

Authorization

JWT

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]