aspose_html_cloud 20.8.0 → 22.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aspose_html_cloud/api/html_api.rb +210 -2096
- data/lib/aspose_html_cloud/api/storage_api.rb +32 -332
- data/lib/aspose_html_cloud/api_client.rb +3 -3
- data/lib/aspose_html_cloud/api_error.rb +1 -1
- data/lib/aspose_html_cloud/configuration.rb +1 -1
- data/lib/aspose_html_cloud/models/base_model.rb +1 -1
- data/lib/aspose_html_cloud/models/conversion_result.rb +140 -0
- data/lib/aspose_html_cloud/models/disc_usage.rb +1 -1
- data/lib/aspose_html_cloud/models/error.rb +1 -1
- data/lib/aspose_html_cloud/models/error_details.rb +1 -1
- data/lib/aspose_html_cloud/models/file_version.rb +1 -1
- data/lib/aspose_html_cloud/models/file_versions.rb +1 -1
- data/lib/aspose_html_cloud/models/files_list.rb +1 -1
- data/lib/aspose_html_cloud/models/files_upload_result.rb +1 -1
- data/lib/aspose_html_cloud/models/object_exist.rb +1 -1
- data/lib/aspose_html_cloud/models/storage_exist.rb +1 -1
- data/lib/aspose_html_cloud/models/storage_file.rb +1 -1
- data/lib/aspose_html_cloud/version.rb +1 -1
- data/lib/aspose_html_cloud.rb +2 -1
- data/spec/api/html_api_spec.rb +221 -2285
- data/spec/api/model_spec.rb +1 -1
- data/spec/api/storage_api_spec.rb +5 -233
- data/spec/spec_helper.rb +7 -8
- metadata +19 -18
@@ -3,7 +3,7 @@
|
|
3
3
|
--------------------------------------------------------------------------------------------------------------------
|
4
4
|
<copyright company="Aspose" file="storage_api.rb">
|
5
5
|
</copyright>
|
6
|
-
Copyright (c)
|
6
|
+
Copyright (c) 2022 Aspose.HTML for Cloud
|
7
7
|
<summary>
|
8
8
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
9
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -49,7 +49,7 @@ module AsposeHtml
|
|
49
49
|
data
|
50
50
|
end
|
51
51
|
|
52
|
-
|
52
|
+
# Get disc usage
|
53
53
|
# @param [Hash] opts the optional parameters
|
54
54
|
# @option opts [String] :storage_name Storage name
|
55
55
|
# @return [Array<(DiscUsage, Fixnum, Hash)>] DiscUsage data, response status code and response headers
|
@@ -88,61 +88,8 @@ module AsposeHtml
|
|
88
88
|
return data, status_code, headers
|
89
89
|
end
|
90
90
|
|
91
|
-
# Get file versions
|
92
|
-
# @param path File path e.g. '/file.ext'
|
93
|
-
# @param [Hash] opts the optional parameters
|
94
|
-
# @option opts [String] :storage_name Storage name
|
95
|
-
# @return [FileVersions]
|
96
|
-
def get_file_versions(path, opts = {})
|
97
|
-
data, _status_code, _headers = get_file_versions_with_http_info(path, opts)
|
98
|
-
data
|
99
|
-
end
|
100
|
-
|
101
|
-
# Get file versions
|
102
|
-
# @param path File path e.g. '/file.ext'
|
103
|
-
# @param [Hash] opts the optional parameters
|
104
|
-
# @option opts [String] :storage_name Storage name
|
105
|
-
# @return [Array<(FileVersions, Fixnum, Hash)>] FileVersions data, response status code and response headers
|
106
|
-
def get_file_versions_with_http_info(path, opts = {})
|
107
|
-
if @api_client.config.debug
|
108
|
-
@api_client.config.logger.debug 'Calling API: StorageApi.get_file_versions ...'
|
109
|
-
end
|
110
|
-
# verify the required parameter 'path' is set
|
111
|
-
if @api_client.config.client_side_validation && path.nil?
|
112
|
-
fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.get_file_versions"
|
113
|
-
end
|
114
|
-
# resource path
|
115
|
-
local_var_path = '/html/storage/version/{path}'.sub('{' + 'path' + '}', path.to_s)
|
116
|
-
|
117
|
-
# query parameters
|
118
|
-
query_params = {}
|
119
|
-
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
120
91
|
|
121
|
-
|
122
|
-
header_params = {}
|
123
|
-
# HTTP header 'Accept' (if needed)
|
124
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
125
|
-
# HTTP header 'Content-Type'
|
126
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
127
|
-
|
128
|
-
# form parameters
|
129
|
-
form_params = {}
|
130
|
-
|
131
|
-
# http body (model)
|
132
|
-
post_body = nil
|
133
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
134
|
-
:header_params => header_params,
|
135
|
-
:query_params => query_params,
|
136
|
-
:form_params => form_params,
|
137
|
-
:body => post_body,
|
138
|
-
:return_type => 'FileVersions')
|
139
|
-
if @api_client.config.debug
|
140
|
-
@api_client.config.logger.debug "API called: StorageApi#get_file_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
141
|
-
end
|
142
|
-
return data, status_code, headers
|
143
|
-
end
|
144
|
-
|
145
|
-
# Check if file or folder exists
|
92
|
+
# Check if file or folder exists
|
146
93
|
# @param path File or folder path e.g. '/file.ext' or '/folder'
|
147
94
|
# @param [Hash] opts the optional parameters
|
148
95
|
# @option opts [String] :storage_name Storage name
|
@@ -153,7 +100,7 @@ module AsposeHtml
|
|
153
100
|
data
|
154
101
|
end
|
155
102
|
|
156
|
-
|
103
|
+
# Check if file or folder exists
|
157
104
|
# @param path File or folder path e.g. '/file.ext' or '/folder'
|
158
105
|
# @param [Hash] opts the optional parameters
|
159
106
|
# @option opts [String] :storage_name Storage name
|
@@ -168,10 +115,11 @@ module AsposeHtml
|
|
168
115
|
fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.object_exists"
|
169
116
|
end
|
170
117
|
# resource path
|
171
|
-
local_var_path = '/html/storage/exist
|
118
|
+
local_var_path = '/html/storage/exist'
|
172
119
|
|
173
120
|
# query parameters
|
174
121
|
query_params = {}
|
122
|
+
query_params[:'path'] = path.to_s
|
175
123
|
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
176
124
|
query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?
|
177
125
|
|
@@ -199,7 +147,7 @@ module AsposeHtml
|
|
199
147
|
return data, status_code, headers
|
200
148
|
end
|
201
149
|
|
202
|
-
|
150
|
+
# Check if storage exists
|
203
151
|
# @param storage_name Storage name
|
204
152
|
# @param [Hash] opts the optional parameters
|
205
153
|
# @return [StorageExist]
|
@@ -208,7 +156,7 @@ module AsposeHtml
|
|
208
156
|
data
|
209
157
|
end
|
210
158
|
|
211
|
-
|
159
|
+
# Check if storage exists
|
212
160
|
# @param storage_name Storage name
|
213
161
|
# @param [Hash] opts the optional parameters
|
214
162
|
# @return [Array<(StorageExist, Fixnum, Hash)>] StorageExist data, response status code and response headers
|
@@ -221,12 +169,13 @@ module AsposeHtml
|
|
221
169
|
fail ArgumentError, "Missing the required parameter 'storage_name' when calling StorageApi.storage_exists"
|
222
170
|
end
|
223
171
|
# resource path
|
224
|
-
local_var_path = '/html/storage/
|
172
|
+
local_var_path = '/html/storage/exist/storage'
|
225
173
|
|
226
174
|
# query parameters
|
227
175
|
query_params = {}
|
176
|
+
query_params[:'storageName'] = storage_name.to_s
|
228
177
|
|
229
|
-
|
178
|
+
# header parameters
|
230
179
|
header_params = {}
|
231
180
|
# HTTP header 'Accept' (if needed)
|
232
181
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
@@ -254,73 +203,6 @@ module AsposeHtml
|
|
254
203
|
# File Api
|
255
204
|
################################################################################
|
256
205
|
|
257
|
-
# Copy file
|
258
|
-
# @param src_path Source file path e.g. '/folder/file.ext'
|
259
|
-
# @param dest_path Destination file path
|
260
|
-
# @param [Hash] opts the optional parameters
|
261
|
-
# @option opts [String] :src_storage_name Source storage name
|
262
|
-
# @option opts [String] :dest_storage_name Destination storage name
|
263
|
-
# @option opts [String] :version_id File version ID to copy
|
264
|
-
# @return [nil]
|
265
|
-
def copy_file(src_path, dest_path, opts = {})
|
266
|
-
copy_file_with_http_info(src_path, dest_path, opts)
|
267
|
-
nil
|
268
|
-
end
|
269
|
-
|
270
|
-
# Copy file
|
271
|
-
# @param src_path Source file path e.g. '/folder/file.ext'
|
272
|
-
# @param dest_path Destination file path
|
273
|
-
# @param [Hash] opts the optional parameters
|
274
|
-
# @option opts [String] :src_storage_name Source storage name
|
275
|
-
# @option opts [String] :dest_storage_name Destination storage name
|
276
|
-
# @option opts [String] :version_id File version ID to copy
|
277
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
278
|
-
def copy_file_with_http_info(src_path, dest_path, opts = {})
|
279
|
-
if @api_client.config.debug
|
280
|
-
@api_client.config.logger.debug 'Calling API: StorageApi.copy_file ...'
|
281
|
-
end
|
282
|
-
# verify the required parameter 'src_path' is set
|
283
|
-
if @api_client.config.client_side_validation && src_path.nil?
|
284
|
-
fail ArgumentError, "Missing the required parameter 'src_path' when calling StorageApi.copy_file"
|
285
|
-
end
|
286
|
-
# verify the required parameter 'dest_path' is set
|
287
|
-
if @api_client.config.client_side_validation && dest_path.nil?
|
288
|
-
fail ArgumentError, "Missing the required parameter 'dest_path' when calling StorageApi.copy_file"
|
289
|
-
end
|
290
|
-
# resource path
|
291
|
-
local_var_path = '/html/storage/file/copy/{srcPath}'.sub('{' + 'srcPath' + '}', src_path.to_s)
|
292
|
-
|
293
|
-
# query parameters
|
294
|
-
query_params = {}
|
295
|
-
query_params[:'destPath'] = dest_path
|
296
|
-
query_params[:'srcStorageName'] = opts[:'src_storage_name'] if !opts[:'src_storage_name'].nil?
|
297
|
-
query_params[:'destStorageName'] = opts[:'dest_storage_name'] if !opts[:'dest_storage_name'].nil?
|
298
|
-
query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?
|
299
|
-
|
300
|
-
# header parameters
|
301
|
-
header_params = {}
|
302
|
-
# HTTP header 'Accept' (if needed)
|
303
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
304
|
-
# HTTP header 'Content-Type'
|
305
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
306
|
-
|
307
|
-
# form parameters
|
308
|
-
form_params = {}
|
309
|
-
|
310
|
-
# http body (model)
|
311
|
-
post_body = nil
|
312
|
-
|
313
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
314
|
-
:header_params => header_params,
|
315
|
-
:query_params => query_params,
|
316
|
-
:form_params => form_params,
|
317
|
-
:body => post_body)
|
318
|
-
if @api_client.config.debug
|
319
|
-
@api_client.config.logger.debug "API called: StorageApi#copy_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
320
|
-
end
|
321
|
-
return data, status_code, headers
|
322
|
-
end
|
323
|
-
|
324
206
|
# Delete file
|
325
207
|
# @param path File path e.g. '/folder/file.ext'
|
326
208
|
# @param [Hash] opts the optional parameters
|
@@ -347,10 +229,11 @@ module AsposeHtml
|
|
347
229
|
fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.delete_file"
|
348
230
|
end
|
349
231
|
# resource path
|
350
|
-
local_var_path = '/html/
|
232
|
+
local_var_path = '/html/file'
|
351
233
|
|
352
234
|
# query parameters
|
353
235
|
query_params = {}
|
236
|
+
query_params[:'path'] = path.to_s
|
354
237
|
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
355
238
|
query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?
|
356
239
|
|
@@ -403,10 +286,11 @@ module AsposeHtml
|
|
403
286
|
fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.download_file"
|
404
287
|
end
|
405
288
|
# resource path
|
406
|
-
local_var_path = '/html/
|
289
|
+
local_var_path = '/html/file'
|
407
290
|
|
408
291
|
# query parameters
|
409
292
|
query_params = {}
|
293
|
+
query_params[:'path'] = path.to_s
|
410
294
|
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
411
295
|
query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?
|
412
296
|
|
@@ -435,71 +319,6 @@ module AsposeHtml
|
|
435
319
|
return data, status_code, headers
|
436
320
|
end
|
437
321
|
|
438
|
-
# Move file
|
439
|
-
# @param src_path Source file path e.g. '/src.ext'
|
440
|
-
# @param dest_path Destination file path e.g. '/dest.ext'
|
441
|
-
# @param [Hash] opts the optional parameters
|
442
|
-
# @option opts [String] :src_storage_name Source storage name
|
443
|
-
# @option opts [String] :dest_storage_name Destination storage name
|
444
|
-
# @option opts [String] :version_id File version ID to move
|
445
|
-
# @return [nil]
|
446
|
-
def move_file(src_path, dest_path, opts = {})
|
447
|
-
move_file_with_http_info(src_path, dest_path, opts)
|
448
|
-
nil
|
449
|
-
end
|
450
|
-
|
451
|
-
# Move file
|
452
|
-
# @param src_path Source file path e.g. '/src.ext'
|
453
|
-
# @param dest_path Destination file path e.g. '/dest.ext'
|
454
|
-
# @param [Hash] opts the optional parameters
|
455
|
-
# @option opts [String] :src_storage_name Source storage name
|
456
|
-
# @option opts [String] :dest_storage_name Destination storage name
|
457
|
-
# @option opts [String] :version_id File version ID to move
|
458
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
459
|
-
def move_file_with_http_info(src_path, dest_path, opts = {})
|
460
|
-
if @api_client.config.debug
|
461
|
-
@api_client.config.logger.debug 'Calling API: StorageApi.move_file ...'
|
462
|
-
end
|
463
|
-
# verify the required parameter 'src_path' is set
|
464
|
-
if @api_client.config.client_side_validation && src_path.nil?
|
465
|
-
fail ArgumentError, "Missing the required parameter 'src_path' when calling StorageApi.move_file"
|
466
|
-
end
|
467
|
-
# verify the required parameter 'dest_path' is set
|
468
|
-
if @api_client.config.client_side_validation && dest_path.nil?
|
469
|
-
fail ArgumentError, "Missing the required parameter 'dest_path' when calling StorageApi.move_file"
|
470
|
-
end
|
471
|
-
# resource path
|
472
|
-
local_var_path = '/html/storage/file/move/{srcPath}'.sub('{' + 'srcPath' + '}', src_path.to_s)
|
473
|
-
|
474
|
-
# query parameters
|
475
|
-
query_params = {}
|
476
|
-
query_params[:'destPath'] = dest_path
|
477
|
-
query_params[:'srcStorageName'] = opts[:'src_storage_name'] if !opts[:'src_storage_name'].nil?
|
478
|
-
query_params[:'destStorageName'] = opts[:'dest_storage_name'] if !opts[:'dest_storage_name'].nil?
|
479
|
-
query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?
|
480
|
-
|
481
|
-
# header parameters
|
482
|
-
header_params = {}
|
483
|
-
# HTTP header 'Accept' (if needed)
|
484
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
485
|
-
# HTTP header 'Content-Type'
|
486
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
487
|
-
|
488
|
-
# form parameters
|
489
|
-
form_params = {}
|
490
|
-
|
491
|
-
# http body (model)
|
492
|
-
post_body = nil
|
493
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
494
|
-
:header_params => header_params,
|
495
|
-
:query_params => query_params,
|
496
|
-
:form_params => form_params,
|
497
|
-
:body => post_body)
|
498
|
-
if @api_client.config.debug
|
499
|
-
@api_client.config.logger.debug "API called: StorageApi#move_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
500
|
-
end
|
501
|
-
return data, status_code, headers
|
502
|
-
end
|
503
322
|
|
504
323
|
# Upload file
|
505
324
|
# @param path Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header.
|
@@ -531,10 +350,11 @@ module AsposeHtml
|
|
531
350
|
fail ArgumentError, "Missing the required parameter 'file' when calling StorageApi.upload_file"
|
532
351
|
end
|
533
352
|
# resource path
|
534
|
-
local_var_path = '/html/
|
353
|
+
local_var_path = '/html/file'
|
535
354
|
|
536
355
|
# query parameters
|
537
356
|
query_params = {}
|
357
|
+
query_params[:'path'] = path.to_s
|
538
358
|
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
539
359
|
|
540
360
|
# header parameters
|
@@ -542,16 +362,15 @@ module AsposeHtml
|
|
542
362
|
# HTTP header 'Accept' (if needed)
|
543
363
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
544
364
|
# HTTP header 'Content-Type'
|
545
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
546
|
-
['application/octet-stream'])
|
365
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
547
366
|
|
548
367
|
# form parameters
|
549
368
|
form_params = {}
|
550
|
-
|
369
|
+
form_params['file'] = File.new(file)
|
551
370
|
# http body (model)
|
552
|
-
post_body =
|
371
|
+
post_body = nil
|
553
372
|
|
554
|
-
data, status_code, headers = @api_client.call_api(:
|
373
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
555
374
|
:header_params => header_params,
|
556
375
|
:query_params => query_params,
|
557
376
|
:form_params => form_params,
|
@@ -560,6 +379,10 @@ module AsposeHtml
|
|
560
379
|
if @api_client.config.debug
|
561
380
|
@api_client.config.logger.debug "API called: StorageApi#upload_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
562
381
|
end
|
382
|
+
|
383
|
+
if status_code != 200
|
384
|
+
fail ArgumentError, "Unable upload file"
|
385
|
+
end
|
563
386
|
return data, status_code, headers
|
564
387
|
end
|
565
388
|
|
@@ -567,69 +390,6 @@ module AsposeHtml
|
|
567
390
|
# Folder Api
|
568
391
|
################################################################################
|
569
392
|
|
570
|
-
# Copy folder
|
571
|
-
# @param src_path Source folder path e.g. '/src'
|
572
|
-
# @param dest_path Destination folder path e.g. '/dst'
|
573
|
-
# @param [Hash] opts the optional parameters
|
574
|
-
# @option opts [String] :src_storage_name Source storage name
|
575
|
-
# @option opts [String] :dest_storage_name Destination storage name
|
576
|
-
# @return [nil]
|
577
|
-
def copy_folder(src_path, dest_path, opts = {})
|
578
|
-
copy_folder_with_http_info(src_path, dest_path, opts)
|
579
|
-
nil
|
580
|
-
end
|
581
|
-
|
582
|
-
# Copy folder
|
583
|
-
# @param src_path Source folder path e.g. '/src'
|
584
|
-
# @param dest_path Destination folder path e.g. '/dst'
|
585
|
-
# @param [Hash] opts the optional parameters
|
586
|
-
# @option opts [String] :src_storage_name Source storage name
|
587
|
-
# @option opts [String] :dest_storage_name Destination storage name
|
588
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
589
|
-
def copy_folder_with_http_info(src_path, dest_path, opts = {})
|
590
|
-
if @api_client.config.debug
|
591
|
-
@api_client.config.logger.debug 'Calling API: StorageApi.copy_folder ...'
|
592
|
-
end
|
593
|
-
# verify the required parameter 'src_path' is set
|
594
|
-
if @api_client.config.client_side_validation && src_path.nil?
|
595
|
-
fail ArgumentError, "Missing the required parameter 'src_path' when calling StorageApi.copy_folder"
|
596
|
-
end
|
597
|
-
# verify the required parameter 'dest_path' is set
|
598
|
-
if @api_client.config.client_side_validation && dest_path.nil?
|
599
|
-
fail ArgumentError, "Missing the required parameter 'dest_path' when calling StorageApi.copy_folder"
|
600
|
-
end
|
601
|
-
# resource path
|
602
|
-
local_var_path = '/html/storage/folder/copy/{srcPath}'.sub('{' + 'srcPath' + '}', src_path.to_s)
|
603
|
-
|
604
|
-
# query parameters
|
605
|
-
query_params = {}
|
606
|
-
query_params[:'destPath'] = dest_path
|
607
|
-
query_params[:'srcStorageName'] = opts[:'src_storage_name'] if !opts[:'src_storage_name'].nil?
|
608
|
-
query_params[:'destStorageName'] = opts[:'dest_storage_name'] if !opts[:'dest_storage_name'].nil?
|
609
|
-
|
610
|
-
# header parameters
|
611
|
-
header_params = {}
|
612
|
-
# HTTP header 'Accept' (if needed)
|
613
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
614
|
-
# HTTP header 'Content-Type'
|
615
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
616
|
-
|
617
|
-
# form parameters
|
618
|
-
form_params = {}
|
619
|
-
|
620
|
-
# http body (model)
|
621
|
-
post_body = nil
|
622
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
623
|
-
:header_params => header_params,
|
624
|
-
:query_params => query_params,
|
625
|
-
:form_params => form_params,
|
626
|
-
:body => post_body)
|
627
|
-
if @api_client.config.debug
|
628
|
-
@api_client.config.logger.debug "API called: StorageApi#copy_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
629
|
-
end
|
630
|
-
return data, status_code, headers
|
631
|
-
end
|
632
|
-
|
633
393
|
# Create the folder
|
634
394
|
# @param path Folder path to create e.g. 'folder_1/folder_2/'
|
635
395
|
# @param [Hash] opts the optional parameters
|
@@ -654,10 +414,11 @@ module AsposeHtml
|
|
654
414
|
fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.create_folder"
|
655
415
|
end
|
656
416
|
# resource path
|
657
|
-
local_var_path = '/html/
|
417
|
+
local_var_path = '/html/folder'
|
658
418
|
|
659
419
|
# query parameters
|
660
420
|
query_params = {}
|
421
|
+
query_params[:'path'] = path.to_s
|
661
422
|
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
662
423
|
|
663
424
|
# header parameters
|
@@ -672,7 +433,7 @@ module AsposeHtml
|
|
672
433
|
|
673
434
|
# http body (model)
|
674
435
|
post_body = nil
|
675
|
-
data, status_code, headers = @api_client.call_api(:
|
436
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
676
437
|
:header_params => header_params,
|
677
438
|
:query_params => query_params,
|
678
439
|
:form_params => form_params,
|
@@ -709,10 +470,11 @@ module AsposeHtml
|
|
709
470
|
fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.delete_folder"
|
710
471
|
end
|
711
472
|
# resource path
|
712
|
-
local_var_path = '/html/
|
473
|
+
local_var_path = '/html/folder'
|
713
474
|
|
714
475
|
# query parameters
|
715
476
|
query_params = {}
|
477
|
+
query_params[:'path'] = path.to_s
|
716
478
|
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
717
479
|
query_params[:'recursive'] = opts[:'recursive'] if !opts[:'recursive'].nil?
|
718
480
|
|
@@ -763,10 +525,11 @@ module AsposeHtml
|
|
763
525
|
fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.get_files_list"
|
764
526
|
end
|
765
527
|
# resource path
|
766
|
-
local_var_path = '/html/
|
528
|
+
local_var_path = '/html/folder'
|
767
529
|
|
768
530
|
# query parameters
|
769
531
|
query_params = {}
|
532
|
+
query_params[:'path'] = path.to_s
|
770
533
|
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
771
534
|
|
772
535
|
# header parameters
|
@@ -792,68 +555,5 @@ module AsposeHtml
|
|
792
555
|
end
|
793
556
|
return data, status_code, headers
|
794
557
|
end
|
795
|
-
|
796
|
-
# Move folder
|
797
|
-
# @param src_path Folder path to move e.g. '/folder'
|
798
|
-
# @param dest_path Destination folder path to move to e.g '/dst'
|
799
|
-
# @param [Hash] opts the optional parameters
|
800
|
-
# @option opts [String] :src_storage_name Source storage name
|
801
|
-
# @option opts [String] :dest_storage_name Destination storage name
|
802
|
-
# @return [nil]
|
803
|
-
def move_folder(src_path, dest_path, opts = {})
|
804
|
-
move_folder_with_http_info(src_path, dest_path, opts)
|
805
|
-
nil
|
806
|
-
end
|
807
|
-
|
808
|
-
# Move folder
|
809
|
-
# @param src_path Folder path to move e.g. '/folder'
|
810
|
-
# @param dest_path Destination folder path to move to e.g '/dst'
|
811
|
-
# @param [Hash] opts the optional parameters
|
812
|
-
# @option opts [String] :src_storage_name Source storage name
|
813
|
-
# @option opts [String] :dest_storage_name Destination storage name
|
814
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
815
|
-
def move_folder_with_http_info(src_path, dest_path, opts = {})
|
816
|
-
if @api_client.config.debug
|
817
|
-
@api_client.config.logger.debug 'Calling API: StorageApi.move_folder ...'
|
818
|
-
end
|
819
|
-
# verify the required parameter 'src_path' is set
|
820
|
-
if @api_client.config.client_side_validation && src_path.nil?
|
821
|
-
fail ArgumentError, "Missing the required parameter 'src_path' when calling StorageApi.move_folder"
|
822
|
-
end
|
823
|
-
# verify the required parameter 'dest_path' is set
|
824
|
-
if @api_client.config.client_side_validation && dest_path.nil?
|
825
|
-
fail ArgumentError, "Missing the required parameter 'dest_path' when calling StorageApi.move_folder"
|
826
|
-
end
|
827
|
-
# resource path
|
828
|
-
local_var_path = '/html/storage/folder/move/{srcPath}'.sub('{' + 'srcPath' + '}', src_path.to_s)
|
829
|
-
|
830
|
-
# query parameters
|
831
|
-
query_params = {}
|
832
|
-
query_params[:'destPath'] = dest_path
|
833
|
-
query_params[:'srcStorageName'] = opts[:'src_storage_name'] if !opts[:'src_storage_name'].nil?
|
834
|
-
query_params[:'destStorageName'] = opts[:'dest_storage_name'] if !opts[:'dest_storage_name'].nil?
|
835
|
-
|
836
|
-
# header parameters
|
837
|
-
header_params = {}
|
838
|
-
# HTTP header 'Accept' (if needed)
|
839
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
840
|
-
# HTTP header 'Content-Type'
|
841
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
842
|
-
|
843
|
-
# form parameters
|
844
|
-
form_params = {}
|
845
|
-
|
846
|
-
# http body (model)
|
847
|
-
post_body = nil
|
848
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
849
|
-
:header_params => header_params,
|
850
|
-
:query_params => query_params,
|
851
|
-
:form_params => form_params,
|
852
|
-
:body => post_body)
|
853
|
-
if @api_client.config.debug
|
854
|
-
@api_client.config.logger.debug "API called: StorageApi#move_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
855
|
-
end
|
856
|
-
return data, status_code, headers
|
857
|
-
end
|
858
558
|
end
|
859
559
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
--------------------------------------------------------------------------------------------------------------------
|
4
4
|
<copyright company="Aspose" file="api_client.rb">
|
5
5
|
</copyright>
|
6
|
-
Copyright (c)
|
6
|
+
Copyright (c) 2022 Aspose.HTML for Cloud
|
7
7
|
<summary>
|
8
8
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
9
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -36,6 +36,7 @@ require 'securerandom'
|
|
36
36
|
require 'net/http'
|
37
37
|
|
38
38
|
|
39
|
+
|
39
40
|
module AsposeHtml
|
40
41
|
class ApiClient
|
41
42
|
# The Configuration object holding settings to be used in the API client.
|
@@ -284,8 +285,7 @@ module AsposeHtml
|
|
284
285
|
|
285
286
|
def build_request_url(path)
|
286
287
|
# Add leading and trailing slashes to path
|
287
|
-
|
288
|
-
URI.encode(@config.base_url + path)
|
288
|
+
@config.basePath + "/#{path}".gsub(/\/+/, '/')
|
289
289
|
end
|
290
290
|
|
291
291
|
# Builds the HTTP request body
|
@@ -3,7 +3,7 @@
|
|
3
3
|
--------------------------------------------------------------------------------------------------------------------
|
4
4
|
<copyright company="Aspose" file="api_error.rb">
|
5
5
|
</copyright>
|
6
|
-
Copyright (c)
|
6
|
+
Copyright (c) 2022 Aspose.HTML for Cloud
|
7
7
|
<summary>
|
8
8
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
9
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -3,7 +3,7 @@
|
|
3
3
|
--------------------------------------------------------------------------------------------------------------------
|
4
4
|
<copyright company="Aspose" file="configuration.rb">
|
5
5
|
</copyright>
|
6
|
-
Copyright (c)
|
6
|
+
Copyright (c) 2022 Aspose.HTML for Cloud
|
7
7
|
<summary>
|
8
8
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
9
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -3,7 +3,7 @@
|
|
3
3
|
--------------------------------------------------------------------------------------------------------------------
|
4
4
|
<copyright company="Aspose" file="base_model.rb">
|
5
5
|
</copyright>
|
6
|
-
Copyright (c)
|
6
|
+
Copyright (c) 2022 Aspose.HTML for Cloud
|
7
7
|
<summary>
|
8
8
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
9
|
of this software and associated documentation files (the "Software"), to deal
|