Skip to content

Commit 528fb61

Browse files
authored
Release 21.9 (#18)
1 parent 9d6cbf7 commit 528fb61

File tree

11 files changed

+83
-60
lines changed

11 files changed

+83
-60
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Packagist Version](https://img.shields.io/packagist/v/aspose/barcode-cloud-php)](https://packagist.org/packages/aspose/barcode-cloud-php)
66

77
- API version: 3.0
8-
- Package version: 21.7.0
8+
- Package version: 21.9.0
99

1010
## Demo applications
1111

docs/Api/BarcodeApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ Name | Type | Description | Notes
367367

368368
### HTTP request headers
369369

370-
- **Content-Type**: multipart/form-data, application/octet-stream
370+
- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded, application/octet-stream
371371
- **Accept**: application/json
372372

373373
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
@@ -545,7 +545,7 @@ Name | Type | Description | Notes
545545

546546
### HTTP request headers
547547

548-
- **Content-Type**: application/json, application/xml, multipart/form-data
548+
- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded, application/json, application/xml
549549
- **Accept**: application/json
550550

551551
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

src/Aspose/BarCode/BarcodeApi.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ protected function GetBarcodeGenerateRequest(Requests\GetBarcodeGenerateRequest
283283
$httpBody = '';
284284
$multipart = false;
285285

286-
287286
// query params
288287
if (isset($request->type)) {
289288
$localName = lcfirst('Type');
@@ -666,7 +665,8 @@ protected function GetBarcodeGenerateRequest(Requests\GetBarcodeGenerateRequest
666665
foreach ($formParams as $formParamName => $formParamValue) {
667666
$multipartContents[] = [
668667
'name' => $formParamName,
669-
'contents' => $formParamValue
668+
'contents' => $formParamValue,
669+
'filename' => $filename
670670
];
671671
}
672672
// for HTTP post (form)
@@ -893,7 +893,6 @@ protected function GetBarcodeRecognizeRequest(Requests\GetBarcodeRecognizeReques
893893
$headerParams = [];
894894
$httpBody = '';
895895
$multipart = false;
896-
897896
// path params
898897
if (isset($request->name)) {
899898
$localName = lcfirst('name');
@@ -1285,7 +1284,8 @@ protected function GetBarcodeRecognizeRequest(Requests\GetBarcodeRecognizeReques
12851284
foreach ($formParams as $formParamName => $formParamValue) {
12861285
$multipartContents[] = [
12871286
'name' => $formParamName,
1288-
'contents' => $formParamValue
1287+
'contents' => $formParamValue,
1288+
'filename' => $filename
12891289
];
12901290
}
12911291
// for HTTP post (form)
@@ -1508,7 +1508,6 @@ protected function PostBarcodeRecognizeFromUrlOrContentRequest(Requests\PostBarc
15081508
$httpBody = '';
15091509
$multipart = false;
15101510

1511-
15121511
// query params
15131512
if (isset($request->type)) {
15141513
$localName = lcfirst('Type');
@@ -1858,7 +1857,7 @@ protected function PostBarcodeRecognizeFromUrlOrContentRequest(Requests\PostBarc
18581857

18591858
// form params
18601859
if (isset($request->image)) {
1861-
//$multipart = true;
1860+
$multipart = true;
18621861
$filename = ObjectSerializer::toFormValue($request->image);
18631862
$handle = fopen($filename, 'rb');
18641863
$fsize = filesize($filename);
@@ -1875,7 +1874,7 @@ protected function PostBarcodeRecognizeFromUrlOrContentRequest(Requests\PostBarc
18751874
} else {
18761875
$headers = $this->headerSelector->selectHeaders(
18771876
['application/json'],
1878-
['multipart/form-data', 'application/octet-stream']
1877+
['multipart/form-data', 'application/x-www-form-urlencoded', 'application/octet-stream']
18791878
);
18801879
}
18811880

@@ -1893,7 +1892,8 @@ protected function PostBarcodeRecognizeFromUrlOrContentRequest(Requests\PostBarc
18931892
foreach ($formParams as $formParamName => $formParamValue) {
18941893
$multipartContents[] = [
18951894
'name' => $formParamName,
1896-
'contents' => $formParamValue
1895+
'contents' => $formParamValue,
1896+
'filename' => $filename
18971897
];
18981898
}
18991899
// for HTTP post (form)
@@ -2124,7 +2124,6 @@ protected function PostGenerateMultipleRequest(Requests\PostGenerateMultipleRequ
21242124
$httpBody = '';
21252125
$multipart = false;
21262126

2127-
21282127
// query params
21292128
if (isset($request->format)) {
21302129
$localName = lcfirst('format');
@@ -2174,7 +2173,8 @@ protected function PostGenerateMultipleRequest(Requests\PostGenerateMultipleRequ
21742173
foreach ($formParams as $formParamName => $formParamValue) {
21752174
$multipartContents[] = [
21762175
'name' => $formParamName,
2177-
'contents' => $formParamValue
2176+
'contents' => $formParamValue,
2177+
'filename' => $filename
21782178
];
21792179
}
21802180
// for HTTP post (form)
@@ -2413,7 +2413,6 @@ protected function PutBarcodeGenerateFileRequest(Requests\PutBarcodeGenerateFile
24132413
$headerParams = [];
24142414
$httpBody = '';
24152415
$multipart = false;
2416-
24172416
// path params
24182417
if (isset($request->name)) {
24192418
$localName = lcfirst('name');
@@ -2804,7 +2803,7 @@ protected function PutBarcodeGenerateFileRequest(Requests\PutBarcodeGenerateFile
28042803
} else {
28052804
$headers = $this->headerSelector->selectHeaders(
28062805
['application/json'],
2807-
['application/json', 'application/xml', 'multipart/form-data']
2806+
['multipart/form-data', 'application/x-www-form-urlencoded', 'application/json', 'application/xml']
28082807
);
28092808
}
28102809

@@ -2822,7 +2821,8 @@ protected function PutBarcodeGenerateFileRequest(Requests\PutBarcodeGenerateFile
28222821
foreach ($formParams as $formParamName => $formParamValue) {
28232822
$multipartContents[] = [
28242823
'name' => $formParamName,
2825-
'contents' => $formParamValue
2824+
'contents' => $formParamValue,
2825+
'filename' => $filename
28262826
];
28272827
}
28282828
// for HTTP post (form)
@@ -3053,7 +3053,6 @@ protected function PutBarcodeRecognizeFromBodyRequest(Requests\PutBarcodeRecogni
30533053
$headerParams = [];
30543054
$httpBody = '';
30553055
$multipart = false;
3056-
30573056
// path params
30583057
if (isset($request->name)) {
30593058
$localName = lcfirst('name');
@@ -3129,7 +3128,8 @@ protected function PutBarcodeRecognizeFromBodyRequest(Requests\PutBarcodeRecogni
31293128
foreach ($formParams as $formParamName => $formParamValue) {
31303129
$multipartContents[] = [
31313130
'name' => $formParamName,
3132-
'contents' => $formParamValue
3131+
'contents' => $formParamValue,
3132+
'filename' => $filename
31333133
];
31343134
}
31353135
// for HTTP post (form)
@@ -3364,7 +3364,6 @@ protected function PutGenerateMultipleRequest(Requests\PutGenerateMultipleReques
33643364
$headerParams = [];
33653365
$httpBody = '';
33663366
$multipart = false;
3367-
33683367
// path params
33693368
if (isset($request->name)) {
33703369
$localName = lcfirst('name');
@@ -3440,7 +3439,8 @@ protected function PutGenerateMultipleRequest(Requests\PutGenerateMultipleReques
34403439
foreach ($formParams as $formParamName => $formParamValue) {
34413440
$multipartContents[] = [
34423441
'name' => $formParamName,
3443-
'contents' => $formParamValue
3442+
'contents' => $formParamValue,
3443+
'filename' => $filename
34443444
];
34453445
}
34463446
// for HTTP post (form)
@@ -3549,7 +3549,7 @@ private function _parseURL($url, $queryParams)
35493549
*/
35503550
private function _requestToken()
35513551
{
3552-
$requestUrl = $this->config->getHost() . '/connect/token';
3552+
$requestUrl = $this->config->getAuthUrl();
35533553

35543554
$response = $this->client->request('POST', $requestUrl, [
35553555
'form_params' => [

src/Aspose/BarCode/Configuration.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Configuration implements JsonSerializable
4949
*
5050
* @var string
5151
*/
52-
protected $clientVersion = '21.7.0';
52+
protected $clientVersion = '21.9.0';
5353

5454
/*
5555
* ClientId for API
@@ -79,6 +79,8 @@ class Configuration implements JsonSerializable
7979
*/
8080
protected $host = 'https://api.aspose.cloud';
8181

82+
protected $authUrl = 'https://api.aspose.cloud/connect/token';
83+
8284
/*
8385
* Version of API to use, possible values are v1, v1.1, v2, v3
8486
* default value is v1
@@ -221,6 +223,17 @@ public function getHost()
221223
return $this->host;
222224
}
223225

226+
public function setAuthUrl($authUrl)
227+
{
228+
$this->authUrl = $authUrl;
229+
return $this;
230+
}
231+
232+
public function getAuthUrl()
233+
{
234+
return $this->authUrl;
235+
}
236+
224237
/*
225238
* Gets the base_path
226239
*
@@ -365,7 +378,7 @@ public static function toDebugReport()
365378
$report .= ' OS: ' . php_uname() . PHP_EOL;
366379
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
367380
$report .= ' OpenAPI Spec Version: 3.0' . PHP_EOL;
368-
$report .= ' SDK Package Version: 21.7.0' . PHP_EOL;
381+
$report .= ' SDK Package Version: 21.9.0' . PHP_EOL;
369382
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
370383

371384
return $report;
@@ -380,6 +393,7 @@ public function jsonSerialize()
380393
'ClientId' => $this->clientId,
381394
'ClientSecret' => $this->clientSecret,
382395
'Host' => $this->host,
396+
'AuthUrl' => $this->authUrl,
383397
'AccessToken' => $this->accessToken,
384398
'Debug' => $this->debug,
385399
];

src/Aspose/BarCode/FileApi.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ protected function CopyFileRequest(Requests\CopyFileRequest $request)
236236
$headerParams = [];
237237
$httpBody = '';
238238
$multipart = false;
239-
240239
// path params
241240
if (isset($request->src_path)) {
242241
$localName = lcfirst('srcPath');
@@ -315,7 +314,8 @@ protected function CopyFileRequest(Requests\CopyFileRequest $request)
315314
foreach ($formParams as $formParamName => $formParamValue) {
316315
$multipartContents[] = [
317316
'name' => $formParamName,
318-
'contents' => $formParamValue
317+
'contents' => $formParamValue,
318+
'filename' => $filename
319319
];
320320
}
321321
// for HTTP post (form)
@@ -500,7 +500,6 @@ protected function DeleteFileRequest(Requests\DeleteFileRequest $request)
500500
$headerParams = [];
501501
$httpBody = '';
502502
$multipart = false;
503-
504503
// path params
505504
if (isset($request->path)) {
506505
$localName = lcfirst('path');
@@ -559,7 +558,8 @@ protected function DeleteFileRequest(Requests\DeleteFileRequest $request)
559558
foreach ($formParams as $formParamName => $formParamValue) {
560559
$multipartContents[] = [
561560
'name' => $formParamName,
562-
'contents' => $formParamValue
561+
'contents' => $formParamValue,
562+
'filename' => $filename
563563
];
564564
}
565565
// for HTTP post (form)
@@ -786,7 +786,6 @@ protected function DownloadFileRequest(Requests\DownloadFileRequest $request)
786786
$headerParams = [];
787787
$httpBody = '';
788788
$multipart = false;
789-
790789
// path params
791790
if (isset($request->path)) {
792791
$localName = lcfirst('path');
@@ -845,7 +844,8 @@ protected function DownloadFileRequest(Requests\DownloadFileRequest $request)
845844
foreach ($formParams as $formParamName => $formParamValue) {
846845
$multipartContents[] = [
847846
'name' => $formParamName,
848-
'contents' => $formParamValue
847+
'contents' => $formParamValue,
848+
'filename' => $filename
849849
];
850850
}
851851
// for HTTP post (form)
@@ -1034,7 +1034,6 @@ protected function MoveFileRequest(Requests\MoveFileRequest $request)
10341034
$headerParams = [];
10351035
$httpBody = '';
10361036
$multipart = false;
1037-
10381037
// path params
10391038
if (isset($request->src_path)) {
10401039
$localName = lcfirst('srcPath');
@@ -1113,7 +1112,8 @@ protected function MoveFileRequest(Requests\MoveFileRequest $request)
11131112
foreach ($formParams as $formParamName => $formParamValue) {
11141113
$multipartContents[] = [
11151114
'name' => $formParamName,
1116-
'contents' => $formParamValue
1115+
'contents' => $formParamValue,
1116+
'filename' => $filename
11171117
];
11181118
}
11191119
// for HTTP post (form)
@@ -1344,7 +1344,6 @@ protected function UploadFileRequest(Requests\UploadFileRequest $request)
13441344
$headerParams = [];
13451345
$httpBody = '';
13461346
$multipart = false;
1347-
13481347
// path params
13491348
if (isset($request->path)) {
13501349
$localName = lcfirst('path');
@@ -1367,7 +1366,7 @@ protected function UploadFileRequest(Requests\UploadFileRequest $request)
13671366

13681367
// form params
13691368
if (isset($request->file)) {
1370-
//$multipart = true;
1369+
$multipart = true;
13711370
$filename = ObjectSerializer::toFormValue($request->file);
13721371
$handle = fopen($filename, 'rb');
13731372
$fsize = filesize($filename);
@@ -1402,7 +1401,8 @@ protected function UploadFileRequest(Requests\UploadFileRequest $request)
14021401
foreach ($formParams as $formParamName => $formParamValue) {
14031402
$multipartContents[] = [
14041403
'name' => $formParamName,
1405-
'contents' => $formParamValue
1404+
'contents' => $formParamValue,
1405+
'filename' => $filename
14061406
];
14071407
}
14081408
// for HTTP post (form)
@@ -1514,7 +1514,7 @@ private function _parseURL($url, $queryParams)
15141514
*/
15151515
private function _requestToken()
15161516
{
1517-
$requestUrl = $this->config->getHost() . '/connect/token';
1517+
$requestUrl = $this->config->getAuthUrl();
15181518

15191519
$response = $this->client->request('POST', $requestUrl, [
15201520
'form_params' => [

0 commit comments

Comments
 (0)