Skip to content

Commit

Permalink
Release 24.2 (#65)
Browse files Browse the repository at this point in the history
* Update github checkout version from v3 to v4

* Update version to 24.2.0

* Add 'types' field to recognition tests
  • Loading branch information
Denis-Averin authored Feb 29, 2024
1 parent 213d29c commit cfbef84
Show file tree
Hide file tree
Showing 11 changed files with 919 additions and 1,188 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-badges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check badges in README.md
run: ./scripts/check-badges.bash "README.md"
4 changes: 2 additions & 2 deletions .github/workflows/php-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ Configuration*.json

/.php-cs-fixer.cache
/.phpunit.cache
/.phpunit.result.cache
phpunit.log
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Supported PHP Versions](https://img.shields.io/packagist/dependency-v/aspose/barcode-cloud-php/php)](https://packagist.org/packages/aspose/barcode-cloud-php)

- API version: 3.0
- Package version: 24.1.0
- Package version: 24.2.0
- Supported PHP versions: ">=7.4 || >=8.0"

## Demo applications
Expand Down
1,744 changes: 769 additions & 975 deletions src/Aspose/BarCode/BarcodeApi.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Aspose/BarCode/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Configuration implements JsonSerializable
*
* @var string
*/
protected $clientVersion = '24.1.0';
protected $clientVersion = '24.2.0';

/**
* ClientId for API
Expand Down
160 changes: 66 additions & 94 deletions src/Aspose/BarCode/FileApi.php

Large diffs are not rendered by default.

127 changes: 51 additions & 76 deletions src/Aspose/BarCode/FolderApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,44 +239,38 @@ protected function CopyFolderRequest(Requests\CopyFolderRequest $request)
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if (isset($request->src_path)) {
$localName = lcfirst('srcPath');
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($request->src_path), $resourcePath);
}

// query params
if (isset($request->dest_path)) {
$localName = lcfirst('destPath');
$localValue = is_bool($request->dest_path) ? ($request->dest_path ? 'true' : 'false') : $request->dest_path;
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
$queryParamName = lcfirst('destPath');
$queryParamValue = is_bool($request->dest_path) ? ($request->dest_path ? 'true' : 'false') : $request->dest_path;
if (strpos($resourcePath, '{' . $queryParamName . '}') !== false) {
$resourcePath = str_replace('{' . $queryParamName . '}', ObjectSerializer::toPathValue($queryParamValue), $resourcePath);
} else {
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
$queryParams[$queryParamName] = ObjectSerializer::toQueryValue($queryParamValue);
}
}
// query params
if (isset($request->src_storage_name)) {
$localName = lcfirst('srcStorageName');
$localValue = is_bool($request->src_storage_name) ? ($request->src_storage_name ? 'true' : 'false') : $request->src_storage_name;
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
$queryParamName = lcfirst('srcStorageName');
$queryParamValue = is_bool($request->src_storage_name) ? ($request->src_storage_name ? 'true' : 'false') : $request->src_storage_name;
if (strpos($resourcePath, '{' . $queryParamName . '}') !== false) {
$resourcePath = str_replace('{' . $queryParamName . '}', ObjectSerializer::toPathValue($queryParamValue), $resourcePath);
} else {
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
$queryParams[$queryParamName] = ObjectSerializer::toQueryValue($queryParamValue);
}
}
// query params
if (isset($request->dest_storage_name)) {
$localName = lcfirst('destStorageName');
$localValue = is_bool($request->dest_storage_name) ? ($request->dest_storage_name ? 'true' : 'false') : $request->dest_storage_name;
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
$queryParamName = lcfirst('destStorageName');
$queryParamValue = is_bool($request->dest_storage_name) ? ($request->dest_storage_name ? 'true' : 'false') : $request->dest_storage_name;
if (strpos($resourcePath, '{' . $queryParamName . '}') !== false) {
$resourcePath = str_replace('{' . $queryParamName . '}', ObjectSerializer::toPathValue($queryParamValue), $resourcePath);
} else {
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
$queryParams[$queryParamName] = ObjectSerializer::toQueryValue($queryParamValue);
}
}


$resourcePath = $this->_parseURL($resourcePath, $queryParams);

// body params
Expand Down Expand Up @@ -470,24 +464,20 @@ protected function CreateFolderRequest(Requests\CreateFolderRequest $request)
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if (isset($request->path)) {
$localName = lcfirst('path');
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($request->path), $resourcePath);
}

// query params
if (isset($request->storage_name)) {
$localName = lcfirst('storageName');
$localValue = is_bool($request->storage_name) ? ($request->storage_name ? 'true' : 'false') : $request->storage_name;
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
$queryParamName = lcfirst('storageName');
$queryParamValue = is_bool($request->storage_name) ? ($request->storage_name ? 'true' : 'false') : $request->storage_name;
if (strpos($resourcePath, '{' . $queryParamName . '}') !== false) {
$resourcePath = str_replace('{' . $queryParamName . '}', ObjectSerializer::toPathValue($queryParamValue), $resourcePath);
} else {
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
$queryParams[$queryParamName] = ObjectSerializer::toQueryValue($queryParamValue);
}
}


$resourcePath = $this->_parseURL($resourcePath, $queryParams);

// body params
Expand Down Expand Up @@ -681,34 +671,29 @@ protected function DeleteFolderRequest(Requests\DeleteFolderRequest $request)
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if (isset($request->path)) {
$localName = lcfirst('path');
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($request->path), $resourcePath);
}

// query params
if (isset($request->storage_name)) {
$localName = lcfirst('storageName');
$localValue = is_bool($request->storage_name) ? ($request->storage_name ? 'true' : 'false') : $request->storage_name;
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
$queryParamName = lcfirst('storageName');
$queryParamValue = is_bool($request->storage_name) ? ($request->storage_name ? 'true' : 'false') : $request->storage_name;
if (strpos($resourcePath, '{' . $queryParamName . '}') !== false) {
$resourcePath = str_replace('{' . $queryParamName . '}', ObjectSerializer::toPathValue($queryParamValue), $resourcePath);
} else {
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
$queryParams[$queryParamName] = ObjectSerializer::toQueryValue($queryParamValue);
}
}
// query params
if (isset($request->recursive)) {
$localName = lcfirst('recursive');
$localValue = is_bool($request->recursive) ? ($request->recursive ? 'true' : 'false') : $request->recursive;
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
$queryParamName = lcfirst('recursive');
$queryParamValue = is_bool($request->recursive) ? ($request->recursive ? 'true' : 'false') : $request->recursive;
if (strpos($resourcePath, '{' . $queryParamName . '}') !== false) {
$resourcePath = str_replace('{' . $queryParamName . '}', ObjectSerializer::toPathValue($queryParamValue), $resourcePath);
} else {
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
$queryParams[$queryParamName] = ObjectSerializer::toQueryValue($queryParamValue);
}
}


$resourcePath = $this->_parseURL($resourcePath, $queryParams);

// body params
Expand Down Expand Up @@ -944,24 +929,20 @@ protected function GetFilesListRequest(Requests\GetFilesListRequest $request)
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if (isset($request->path)) {
$localName = lcfirst('path');
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($request->path), $resourcePath);
}

// query params
if (isset($request->storage_name)) {
$localName = lcfirst('storageName');
$localValue = is_bool($request->storage_name) ? ($request->storage_name ? 'true' : 'false') : $request->storage_name;
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
$queryParamName = lcfirst('storageName');
$queryParamValue = is_bool($request->storage_name) ? ($request->storage_name ? 'true' : 'false') : $request->storage_name;
if (strpos($resourcePath, '{' . $queryParamName . '}') !== false) {
$resourcePath = str_replace('{' . $queryParamName . '}', ObjectSerializer::toPathValue($queryParamValue), $resourcePath);
} else {
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
$queryParams[$queryParamName] = ObjectSerializer::toQueryValue($queryParamValue);
}
}


$resourcePath = $this->_parseURL($resourcePath, $queryParams);

// body params
Expand Down Expand Up @@ -1159,44 +1140,38 @@ protected function MoveFolderRequest(Requests\MoveFolderRequest $request)
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if (isset($request->src_path)) {
$localName = lcfirst('srcPath');
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($request->src_path), $resourcePath);
}

// query params
if (isset($request->dest_path)) {
$localName = lcfirst('destPath');
$localValue = is_bool($request->dest_path) ? ($request->dest_path ? 'true' : 'false') : $request->dest_path;
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
$queryParamName = lcfirst('destPath');
$queryParamValue = is_bool($request->dest_path) ? ($request->dest_path ? 'true' : 'false') : $request->dest_path;
if (strpos($resourcePath, '{' . $queryParamName . '}') !== false) {
$resourcePath = str_replace('{' . $queryParamName . '}', ObjectSerializer::toPathValue($queryParamValue), $resourcePath);
} else {
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
$queryParams[$queryParamName] = ObjectSerializer::toQueryValue($queryParamValue);
}
}
// query params
if (isset($request->src_storage_name)) {
$localName = lcfirst('srcStorageName');
$localValue = is_bool($request->src_storage_name) ? ($request->src_storage_name ? 'true' : 'false') : $request->src_storage_name;
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
$queryParamName = lcfirst('srcStorageName');
$queryParamValue = is_bool($request->src_storage_name) ? ($request->src_storage_name ? 'true' : 'false') : $request->src_storage_name;
if (strpos($resourcePath, '{' . $queryParamName . '}') !== false) {
$resourcePath = str_replace('{' . $queryParamName . '}', ObjectSerializer::toPathValue($queryParamValue), $resourcePath);
} else {
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
$queryParams[$queryParamName] = ObjectSerializer::toQueryValue($queryParamValue);
}
}
// query params
if (isset($request->dest_storage_name)) {
$localName = lcfirst('destStorageName');
$localValue = is_bool($request->dest_storage_name) ? ($request->dest_storage_name ? 'true' : 'false') : $request->dest_storage_name;
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
$queryParamName = lcfirst('destStorageName');
$queryParamValue = is_bool($request->dest_storage_name) ? ($request->dest_storage_name ? 'true' : 'false') : $request->dest_storage_name;
if (strpos($resourcePath, '{' . $queryParamName . '}') !== false) {
$resourcePath = str_replace('{' . $queryParamName . '}', ObjectSerializer::toPathValue($queryParamValue), $resourcePath);
} else {
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
$queryParams[$queryParamName] = ObjectSerializer::toQueryValue($queryParamValue);
}
}


$resourcePath = $this->_parseURL($resourcePath, $queryParams);

// body params
Expand Down Expand Up @@ -1302,7 +1277,7 @@ private function _parseURL($url, $queryParams)
{
// parse the url
$UrlToSign = trim($url, '/');
$urlQuery = http_build_query($queryParams);
$urlQuery = preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($queryParams));

$urlPartToSign = $this->config->getBasePath() . '/' . parse_url($UrlToSign, PHP_URL_HOST) . parse_url($UrlToSign, PHP_URL_PATH) . '?' . $urlQuery;

Expand Down
Loading

0 comments on commit cfbef84

Please sign in to comment.