Skip to content

Commit 0ce1409

Browse files
SDK regenerated by CI server [ci skip]
1 parent 6e2d0ea commit 0ce1409

File tree

6 files changed

+44
-169
lines changed

6 files changed

+44
-169
lines changed

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ This repository contains Aspose.Words Cloud SDK for Swift source code. This SDK
1313
* Watermarks and protection
1414
* Full read & write access to Document Object Model, including sections, paragraphs, text, images, tables, headers/footers and many others
1515

16-
## Enhancements in Version 24.5
17-
18-
- Added an url parameter to InsertImage / UpdateImage methods. It allows to link to an image from a web URL.
19-
20-
2116
## Enhancements in Version 24.4
2217

2318
- Added the 'MergeWithNext' method to merge a section with the next one.

Sources/AsposeWordsCloud/Model/Requests/InsertDrawingObjectOnlineRequest.swift

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ import Foundation
3232
public class InsertDrawingObjectOnlineRequest : WordsApiRequest {
3333
private let document : InputStream;
3434
private let drawingObject : DrawingObjectInsert;
35+
private let imageFile : InputStream;
3536
private let nodePath : String?;
36-
private let imageFile : InputStream?;
37-
private let url : String?;
3837
private let loadEncoding : String?;
3938
private let password : String?;
4039
private let encryptedPassword : String?;
@@ -45,9 +44,8 @@ public class InsertDrawingObjectOnlineRequest : WordsApiRequest {
4544
private enum CodingKeys: String, CodingKey {
4645
case document;
4746
case drawingObject;
48-
case nodePath;
4947
case imageFile;
50-
case url;
48+
case nodePath;
5149
case loadEncoding;
5250
case password;
5351
case encryptedPassword;
@@ -58,12 +56,11 @@ public class InsertDrawingObjectOnlineRequest : WordsApiRequest {
5856
}
5957

6058
// Initializes a new instance of the InsertDrawingObjectOnlineRequest class.
61-
public init(document : InputStream, drawingObject : DrawingObjectInsert, nodePath : String? = nil, imageFile : InputStream? = nil, url : String? = nil, loadEncoding : String? = nil, password : String? = nil, encryptedPassword : String? = nil, destFileName : String? = nil, revisionAuthor : String? = nil, revisionDateTime : String? = nil) {
59+
public init(document : InputStream, drawingObject : DrawingObjectInsert, imageFile : InputStream, nodePath : String? = nil, loadEncoding : String? = nil, password : String? = nil, encryptedPassword : String? = nil, destFileName : String? = nil, revisionAuthor : String? = nil, revisionDateTime : String? = nil) {
6260
self.document = document;
6361
self.drawingObject = drawingObject;
64-
self.nodePath = nodePath;
6562
self.imageFile = imageFile;
66-
self.url = url;
63+
self.nodePath = nodePath;
6764
self.loadEncoding = loadEncoding;
6865
self.password = password;
6966
self.encryptedPassword = encryptedPassword;
@@ -82,19 +79,14 @@ public class InsertDrawingObjectOnlineRequest : WordsApiRequest {
8279
return self.drawingObject;
8380
}
8481

85-
// The path to the node in the document tree.
86-
public func getNodePath() -> String? {
87-
return self.nodePath;
88-
}
89-
9082
// File with image.
91-
public func getImageFile() -> InputStream? {
83+
public func getImageFile() -> InputStream {
9284
return self.imageFile;
9385
}
9486

95-
// The link to the image.
96-
public func getUrl() -> String? {
97-
return self.url;
87+
// The path to the node in the document tree.
88+
public func getNodePath() -> String? {
89+
return self.nodePath;
9890
}
9991

10092
// Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
@@ -142,18 +134,6 @@ public class InsertDrawingObjectOnlineRequest : WordsApiRequest {
142134
let urlPath = (try configuration.getApiRootUrl()).appendingPathComponent(rawPath);
143135
var urlBuilder = URLComponents(url: urlPath, resolvingAgainstBaseURL: false)!;
144136
var queryItems : [URLQueryItem] = [];
145-
if (self.getUrl() != nil) {
146-
147-
#if os(Linux)
148-
queryItems.append(URLQueryItem(name: "url", value: try ObjectSerializer.serializeToString(value: self.getUrl()!)));
149-
150-
#else
151-
queryItems.append(URLQueryItem(name: "url", value: try ObjectSerializer.serializeToString(value: self.getUrl()!)));
152-
153-
#endif
154-
}
155-
156-
157137
if (self.getLoadEncoding() != nil) {
158138

159139
#if os(Linux)
@@ -236,9 +216,7 @@ public class InsertDrawingObjectOnlineRequest : WordsApiRequest {
236216
self.getDrawingObject().collectFilesContent(&requestFilesContent);
237217
try self.getDrawingObject().validate();
238218

239-
if (self.getImageFile() != nil) {
240-
formParams.append(RequestFormParam(name: "imageFile", body: try ObjectSerializer.serializeFile(value: self.getImageFile()!), contentType: "application/octet-stream"));
241-
}
219+
formParams.append(RequestFormParam(name: "imageFile", body: try ObjectSerializer.serializeFile(value: self.getImageFile()), contentType: "application/octet-stream"));
242220

243221
try apiInvoker.prepareFilesContent(&requestFilesContent);
244222
for requestFileReference in requestFilesContent {

Sources/AsposeWordsCloud/Model/Requests/InsertDrawingObjectRequest.swift

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ import Foundation
3232
public class InsertDrawingObjectRequest : WordsApiRequest {
3333
private let name : String;
3434
private let drawingObject : DrawingObjectInsert;
35+
private let imageFile : InputStream;
3536
private let nodePath : String?;
36-
private let imageFile : InputStream?;
37-
private let url : String?;
3837
private let folder : String?;
3938
private let storage : String?;
4039
private let loadEncoding : String?;
@@ -47,9 +46,8 @@ public class InsertDrawingObjectRequest : WordsApiRequest {
4746
private enum CodingKeys: String, CodingKey {
4847
case name;
4948
case drawingObject;
50-
case nodePath;
5149
case imageFile;
52-
case url;
50+
case nodePath;
5351
case folder;
5452
case storage;
5553
case loadEncoding;
@@ -62,12 +60,11 @@ public class InsertDrawingObjectRequest : WordsApiRequest {
6260
}
6361

6462
// Initializes a new instance of the InsertDrawingObjectRequest class.
65-
public init(name : String, drawingObject : DrawingObjectInsert, nodePath : String? = nil, imageFile : InputStream? = nil, url : String? = nil, folder : String? = nil, storage : String? = nil, loadEncoding : String? = nil, password : String? = nil, encryptedPassword : String? = nil, destFileName : String? = nil, revisionAuthor : String? = nil, revisionDateTime : String? = nil) {
63+
public init(name : String, drawingObject : DrawingObjectInsert, imageFile : InputStream, nodePath : String? = nil, folder : String? = nil, storage : String? = nil, loadEncoding : String? = nil, password : String? = nil, encryptedPassword : String? = nil, destFileName : String? = nil, revisionAuthor : String? = nil, revisionDateTime : String? = nil) {
6664
self.name = name;
6765
self.drawingObject = drawingObject;
68-
self.nodePath = nodePath;
6966
self.imageFile = imageFile;
70-
self.url = url;
67+
self.nodePath = nodePath;
7168
self.folder = folder;
7269
self.storage = storage;
7370
self.loadEncoding = loadEncoding;
@@ -88,19 +85,14 @@ public class InsertDrawingObjectRequest : WordsApiRequest {
8885
return self.drawingObject;
8986
}
9087

91-
// The path to the node in the document tree.
92-
public func getNodePath() -> String? {
93-
return self.nodePath;
94-
}
95-
9688
// File with image.
97-
public func getImageFile() -> InputStream? {
89+
public func getImageFile() -> InputStream {
9890
return self.imageFile;
9991
}
10092

101-
// The link to the image.
102-
public func getUrl() -> String? {
103-
return self.url;
93+
// The path to the node in the document tree.
94+
public func getNodePath() -> String? {
95+
return self.nodePath;
10496
}
10597

10698
// Original document folder.
@@ -160,18 +152,6 @@ public class InsertDrawingObjectRequest : WordsApiRequest {
160152
let urlPath = (try configuration.getApiRootUrl()).appendingPathComponent(rawPath);
161153
var urlBuilder = URLComponents(url: urlPath, resolvingAgainstBaseURL: false)!;
162154
var queryItems : [URLQueryItem] = [];
163-
if (self.getUrl() != nil) {
164-
165-
#if os(Linux)
166-
queryItems.append(URLQueryItem(name: "url", value: try ObjectSerializer.serializeToString(value: self.getUrl()!)));
167-
168-
#else
169-
queryItems.append(URLQueryItem(name: "url", value: try ObjectSerializer.serializeToString(value: self.getUrl()!)));
170-
171-
#endif
172-
}
173-
174-
175155
if (self.getFolder() != nil) {
176156

177157
#if os(Linux)
@@ -276,9 +256,7 @@ public class InsertDrawingObjectRequest : WordsApiRequest {
276256
self.getDrawingObject().collectFilesContent(&requestFilesContent);
277257
try self.getDrawingObject().validate();
278258

279-
if (self.getImageFile() != nil) {
280-
formParams.append(RequestFormParam(name: "imageFile", body: try ObjectSerializer.serializeFile(value: self.getImageFile()!), contentType: "application/octet-stream"));
281-
}
259+
formParams.append(RequestFormParam(name: "imageFile", body: try ObjectSerializer.serializeFile(value: self.getImageFile()), contentType: "application/octet-stream"));
282260

283261
try apiInvoker.prepareFilesContent(&requestFilesContent);
284262
for requestFileReference in requestFilesContent {

Sources/AsposeWordsCloud/Model/Requests/UpdateDrawingObjectOnlineRequest.swift

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ import Foundation
3232
public class UpdateDrawingObjectOnlineRequest : WordsApiRequest {
3333
private let document : InputStream;
3434
private let drawingObject : DrawingObjectUpdate;
35+
private let imageFile : InputStream;
3536
private let index : Int;
3637
private let nodePath : String?;
37-
private let imageFile : InputStream?;
38-
private let url : String?;
3938
private let loadEncoding : String?;
4039
private let password : String?;
4140
private let encryptedPassword : String?;
@@ -46,10 +45,9 @@ public class UpdateDrawingObjectOnlineRequest : WordsApiRequest {
4645
private enum CodingKeys: String, CodingKey {
4746
case document;
4847
case drawingObject;
48+
case imageFile;
4949
case index;
5050
case nodePath;
51-
case imageFile;
52-
case url;
5351
case loadEncoding;
5452
case password;
5553
case encryptedPassword;
@@ -60,13 +58,12 @@ public class UpdateDrawingObjectOnlineRequest : WordsApiRequest {
6058
}
6159

6260
// Initializes a new instance of the UpdateDrawingObjectOnlineRequest class.
63-
public init(document : InputStream, drawingObject : DrawingObjectUpdate, index : Int, nodePath : String? = nil, imageFile : InputStream? = nil, url : String? = nil, loadEncoding : String? = nil, password : String? = nil, encryptedPassword : String? = nil, destFileName : String? = nil, revisionAuthor : String? = nil, revisionDateTime : String? = nil) {
61+
public init(document : InputStream, drawingObject : DrawingObjectUpdate, imageFile : InputStream, index : Int, nodePath : String? = nil, loadEncoding : String? = nil, password : String? = nil, encryptedPassword : String? = nil, destFileName : String? = nil, revisionAuthor : String? = nil, revisionDateTime : String? = nil) {
6462
self.document = document;
6563
self.drawingObject = drawingObject;
64+
self.imageFile = imageFile;
6665
self.index = index;
6766
self.nodePath = nodePath;
68-
self.imageFile = imageFile;
69-
self.url = url;
7067
self.loadEncoding = loadEncoding;
7168
self.password = password;
7269
self.encryptedPassword = encryptedPassword;
@@ -85,6 +82,11 @@ public class UpdateDrawingObjectOnlineRequest : WordsApiRequest {
8582
return self.drawingObject;
8683
}
8784

85+
// File with image.
86+
public func getImageFile() -> InputStream {
87+
return self.imageFile;
88+
}
89+
8890
// Object index.
8991
public func getIndex() -> Int {
9092
return self.index;
@@ -95,16 +97,6 @@ public class UpdateDrawingObjectOnlineRequest : WordsApiRequest {
9597
return self.nodePath;
9698
}
9799

98-
// File with image.
99-
public func getImageFile() -> InputStream? {
100-
return self.imageFile;
101-
}
102-
103-
// The link to the image.
104-
public func getUrl() -> String? {
105-
return self.url;
106-
}
107-
108100
// Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
109101
public func getLoadEncoding() -> String? {
110102
return self.loadEncoding;
@@ -152,18 +144,6 @@ public class UpdateDrawingObjectOnlineRequest : WordsApiRequest {
152144
let urlPath = (try configuration.getApiRootUrl()).appendingPathComponent(rawPath);
153145
var urlBuilder = URLComponents(url: urlPath, resolvingAgainstBaseURL: false)!;
154146
var queryItems : [URLQueryItem] = [];
155-
if (self.getUrl() != nil) {
156-
157-
#if os(Linux)
158-
queryItems.append(URLQueryItem(name: "url", value: try ObjectSerializer.serializeToString(value: self.getUrl()!)));
159-
160-
#else
161-
queryItems.append(URLQueryItem(name: "url", value: try ObjectSerializer.serializeToString(value: self.getUrl()!)));
162-
163-
#endif
164-
}
165-
166-
167147
if (self.getLoadEncoding() != nil) {
168148

169149
#if os(Linux)
@@ -246,9 +226,7 @@ public class UpdateDrawingObjectOnlineRequest : WordsApiRequest {
246226
self.getDrawingObject().collectFilesContent(&requestFilesContent);
247227
try self.getDrawingObject().validate();
248228

249-
if (self.getImageFile() != nil) {
250-
formParams.append(RequestFormParam(name: "imageFile", body: try ObjectSerializer.serializeFile(value: self.getImageFile()!), contentType: "application/octet-stream"));
251-
}
229+
formParams.append(RequestFormParam(name: "imageFile", body: try ObjectSerializer.serializeFile(value: self.getImageFile()), contentType: "application/octet-stream"));
252230

253231
try apiInvoker.prepareFilesContent(&requestFilesContent);
254232
for requestFileReference in requestFilesContent {

Sources/AsposeWordsCloud/Model/Requests/UpdateDrawingObjectRequest.swift

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ import Foundation
3232
public class UpdateDrawingObjectRequest : WordsApiRequest {
3333
private let name : String;
3434
private let drawingObject : DrawingObjectUpdate;
35+
private let imageFile : InputStream;
3536
private let index : Int;
3637
private let nodePath : String?;
37-
private let imageFile : InputStream?;
38-
private let url : String?;
3938
private let folder : String?;
4039
private let storage : String?;
4140
private let loadEncoding : String?;
@@ -48,10 +47,9 @@ public class UpdateDrawingObjectRequest : WordsApiRequest {
4847
private enum CodingKeys: String, CodingKey {
4948
case name;
5049
case drawingObject;
50+
case imageFile;
5151
case index;
5252
case nodePath;
53-
case imageFile;
54-
case url;
5553
case folder;
5654
case storage;
5755
case loadEncoding;
@@ -64,13 +62,12 @@ public class UpdateDrawingObjectRequest : WordsApiRequest {
6462
}
6563

6664
// Initializes a new instance of the UpdateDrawingObjectRequest class.
67-
public init(name : String, drawingObject : DrawingObjectUpdate, index : Int, nodePath : String? = nil, imageFile : InputStream? = nil, url : String? = nil, folder : String? = nil, storage : String? = nil, loadEncoding : String? = nil, password : String? = nil, encryptedPassword : String? = nil, destFileName : String? = nil, revisionAuthor : String? = nil, revisionDateTime : String? = nil) {
65+
public init(name : String, drawingObject : DrawingObjectUpdate, imageFile : InputStream, index : Int, nodePath : String? = nil, folder : String? = nil, storage : String? = nil, loadEncoding : String? = nil, password : String? = nil, encryptedPassword : String? = nil, destFileName : String? = nil, revisionAuthor : String? = nil, revisionDateTime : String? = nil) {
6866
self.name = name;
6967
self.drawingObject = drawingObject;
68+
self.imageFile = imageFile;
7069
self.index = index;
7170
self.nodePath = nodePath;
72-
self.imageFile = imageFile;
73-
self.url = url;
7471
self.folder = folder;
7572
self.storage = storage;
7673
self.loadEncoding = loadEncoding;
@@ -91,6 +88,11 @@ public class UpdateDrawingObjectRequest : WordsApiRequest {
9188
return self.drawingObject;
9289
}
9390

91+
// File with image.
92+
public func getImageFile() -> InputStream {
93+
return self.imageFile;
94+
}
95+
9496
// Object index.
9597
public func getIndex() -> Int {
9698
return self.index;
@@ -101,16 +103,6 @@ public class UpdateDrawingObjectRequest : WordsApiRequest {
101103
return self.nodePath;
102104
}
103105

104-
// File with image.
105-
public func getImageFile() -> InputStream? {
106-
return self.imageFile;
107-
}
108-
109-
// The link to the image.
110-
public func getUrl() -> String? {
111-
return self.url;
112-
}
113-
114106
// Original document folder.
115107
public func getFolder() -> String? {
116108
return self.folder;
@@ -170,18 +162,6 @@ public class UpdateDrawingObjectRequest : WordsApiRequest {
170162
let urlPath = (try configuration.getApiRootUrl()).appendingPathComponent(rawPath);
171163
var urlBuilder = URLComponents(url: urlPath, resolvingAgainstBaseURL: false)!;
172164
var queryItems : [URLQueryItem] = [];
173-
if (self.getUrl() != nil) {
174-
175-
#if os(Linux)
176-
queryItems.append(URLQueryItem(name: "url", value: try ObjectSerializer.serializeToString(value: self.getUrl()!)));
177-
178-
#else
179-
queryItems.append(URLQueryItem(name: "url", value: try ObjectSerializer.serializeToString(value: self.getUrl()!)));
180-
181-
#endif
182-
}
183-
184-
185165
if (self.getFolder() != nil) {
186166

187167
#if os(Linux)
@@ -286,9 +266,7 @@ public class UpdateDrawingObjectRequest : WordsApiRequest {
286266
self.getDrawingObject().collectFilesContent(&requestFilesContent);
287267
try self.getDrawingObject().validate();
288268

289-
if (self.getImageFile() != nil) {
290-
formParams.append(RequestFormParam(name: "imageFile", body: try ObjectSerializer.serializeFile(value: self.getImageFile()!), contentType: "application/octet-stream"));
291-
}
269+
formParams.append(RequestFormParam(name: "imageFile", body: try ObjectSerializer.serializeFile(value: self.getImageFile()), contentType: "application/octet-stream"));
292270

293271
try apiInvoker.prepareFilesContent(&requestFilesContent);
294272
for requestFileReference in requestFilesContent {

0 commit comments

Comments
 (0)