Skip to content

Commit 00fac70

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents d0f9a02 + dacca66 commit 00fac70

File tree

11 files changed

+125
-73
lines changed

11 files changed

+125
-73
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [21.6.0] - Aspose Words Cloud for Dart 21.6 Release Notes
2+
3+
- Implemented beta version of CompareDocumentOnline feature with both document sending in request
4+
- CompareDocument method now can handle PDF files
5+
- AcceptAllRevisionsBeforeComparison option introduced which is used to specify if accept all revisions before comparison
6+
7+
18
## [21.5.0] - Aspose Words Cloud for Dart 21.5 Release Notes
29

310
- Update dependencies in sdk

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ node('words-linux') {
3535
}
3636

3737
if (needToBuild) {
38-
docker.image('google/dart:latest').inside {
38+
docker.image('google/dart:2.12.2').inside {
3939
stage('prepare'){
4040
sh "pub get"
4141
sh "pub global activate junitreport"

JenkinsfileRelease

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def runtests()
1515
}
1616
}
1717

18-
docker.image('google/dart:latest').inside {
18+
docker.image('google/dart:2.12.2').inside {
1919
stage('prepare'){
2020
sh "pub get"
2121
sh "pub global activate junitreport"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Add this dependency to your *pubspec.yaml*:
2727

2828
```yaml
2929
dependencies:
30-
aspose_words_cloud: 21.5.0
30+
aspose_words_cloud: 21.6.0
3131
```
3232
3333
## Getting Started

lib/src/api_client.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class ApiClient {
7575
final url = configuration.baseUrl + '/connect/token';
7676
final data = 'grant_type=client_credentials&client_id=${configuration.clientId}&client_secret=${configuration.clientSecret}';
7777
final headers = {'Content-Type' : 'application/x-www-form-urlencoded'};
78-
final response = await http.post(url, headers: headers, body: data);
78+
final response = await http.post(Uri.parse(url), headers: headers, body: data);
7979
if (response.statusCode == 400) {
8080
throw ApiException(response.statusCode, 'Invalid server credentials. Please check your ClientSecret and ClientId.');
8181
}
@@ -433,7 +433,7 @@ class ApiClient {
433433

434434
var httpRequest = http.Request(requestData.method, Uri.parse(requestData.url));
435435
httpRequest.headers['x-aspose-client'] = 'dart sdk';
436-
httpRequest.headers['x-aspose-client-version'] = '21.5';
436+
httpRequest.headers['x-aspose-client-version'] = '21.6';
437437
httpRequest.headers['Authorization'] = await _getAuthToken();
438438
if (requestData.headers != null) {
439439
httpRequest.headers.addAll(requestData.headers);

lib/src/models/compare_options.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ import '../../aspose_words_cloud.dart';
3131

3232
/// DTO container with compare documents options.
3333
class CompareOptions implements ModelBase {
34+
/// Gets or sets whether accept revisions before comparison or not.
35+
bool acceptAllRevisionsBeforeComparison;
36+
3437
/// Gets or sets a value indicating whether documents comparison is case insensitive. By default comparison is case sensitive.
3538
bool ignoreCaseChanges;
3639

@@ -64,6 +67,12 @@ class CompareOptions implements ModelBase {
6467
throw ApiException(400, 'Failed to deserialize CompareOptions data model.');
6568
}
6669

70+
if (json.containsKey('AcceptAllRevisionsBeforeComparison')) {
71+
acceptAllRevisionsBeforeComparison = json['AcceptAllRevisionsBeforeComparison'] as bool;
72+
} else {
73+
acceptAllRevisionsBeforeComparison = null;
74+
}
75+
6776
if (json.containsKey('IgnoreCaseChanges')) {
6877
ignoreCaseChanges = json['IgnoreCaseChanges'] as bool;
6978
} else {
@@ -126,6 +135,10 @@ class CompareOptions implements ModelBase {
126135
@override
127136
Map<String, dynamic> serialize() {
128137
var _result = <String, dynamic>{};
138+
if (acceptAllRevisionsBeforeComparison != null) {
139+
_result['AcceptAllRevisionsBeforeComparison'] = acceptAllRevisionsBeforeComparison;
140+
}
141+
129142
if (ignoreCaseChanges != null) {
130143
_result['IgnoreCaseChanges'] = ignoreCaseChanges;
131144
}

lib/src/requests/compare_document_online_request.dart

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ class CompareDocumentOnlineRequest implements RequestBase {
4141
/// Compare data.
4242
final CompareData compareData;
4343

44+
/// The comparing document.
45+
final ByteData comparingDocument;
46+
4447
/// Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
4548
final String loadEncoding;
4649

@@ -50,7 +53,7 @@ class CompareDocumentOnlineRequest implements RequestBase {
5053
/// Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
5154
final String destFileName;
5255

53-
CompareDocumentOnlineRequest(final this.document, final this.compareData, {final this.loadEncoding, final this.password, final this.destFileName});
56+
CompareDocumentOnlineRequest(final this.document, final this.compareData, {final this.comparingDocument, final this.loadEncoding, final this.password, final this.destFileName});
5457

5558
@override
5659
ApiRequestData createRequestData(final ApiClient _apiClient) {
@@ -84,6 +87,10 @@ class CompareDocumentOnlineRequest implements RequestBase {
8487
throw ApiException(400, 'Parameter compareData is required.');
8588
}
8689

90+
if (comparingDocument != null) {
91+
_bodyParts.add(ApiRequestPart(_apiClient.serializeBody(comparingDocument), 'application/octet-stream', name: 'ComparingDocument'));
92+
}
93+
8794
var _url = _apiClient.configuration.getApiRootUrl() + _apiClient.applyQueryParams(_path, _queryParams).replaceAll('//', '/');
8895
var _body = _apiClient.serializeBodyParts(_bodyParts, _headers);
8996
return ApiRequestData('PUT', _url, _headers, _body);

0 commit comments

Comments
 (0)