Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 24.3 #35

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
TEST_CONFIGURATION_ACCESS_TOKEN: ${{ secrets.TEST_CONFIGURATION_ACCESS_TOKEN }}

- name: Dart analyze
run: dart analyze --fatal-infos lib
run: dart analyze --fatal-infos lib example

- name: Dart check format
run: dart format --output=none --set-exit-if-changed .
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# CHANGELOG

## 1.24.3

* March 2024 Release

## 1.24.2

* Improve code quality
* Use lints/recommended.yaml instead of lints/core.yaml

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ init:

.PHONY: lint
lint: init
dart analyze lib example
dart analyze --fatal-infos lib example

.PHONY: test
test:
Expand All @@ -25,7 +25,7 @@ fix: init
.PHONY: after-gen
after-gen: fix
./scripts/annotate-deprecated.bash
dart format . > /dev/null
@dart format .

.PHONY: update
update:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Dart test](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dart/actions/workflows/dart.yml/badge.svg?branch=main)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dart/actions/workflows/dart.yml)

- API version: 3.0
- SDK version: 1.24.2
- SDK version: 1.24.3

This SDK allows you to work with Aspose.BarCode for Cloud REST APIs in your Dart or Flutter applications quickly and easily

Expand Down Expand Up @@ -34,7 +34,7 @@ Add this dependency to your *pubspec.yaml*:

```yaml
dependencies:
aspose_barcode_cloud: 1.24.2
aspose_barcode_cloud: 1.24.3
```

## Sample usage
Expand Down
6 changes: 6 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# More strict than package:lints/core.yaml
# See https://dart.dev/tools/analysis for details
include: package:lints/recommended.yaml

linter:
rules:
package_api_docs: true
public_member_api_docs: true
7 changes: 4 additions & 3 deletions example/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ Future<void> main() async {
)));

// Generate image with barcode
final Uint8List generated =
await api.getBarcodeGenerate("QR", "text", textLocation: "None");
final Uint8List generated = await api.getBarcodeGenerate(
EncodeBarcodeType.qR_.toString(), "text",
textLocation: "None");

// Save generated image to file
File(fileName).writeAsBytesSync(generated);
Expand All @@ -29,7 +30,7 @@ Future<void> main() async {
final BarcodeResponseList recognized =
await api.postBarcodeRecognizeFromUrlOrContent(
image: formFile,
preset: PresetType.highPerformance_.value,
preset: PresetType.highPerformance_.toString(),
);

if (recognized.barcodes != null && recognized.barcodes!.isNotEmpty) {
Expand Down
48 changes: 32 additions & 16 deletions lib/src/api/barcode_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import 'package:http/http.dart' show MultipartFile, MultipartRequest;
import '../../aspose_barcode_cloud.dart';
import '../api_helper.dart';

/// BarcodeApi
class BarcodeApi {
BarcodeApi(this.apiClient);
/// Constructor
BarcodeApi(this._apiClient);

final ApiClient apiClient;
final ApiClient _apiClient;

///
/// Generate barcode.
Expand Down Expand Up @@ -204,7 +206,7 @@ class BarcodeApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(requestPath, 'GET', queryParams,
final response = await _apiClient.invokeAPI(requestPath, 'GET', queryParams,
postBody, headerParams, formParams, contentType, authNames);

if (response.statusCode >= 400) {
Expand Down Expand Up @@ -433,13 +435,13 @@ class BarcodeApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(requestPath, 'GET', queryParams,
final response = await _apiClient.invokeAPI(requestPath, 'GET', queryParams,
postBody, headerParams, formParams, contentType, authNames);

if (response.statusCode >= 400) {
throw ApiException(response.statusCode, response.body);
} else {
return apiClient.deserialize(response.body, 'BarcodeResponseList')
return _apiClient.deserialize(response.body, 'BarcodeResponseList')
as BarcodeResponseList;
}
}
Expand Down Expand Up @@ -678,13 +680,20 @@ class BarcodeApi {
}
} else {}

final response = await apiClient.invokeAPI(requestPath, 'POST', queryParams,
postBody, headerParams, formParams, contentType, authNames);
final response = await _apiClient.invokeAPI(
requestPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentType,
authNames);

if (response.statusCode >= 400) {
throw ApiException(response.statusCode, response.body);
} else {
return apiClient.deserialize(response.body, 'BarcodeResponseList')
return _apiClient.deserialize(response.body, 'BarcodeResponseList')
as BarcodeResponseList;
}
}
Expand Down Expand Up @@ -717,8 +726,15 @@ class BarcodeApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(requestPath, 'POST', queryParams,
postBody, headerParams, formParams, contentType, authNames);
final response = await _apiClient.invokeAPI(
requestPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentType,
authNames);

if (response.statusCode >= 400) {
throw ApiException(response.statusCode, response.body);
Expand Down Expand Up @@ -938,13 +954,13 @@ class BarcodeApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(requestPath, 'PUT', queryParams,
final response = await _apiClient.invokeAPI(requestPath, 'PUT', queryParams,
postBody, headerParams, formParams, contentType, authNames);

if (response.statusCode >= 400) {
throw ApiException(response.statusCode, response.body);
} else {
return apiClient.deserialize(response.body, 'ResultImageInfo')
return _apiClient.deserialize(response.body, 'ResultImageInfo')
as ResultImageInfo;
}
}
Expand Down Expand Up @@ -986,13 +1002,13 @@ class BarcodeApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(requestPath, 'PUT', queryParams,
final response = await _apiClient.invokeAPI(requestPath, 'PUT', queryParams,
postBody, headerParams, formParams, contentType, authNames);

if (response.statusCode >= 400) {
throw ApiException(response.statusCode, response.body);
} else {
return apiClient.deserialize(response.body, 'BarcodeResponseList')
return _apiClient.deserialize(response.body, 'BarcodeResponseList')
as BarcodeResponseList;
}
}
Expand Down Expand Up @@ -1034,13 +1050,13 @@ class BarcodeApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(requestPath, 'PUT', queryParams,
final response = await _apiClient.invokeAPI(requestPath, 'PUT', queryParams,
postBody, headerParams, formParams, contentType, authNames);

if (response.statusCode >= 400) {
throw ApiException(response.statusCode, response.body);
} else {
return apiClient.deserialize(response.body, 'ResultImageInfo')
return _apiClient.deserialize(response.body, 'ResultImageInfo')
as ResultImageInfo;
}
}
Expand Down
18 changes: 10 additions & 8 deletions lib/src/api/file_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import 'package:http/http.dart' show MultipartFile, MultipartRequest;
import '../../aspose_barcode_cloud.dart';
import '../api_helper.dart';

/// FileApi
class FileApi {
FileApi(this.apiClient);
/// Constructor
FileApi(this._apiClient);

final ApiClient apiClient;
final ApiClient _apiClient;

///
/// Copy file
Expand Down Expand Up @@ -50,7 +52,7 @@ class FileApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(requestPath, 'PUT', queryParams,
final response = await _apiClient.invokeAPI(requestPath, 'PUT', queryParams,
postBody, headerParams, formParams, contentType, authNames);

if (response.statusCode >= 400) {
Expand Down Expand Up @@ -92,7 +94,7 @@ class FileApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(
final response = await _apiClient.invokeAPI(
requestPath,
'DELETE',
queryParams,
Expand Down Expand Up @@ -141,7 +143,7 @@ class FileApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(requestPath, 'GET', queryParams,
final response = await _apiClient.invokeAPI(requestPath, 'GET', queryParams,
postBody, headerParams, formParams, contentType, authNames);

if (response.statusCode >= 400) {
Expand Down Expand Up @@ -191,7 +193,7 @@ class FileApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(requestPath, 'PUT', queryParams,
final response = await _apiClient.invokeAPI(requestPath, 'PUT', queryParams,
postBody, headerParams, formParams, contentType, authNames);

if (response.statusCode >= 400) {
Expand Down Expand Up @@ -246,13 +248,13 @@ class FileApi {
}
} else {}

final response = await apiClient.invokeAPI(requestPath, 'PUT', queryParams,
final response = await _apiClient.invokeAPI(requestPath, 'PUT', queryParams,
postBody, headerParams, formParams, contentType, authNames);

if (response.statusCode >= 400) {
throw ApiException(response.statusCode, response.body);
} else {
return apiClient.deserialize(response.body, 'FilesUploadResult')
return _apiClient.deserialize(response.body, 'FilesUploadResult')
as FilesUploadResult;
}
}
Expand Down
18 changes: 10 additions & 8 deletions lib/src/api/folder_api.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import '../../aspose_barcode_cloud.dart';
import '../api_helper.dart';

/// FolderApi
class FolderApi {
FolderApi(this.apiClient);
/// Constructor
FolderApi(this._apiClient);

final ApiClient apiClient;
final ApiClient _apiClient;

///
/// Copy folder
Expand Down Expand Up @@ -40,7 +42,7 @@ class FolderApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(requestPath, 'PUT', queryParams,
final response = await _apiClient.invokeAPI(requestPath, 'PUT', queryParams,
postBody, headerParams, formParams, contentType, authNames);

if (response.statusCode >= 400) {
Expand Down Expand Up @@ -77,7 +79,7 @@ class FolderApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(requestPath, 'PUT', queryParams,
final response = await _apiClient.invokeAPI(requestPath, 'PUT', queryParams,
postBody, headerParams, formParams, contentType, authNames);

if (response.statusCode >= 400) {
Expand Down Expand Up @@ -119,7 +121,7 @@ class FolderApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(
final response = await _apiClient.invokeAPI(
requestPath,
'DELETE',
queryParams,
Expand Down Expand Up @@ -163,13 +165,13 @@ class FolderApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(requestPath, 'GET', queryParams,
final response = await _apiClient.invokeAPI(requestPath, 'GET', queryParams,
postBody, headerParams, formParams, contentType, authNames);

if (response.statusCode >= 400) {
throw ApiException(response.statusCode, response.body);
} else {
return apiClient.deserialize(response.body, 'FilesList') as FilesList;
return _apiClient.deserialize(response.body, 'FilesList') as FilesList;
}
}

Expand Down Expand Up @@ -207,7 +209,7 @@ class FolderApi {
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
final List<String> authNames = ["JWT"];

final response = await apiClient.invokeAPI(requestPath, 'PUT', queryParams,
final response = await _apiClient.invokeAPI(requestPath, 'PUT', queryParams,
postBody, headerParams, formParams, contentType, authNames);

if (response.statusCode >= 400) {
Expand Down