cloudmersive / cloudmersive_barcode_api_client
3.1.0
2024-06-08 22:53 UTC
Requires
- php: >=7.2.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.5
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
README
条码API允许您生成条码图像,并从条码图像中识别值。
Cloudmersive Barcode API提供高级条码生成、查找和识别功能。
- API版本:v1
- 包版本:3.1.0
要求
PHP 5.5及以后版本
安装和用法
Composer
要使用Composer安装绑定,请在composer.json
中添加以下内容
{
"repositories": [
{
"type": "git",
"url": "https://github.com/cloudmersive/cloudmersive_barcode_api_client.git"
}
],
"require": {
"cloudmersive/cloudmersive_barcode_api_client": "*@dev"
}
}
然后运行composer install
手动安装
下载文件并包含autoload.php
require_once('/path/to/cloudmersive_barcode_api_client/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门
请按照安装过程进行,然后运行以下内容
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: Apikey $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer'); $apiInstance = new Swagger\Client\Api\BarcodeLookupApi( // 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 ); $value = "value_example"; // string | Barcode value try { $result = $apiInstance->barcodeLookupEanLookup($value); print_r($result); } catch (Exception $e) { echo 'Exception when calling BarcodeLookupApi->barcodeLookupEanLookup: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI都是相对于https://api.cloudmersive.com
模型文档
- BarcodeLookupResponse
- BarcodeQRResultItem
- BarcodeScanQRAdvancedResult
- BarcodeScanResult
- ProductMatch
授权文档
Apikey
- 类型:API密钥
- API密钥参数名:Apikey
- 位置:HTTP头