Skip to content

Latest commit

 

History

History
184 lines (124 loc) · 5.44 KB

ScanApi.md

File metadata and controls

184 lines (124 loc) · 5.44 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 barcode from file on server using GET requests with parameter in query string.
scanBase64() POST /barcode/scan-body Scan barcode from file in request body using POST requests with parameter in body in json or xml format.
scanMultipart() POST /barcode/scan-multipart Scan barcode from file in request body using POST requests with parameter in multipart form.

scan()

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

Scan barcode from file on server using GET requests with parameter in query string.

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 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 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 barcode from file in request body using POST requests with parameter in body in json or xml format.

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 barcode from file in request body using POST requests with parameter in multipart form.

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]