aspose_cells_cloud 21.10 → 21.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/lib/aspose_cells_cloud/api/cells_api.rb +144 -12
- data/lib/aspose_cells_cloud/api/lite_cells_api.rb +149 -0
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/spec/api/cells_compress_spec.rb +44 -0
- data/spec/api/cells_replace_spec.rb +44 -0
- data/spec/api/cells_simple_spec.rb +10 -11
- data/spec/api/cells_workbook_api_spec.rb +12 -1
- data/spec/api/cells_worksheets_api_spec.rb +11 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9a949da8788d07ad39b51340e7d04db22cb86b22bc8a3fb6b18b6bdc47f78de
|
4
|
+
data.tar.gz: 33d626302b89084f222749af2a64f71058e92f3451a823d593e62273f78a62c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad074ccc260c50f67a43021472ed88527c7da58d4068fa807fcfcac3df0b9f6d6a2812fe7cc84d9af0df0789a1f065ce82808c91bda44389d0b619e6880133f6
|
7
|
+
data.tar.gz: c16d8af7b9ce06d03c9734c93265b0fdbd25e52e90325627b8ac4491216bf2540c17de6286da61a9b1eb99a940ee1142b72bd892439c45e1bc35a5bf9736d79b
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/21.
|
1
|
+
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/21.11)
|
2
2
|
|
3
3
|
|
4
4
|
# Ruby SDK for Spreadsheet Processing in the Cloud
|
@@ -21,10 +21,12 @@ Ruby Cloud SDK wraps Aspose.Cells REST API so you could seamlessly integrate Mic
|
|
21
21
|
- Convert worksheets to PDF, XPS & SVG formats.
|
22
22
|
- [Convert Excel files to popular formats](https://docs.aspose.cloud/cells/convert-excel-workbook-to-different-file-formats/).
|
23
23
|
|
24
|
-
## Feature & Enhancements in Version 21.
|
24
|
+
## Feature & Enhancements in Version 21.11
|
25
25
|
|
26
|
-
- Add new API for
|
27
|
-
- Add new API for
|
26
|
+
- Add new API for workbook get page count on Aspose.Cells Cloud.
|
27
|
+
- Add new API for worksheet get page count on Aspose.Cells Cloud.
|
28
|
+
- Add new API for compress excel file on Aspose.Cells Cloud.
|
29
|
+
- Add new feature for replace API.
|
28
30
|
|
29
31
|
|
30
32
|
## Read & Write Spreadsheet Formats
|
@@ -14533,6 +14533,69 @@ module AsposeCellsCloud
|
|
14533
14533
|
return data, status_code, headers
|
14534
14534
|
end
|
14535
14535
|
|
14536
|
+
# Get page count for workbook.
|
14537
|
+
#
|
14538
|
+
# @param name Document name.
|
14539
|
+
# @param [Hash] opts the optional parameters
|
14540
|
+
# @option opts [String] :folder Document's folder.
|
14541
|
+
# @option opts [String] :storage_name storage name.
|
14542
|
+
# @return [Object]
|
14543
|
+
def cells_workbook_get_page_count(name, opts = {})
|
14544
|
+
data, _status_code, _headers = cells_workbook_get_page_count_with_http_info(name, opts)
|
14545
|
+
return data
|
14546
|
+
end
|
14547
|
+
|
14548
|
+
# Get page count for workbook.
|
14549
|
+
#
|
14550
|
+
# @param name Document name.
|
14551
|
+
# @param [Hash] opts the optional parameters
|
14552
|
+
# @option opts [String] :folder Document's folder.
|
14553
|
+
# @option opts [String] :storage_name storage name.
|
14554
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
14555
|
+
def cells_workbook_get_page_count_with_http_info(name, opts = {})
|
14556
|
+
if @api_client.config.debugging
|
14557
|
+
@api_client.config.logger.debug "Calling API: CellsApi.cells_workbook_get_page_count ..."
|
14558
|
+
end
|
14559
|
+
@api_client.request_token_if_needed
|
14560
|
+
# verify the required parameter 'name' is set
|
14561
|
+
if @api_client.config.client_side_validation && name.nil?
|
14562
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling CellsApi.cells_workbook_get_page_count"
|
14563
|
+
end
|
14564
|
+
# resource path
|
14565
|
+
local_var_path = "/cells/{name}/pagecount".sub('{' + 'name' + '}', name.to_s)
|
14566
|
+
|
14567
|
+
# query parameters
|
14568
|
+
query_params = {}
|
14569
|
+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
|
14570
|
+
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
14571
|
+
|
14572
|
+
# header parameters
|
14573
|
+
header_params = {}
|
14574
|
+
# HTTP header 'Accept' (if needed)
|
14575
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
14576
|
+
# HTTP header 'Content-Type'
|
14577
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
14578
|
+
|
14579
|
+
# form parameters
|
14580
|
+
form_params = {}
|
14581
|
+
|
14582
|
+
# http body (model)
|
14583
|
+
post_body = nil
|
14584
|
+
#auth_names = []
|
14585
|
+
auth_names = ['JWT']
|
14586
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
14587
|
+
:header_params => header_params,
|
14588
|
+
:query_params => query_params,
|
14589
|
+
:form_params => form_params,
|
14590
|
+
:body => post_body,
|
14591
|
+
:auth_names => auth_names,
|
14592
|
+
:return_type => 'Object')
|
14593
|
+
if @api_client.config.debugging
|
14594
|
+
@api_client.config.logger.debug "API called: CellsApi#cells_workbook_get_page_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
14595
|
+
end
|
14596
|
+
return data, status_code, headers
|
14597
|
+
end
|
14598
|
+
|
14536
14599
|
# Read workbook info or export.
|
14537
14600
|
#
|
14538
14601
|
# @param name The document name.
|
@@ -16700,7 +16763,7 @@ module AsposeCellsCloud
|
|
16700
16763
|
# @param [Hash] opts the optional parameters
|
16701
16764
|
# @option opts [String] :folder Document's folder.
|
16702
16765
|
# @option opts [String] :storage_name storage name.
|
16703
|
-
# @return [
|
16766
|
+
# @return [CellsCloudResponse]
|
16704
16767
|
def cells_worksheets_delete_worksheet(name, sheet_name, opts = {})
|
16705
16768
|
data, _status_code, _headers = cells_worksheets_delete_worksheet_with_http_info(name, sheet_name, opts)
|
16706
16769
|
return data
|
@@ -16713,7 +16776,7 @@ module AsposeCellsCloud
|
|
16713
16776
|
# @param [Hash] opts the optional parameters
|
16714
16777
|
# @option opts [String] :folder Document's folder.
|
16715
16778
|
# @option opts [String] :storage_name storage name.
|
16716
|
-
# @return [Array<(
|
16779
|
+
# @return [Array<(CellsCloudResponse, Fixnum, Hash)>] CellsCloudResponse data, response status code and response headers
|
16717
16780
|
def cells_worksheets_delete_worksheet_with_http_info(name, sheet_name, opts = {})
|
16718
16781
|
if @api_client.config.debugging
|
16719
16782
|
@api_client.config.logger.debug "Calling API: CellsApi.cells_worksheets_delete_worksheet ..."
|
@@ -16755,7 +16818,7 @@ module AsposeCellsCloud
|
|
16755
16818
|
:form_params => form_params,
|
16756
16819
|
:body => post_body,
|
16757
16820
|
:auth_names => auth_names,
|
16758
|
-
:return_type => '
|
16821
|
+
:return_type => 'CellsCloudResponse')
|
16759
16822
|
if @api_client.config.debugging
|
16760
16823
|
@api_client.config.logger.debug "API called: CellsApi#cells_worksheets_delete_worksheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
16761
16824
|
end
|
@@ -17204,6 +17267,75 @@ module AsposeCellsCloud
|
|
17204
17267
|
return data, status_code, headers
|
17205
17268
|
end
|
17206
17269
|
|
17270
|
+
# Get page count for worksheet.
|
17271
|
+
#
|
17272
|
+
# @param name Document name.
|
17273
|
+
# @param sheet_name The worksheet name.
|
17274
|
+
# @param [Hash] opts the optional parameters
|
17275
|
+
# @option opts [String] :folder Document's folder.
|
17276
|
+
# @option opts [String] :storage_name storage name.
|
17277
|
+
# @return [Object]
|
17278
|
+
def cells_worksheets_get_page_count(name, sheet_name, opts = {})
|
17279
|
+
data, _status_code, _headers = cells_worksheets_get_page_count_with_http_info(name, sheet_name, opts)
|
17280
|
+
return data
|
17281
|
+
end
|
17282
|
+
|
17283
|
+
# Get page count for worksheet.
|
17284
|
+
#
|
17285
|
+
# @param name Document name.
|
17286
|
+
# @param sheet_name The worksheet name.
|
17287
|
+
# @param [Hash] opts the optional parameters
|
17288
|
+
# @option opts [String] :folder Document's folder.
|
17289
|
+
# @option opts [String] :storage_name storage name.
|
17290
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
17291
|
+
def cells_worksheets_get_page_count_with_http_info(name, sheet_name, opts = {})
|
17292
|
+
if @api_client.config.debugging
|
17293
|
+
@api_client.config.logger.debug "Calling API: CellsApi.cells_worksheets_get_page_count ..."
|
17294
|
+
end
|
17295
|
+
@api_client.request_token_if_needed
|
17296
|
+
# verify the required parameter 'name' is set
|
17297
|
+
if @api_client.config.client_side_validation && name.nil?
|
17298
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling CellsApi.cells_worksheets_get_page_count"
|
17299
|
+
end
|
17300
|
+
# verify the required parameter 'sheet_name' is set
|
17301
|
+
if @api_client.config.client_side_validation && sheet_name.nil?
|
17302
|
+
fail ArgumentError, "Missing the required parameter 'sheet_name' when calling CellsApi.cells_worksheets_get_page_count"
|
17303
|
+
end
|
17304
|
+
# resource path
|
17305
|
+
local_var_path = "/cells/{name}/worksheets/{sheetName}/pagecount".sub('{' + 'name' + '}', name.to_s).sub('{' + 'sheetName' + '}', sheet_name.to_s)
|
17306
|
+
|
17307
|
+
# query parameters
|
17308
|
+
query_params = {}
|
17309
|
+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
|
17310
|
+
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
17311
|
+
|
17312
|
+
# header parameters
|
17313
|
+
header_params = {}
|
17314
|
+
# HTTP header 'Accept' (if needed)
|
17315
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
17316
|
+
# HTTP header 'Content-Type'
|
17317
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
17318
|
+
|
17319
|
+
# form parameters
|
17320
|
+
form_params = {}
|
17321
|
+
|
17322
|
+
# http body (model)
|
17323
|
+
post_body = nil
|
17324
|
+
#auth_names = []
|
17325
|
+
auth_names = ['JWT']
|
17326
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
17327
|
+
:header_params => header_params,
|
17328
|
+
:query_params => query_params,
|
17329
|
+
:form_params => form_params,
|
17330
|
+
:body => post_body,
|
17331
|
+
:auth_names => auth_names,
|
17332
|
+
:return_type => 'Object')
|
17333
|
+
if @api_client.config.debugging
|
17334
|
+
@api_client.config.logger.debug "API called: CellsApi#cells_worksheets_get_page_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
17335
|
+
end
|
17336
|
+
return data, status_code, headers
|
17337
|
+
end
|
17338
|
+
|
17207
17339
|
# Read worksheet info or export.
|
17208
17340
|
#
|
17209
17341
|
# @param name The document name.
|
@@ -18139,7 +18271,7 @@ module AsposeCellsCloud
|
|
18139
18271
|
# @option opts [WorksheetMovingRequest] :moving with moving parameters.
|
18140
18272
|
# @option opts [String] :folder The document folder.
|
18141
18273
|
# @option opts [String] :storage_name storage name.
|
18142
|
-
# @return [
|
18274
|
+
# @return [CellsCloudResponse]
|
18143
18275
|
def cells_worksheets_post_move_worksheet(name, sheet_name, opts = {})
|
18144
18276
|
data, _status_code, _headers = cells_worksheets_post_move_worksheet_with_http_info(name, sheet_name, opts)
|
18145
18277
|
return data
|
@@ -18153,7 +18285,7 @@ module AsposeCellsCloud
|
|
18153
18285
|
# @option opts [WorksheetMovingRequest] :moving with moving parameters.
|
18154
18286
|
# @option opts [String] :folder The document folder.
|
18155
18287
|
# @option opts [String] :storage_name storage name.
|
18156
|
-
# @return [Array<(
|
18288
|
+
# @return [Array<(CellsCloudResponse, Fixnum, Hash)>] CellsCloudResponse data, response status code and response headers
|
18157
18289
|
def cells_worksheets_post_move_worksheet_with_http_info(name, sheet_name, opts = {})
|
18158
18290
|
if @api_client.config.debugging
|
18159
18291
|
@api_client.config.logger.debug "Calling API: CellsApi.cells_worksheets_post_move_worksheet ..."
|
@@ -18195,7 +18327,7 @@ module AsposeCellsCloud
|
|
18195
18327
|
:form_params => form_params,
|
18196
18328
|
:body => post_body,
|
18197
18329
|
:auth_names => auth_names,
|
18198
|
-
:return_type => '
|
18330
|
+
:return_type => 'CellsCloudResponse')
|
18199
18331
|
if @api_client.config.debugging
|
18200
18332
|
@api_client.config.logger.debug "API called: CellsApi#cells_worksheets_post_move_worksheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
18201
18333
|
end
|
@@ -18748,7 +18880,7 @@ module AsposeCellsCloud
|
|
18748
18880
|
# @option opts [String] :sheettype The new sheet type.
|
18749
18881
|
# @option opts [String] :folder Document folder.
|
18750
18882
|
# @option opts [String] :storage_name storage name.
|
18751
|
-
# @return [
|
18883
|
+
# @return [CellsCloudResponse]
|
18752
18884
|
def cells_worksheets_put_add_new_worksheet(name, sheet_name, opts = {})
|
18753
18885
|
data, _status_code, _headers = cells_worksheets_put_add_new_worksheet_with_http_info(name, sheet_name, opts)
|
18754
18886
|
return data
|
@@ -18763,7 +18895,7 @@ module AsposeCellsCloud
|
|
18763
18895
|
# @option opts [String] :sheettype The new sheet type.
|
18764
18896
|
# @option opts [String] :folder Document folder.
|
18765
18897
|
# @option opts [String] :storage_name storage name.
|
18766
|
-
# @return [Array<(
|
18898
|
+
# @return [Array<(CellsCloudResponse, Fixnum, Hash)>] CellsCloudResponse data, response status code and response headers
|
18767
18899
|
def cells_worksheets_put_add_new_worksheet_with_http_info(name, sheet_name, opts = {})
|
18768
18900
|
if @api_client.config.debugging
|
18769
18901
|
@api_client.config.logger.debug "Calling API: CellsApi.cells_worksheets_put_add_new_worksheet ..."
|
@@ -18807,7 +18939,7 @@ module AsposeCellsCloud
|
|
18807
18939
|
:form_params => form_params,
|
18808
18940
|
:body => post_body,
|
18809
18941
|
:auth_names => auth_names,
|
18810
|
-
:return_type => '
|
18942
|
+
:return_type => 'CellsCloudResponse')
|
18811
18943
|
if @api_client.config.debugging
|
18812
18944
|
@api_client.config.logger.debug "API called: CellsApi#cells_worksheets_put_add_new_worksheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
18813
18945
|
end
|
@@ -18822,7 +18954,7 @@ module AsposeCellsCloud
|
|
18822
18954
|
# @param [Hash] opts the optional parameters
|
18823
18955
|
# @option opts [String] :folder The document folder.
|
18824
18956
|
# @option opts [String] :storage_name storage name.
|
18825
|
-
# @return [
|
18957
|
+
# @return [CellsCloudResponse]
|
18826
18958
|
def cells_worksheets_put_change_visibility_worksheet(name, sheet_name, is_visible, opts = {})
|
18827
18959
|
data, _status_code, _headers = cells_worksheets_put_change_visibility_worksheet_with_http_info(name, sheet_name, is_visible, opts)
|
18828
18960
|
return data
|
@@ -18836,7 +18968,7 @@ module AsposeCellsCloud
|
|
18836
18968
|
# @param [Hash] opts the optional parameters
|
18837
18969
|
# @option opts [String] :folder The document folder.
|
18838
18970
|
# @option opts [String] :storage_name storage name.
|
18839
|
-
# @return [Array<(
|
18971
|
+
# @return [Array<(CellsCloudResponse, Fixnum, Hash)>] CellsCloudResponse data, response status code and response headers
|
18840
18972
|
def cells_worksheets_put_change_visibility_worksheet_with_http_info(name, sheet_name, is_visible, opts = {})
|
18841
18973
|
if @api_client.config.debugging
|
18842
18974
|
@api_client.config.logger.debug "Calling API: CellsApi.cells_worksheets_put_change_visibility_worksheet ..."
|
@@ -18883,7 +19015,7 @@ module AsposeCellsCloud
|
|
18883
19015
|
:form_params => form_params,
|
18884
19016
|
:body => post_body,
|
18885
19017
|
:auth_names => auth_names,
|
18886
|
-
:return_type => '
|
19018
|
+
:return_type => 'CellsCloudResponse')
|
18887
19019
|
if @api_client.config.debugging
|
18888
19020
|
@api_client.config.logger.debug "API called: CellsApi#cells_worksheets_put_change_visibility_worksheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
18889
19021
|
end
|
@@ -953,5 +953,154 @@ module AsposeCellsCloud
|
|
953
953
|
end
|
954
954
|
return data, status_code, headers
|
955
955
|
end
|
956
|
+
|
957
|
+
#
|
958
|
+
#
|
959
|
+
# @param file File to upload
|
960
|
+
# @param compress_level
|
961
|
+
# @param [Hash] opts the optional parameters
|
962
|
+
# @return [FilesResult]
|
963
|
+
def post_compress(file, compress_level, opts = {})
|
964
|
+
data, _status_code, _headers = post_compress_with_http_info(file, compress_level, opts)
|
965
|
+
return data
|
966
|
+
end
|
967
|
+
|
968
|
+
#
|
969
|
+
#
|
970
|
+
# @param file File to upload
|
971
|
+
# @param compress_level
|
972
|
+
# @param [Hash] opts the optional parameters
|
973
|
+
# @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
|
974
|
+
def post_compress_with_http_info(file, compress_level, opts = {})
|
975
|
+
if @api_client.config.debugging
|
976
|
+
@api_client.config.logger.debug "Calling API: LiteCellsApi.post_compress ..."
|
977
|
+
end
|
978
|
+
@api_client.request_token_if_needed
|
979
|
+
# verify the required parameter 'file' is set
|
980
|
+
if @api_client.config.client_side_validation && file.nil?
|
981
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_compress"
|
982
|
+
end
|
983
|
+
# verify the required parameter 'compress_level' is set
|
984
|
+
if @api_client.config.client_side_validation && compress_level.nil?
|
985
|
+
fail ArgumentError, "Missing the required parameter 'compress_level' when calling LiteCellsApi.post_compress"
|
986
|
+
end
|
987
|
+
|
988
|
+
# resource path
|
989
|
+
local_var_path = "/cells/compress"
|
990
|
+
|
991
|
+
# query parameters
|
992
|
+
query_params = {}
|
993
|
+
query_params[:'compressLevel'] = compress_level
|
994
|
+
|
995
|
+
# header parameters
|
996
|
+
header_params = {}
|
997
|
+
# HTTP header 'Accept' (if needed)
|
998
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
999
|
+
# HTTP header 'Content-Type'
|
1000
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
1001
|
+
|
1002
|
+
# form parameters
|
1003
|
+
form_params = {}
|
1004
|
+
file.each do |filename , context|
|
1005
|
+
form_params[filename] = context
|
1006
|
+
end
|
1007
|
+
|
1008
|
+
# http body (model)
|
1009
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
1010
|
+
post_body = ""
|
1011
|
+
#auth_names = []
|
1012
|
+
auth_names = ['JWT']
|
1013
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1014
|
+
:header_params => header_params,
|
1015
|
+
:query_params => query_params,
|
1016
|
+
:form_params => form_params,
|
1017
|
+
:body => post_body,
|
1018
|
+
:auth_names => auth_names,
|
1019
|
+
:return_type => 'FilesResult')
|
1020
|
+
if @api_client.config.debugging
|
1021
|
+
@api_client.config.logger.debug "API called: LiteCellsApi#post_compress\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1022
|
+
end
|
1023
|
+
return data, status_code, headers
|
1024
|
+
end
|
1025
|
+
|
1026
|
+
#
|
1027
|
+
#
|
1028
|
+
# @param file File to upload
|
1029
|
+
# @param text
|
1030
|
+
# @param newtext
|
1031
|
+
# @param [Hash] opts the optional parameters
|
1032
|
+
# @param password
|
1033
|
+
# @param sheet_name
|
1034
|
+
# @return [FilesResult]
|
1035
|
+
def post_replace(file, text, newtext, opts = {})
|
1036
|
+
data, _status_code, _headers = post_replace_with_http_info(file, text, newtext, opts)
|
1037
|
+
return data
|
1038
|
+
end
|
1039
|
+
|
1040
|
+
#
|
1041
|
+
#
|
1042
|
+
# @param file File to upload
|
1043
|
+
# @param text
|
1044
|
+
# @param newtext
|
1045
|
+
# @param [Hash] opts the optional parameters
|
1046
|
+
# @param password
|
1047
|
+
# @param sheet_name
|
1048
|
+
# @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
|
1049
|
+
def post_replace_with_http_info(file, text, newtext, opts = {})
|
1050
|
+
if @api_client.config.debugging
|
1051
|
+
@api_client.config.logger.debug "Calling API: LiteCellsApi.post_replace ..."
|
1052
|
+
end
|
1053
|
+
@api_client.request_token_if_needed
|
1054
|
+
# verify the required parameter 'file' is set
|
1055
|
+
if @api_client.config.client_side_validation && file.nil?
|
1056
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_replace"
|
1057
|
+
end
|
1058
|
+
# verify the required parameter 'text' is set
|
1059
|
+
if @api_client.config.client_side_validation && text.nil?
|
1060
|
+
fail ArgumentError, "Missing the required parameter 'text' when calling LiteCellsApi.post_replace"
|
1061
|
+
end
|
1062
|
+
# verify the required parameter 'color' is set
|
1063
|
+
if @api_client.config.client_side_validation && newtext.nil?
|
1064
|
+
fail ArgumentError, "Missing the required parameter 'newtext' when calling LiteCellsApi.post_replace"
|
1065
|
+
end
|
1066
|
+
# resource path
|
1067
|
+
local_var_path = "/cells/replace"
|
1068
|
+
|
1069
|
+
# query parameters
|
1070
|
+
query_params = {}
|
1071
|
+
query_params[:'text'] = text
|
1072
|
+
query_params[:'newtext'] = newtext
|
1073
|
+
query_params[:'password'] = opts[:'password'] if !opts[:'storagpassworde_name'].nil?
|
1074
|
+
query_params[:'sheetName'] = opts[:'sheet_name'] if !opts[:'sheet_name'].nil?
|
1075
|
+
# header parameters
|
1076
|
+
header_params = {}
|
1077
|
+
# HTTP header 'Accept' (if needed)
|
1078
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1079
|
+
# HTTP header 'Content-Type'
|
1080
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
1081
|
+
|
1082
|
+
# form parameters
|
1083
|
+
form_params = {}
|
1084
|
+
file.each do |filename , context|
|
1085
|
+
form_params[filename] = context
|
1086
|
+
end
|
1087
|
+
|
1088
|
+
# http body (model)
|
1089
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
1090
|
+
post_body = ""
|
1091
|
+
#auth_names = []
|
1092
|
+
auth_names = ['JWT']
|
1093
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1094
|
+
:header_params => header_params,
|
1095
|
+
:query_params => query_params,
|
1096
|
+
:form_params => form_params,
|
1097
|
+
:body => post_body,
|
1098
|
+
:auth_names => auth_names,
|
1099
|
+
:return_type => 'FilesResult')
|
1100
|
+
if @api_client.config.debugging
|
1101
|
+
@api_client.config.logger.debug "API called: LiteCellsApi#post_watermark\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1102
|
+
end
|
1103
|
+
return data, status_code, headers
|
1104
|
+
end
|
956
1105
|
end
|
957
1106
|
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
=begin
|
2
|
+
#Web API Swagger specification
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for AsposeCellsCloud::CellsApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'LiteCellsApi' do
|
20
|
+
before do
|
21
|
+
@instance = AsposeCellsCloud::LiteCellsApi.new($client_id,$client_secret,$api_version,$baseurl)
|
22
|
+
$VERBOSE = nil
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'lite_cells_unit compress test' do
|
30
|
+
it "should work" do
|
31
|
+
files = {}
|
32
|
+
|
33
|
+
name = $DataSourceXlsx
|
34
|
+
files[name] = ::File.open(File.expand_path("data/"+name),"r")
|
35
|
+
name =$AssemblyTestXlsx
|
36
|
+
files[name] = ::File.open(File.expand_path("data/"+name),"r") #{|io| io.read(io.size) }
|
37
|
+
|
38
|
+
result = @instance.post_compress(files ,88)
|
39
|
+
|
40
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
@@ -0,0 +1,44 @@
|
|
1
|
+
=begin
|
2
|
+
#Web API Swagger specification
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for AsposeCellsCloud::CellsApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'LiteCellsApi' do
|
20
|
+
before do
|
21
|
+
@instance = AsposeCellsCloud::LiteCellsApi.new($client_id,$client_secret,$api_version,$baseurl)
|
22
|
+
$VERBOSE = nil
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'lite_cells_unit replace test' do
|
30
|
+
it "should work" do
|
31
|
+
files = {}
|
32
|
+
|
33
|
+
name = $DataSourceXlsx
|
34
|
+
files[name] = ::File.open(File.expand_path("data/"+name),"r")
|
35
|
+
name =$AssemblyTestXlsx
|
36
|
+
files[name] = ::File.open(File.expand_path("data/"+name),"r") #{|io| io.read(io.size) }
|
37
|
+
|
38
|
+
result = @instance.post_replace(files ,"1","aspose.cells cloud")
|
39
|
+
|
40
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
@@ -18,7 +18,7 @@ require 'json'
|
|
18
18
|
# Please update as you see appropriate
|
19
19
|
describe 'CellsApi' do
|
20
20
|
before do
|
21
|
-
@instance = AsposeCellsCloud::
|
21
|
+
@instance = AsposeCellsCloud::LiteCellsApi.new($client_id,$client_secret,$api_version,$baseurl)
|
22
22
|
$VERBOSE = nil
|
23
23
|
end
|
24
24
|
|
@@ -26,18 +26,17 @@ describe 'CellsApi' do
|
|
26
26
|
# run after each test
|
27
27
|
end
|
28
28
|
|
29
|
-
describe '
|
29
|
+
describe 'lite_cells_unit replace test' do
|
30
30
|
it "should work" do
|
31
|
-
|
32
|
-
result = @instance.upload_file( folder+"/"+ $BOOK1, ::File.open(File.expand_path("data/"+ $BOOK1),"r") {|io| io.read(io.size) })
|
33
|
-
expect(result.uploaded.size).to be > 0
|
34
|
-
result = @instance.upload_file( folder+"/"+$MYDOC, ::File.open(File.expand_path("data/"+$MYDOC),"r") {|io| io.read(io.size) })
|
35
|
-
expect(result.uploaded.size).to be > 0
|
36
|
-
match_condition = AsposeCellsCloud::MatchConditionRequest.new({:FullMatchConditions=>[ $BOOK1,$MYDOC]})
|
37
|
-
batch_convert_request = AsposeCellsCloud::BatchConvertRequest.new({:Format=>'pdf',:SourceFolder=>folder,:MatchCondition=>batch_convert_request})
|
31
|
+
files = {}
|
38
32
|
|
39
|
-
|
40
|
-
|
33
|
+
name = $DataSourceXlsx
|
34
|
+
files[name] = ::File.open(File.expand_path("data/"+name),"r")
|
35
|
+
name =$AssemblyTestXlsx
|
36
|
+
files[name] = ::File.open(File.expand_path("data/"+name),"r") #{|io| io.read(io.size) }
|
37
|
+
|
38
|
+
result = @instance.post_replace(files ,"1","aspose.cells cloud")
|
39
|
+
|
41
40
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
42
41
|
end
|
43
42
|
end
|
@@ -663,5 +663,16 @@ describe 'CellsWorkbookApi' do
|
|
663
663
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
664
664
|
end
|
665
665
|
end
|
666
|
-
|
666
|
+
describe 'cells_workbook_get_page_count test' do
|
667
|
+
it "should work" do
|
668
|
+
name = $BOOK1
|
669
|
+
folder = $TEMPFOLDER
|
670
|
+
|
671
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
672
|
+
expect(result.uploaded.size).to be > 0
|
673
|
+
result = @instance.cells_workbook_get_page_count(name, { :folder=>folder})
|
674
|
+
expect(result).to be > 0
|
675
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
676
|
+
end
|
677
|
+
end
|
667
678
|
end
|
@@ -853,4 +853,15 @@ describe 'CellsWorksheetsApi' do
|
|
853
853
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
854
854
|
end
|
855
855
|
end
|
856
|
+
describe 'cells_worksheets_get_page_count test' do
|
857
|
+
it "should work" do
|
858
|
+
name = $BOOK1
|
859
|
+
folder = $TEMPFOLDER
|
860
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
861
|
+
expect(result.uploaded.size).to be > 0
|
862
|
+
result = @instance.cells_worksheets_get_page_count(name, $SHEET1, { :folder=>folder})
|
863
|
+
expect(result).to be > 0
|
864
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
865
|
+
end
|
866
|
+
end
|
856
867
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aspose_cells_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '21.
|
4
|
+
version: '21.11'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aspose Cells Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -496,6 +496,7 @@ files:
|
|
496
496
|
- spec/api/cells_chart_area_api_spec.rb
|
497
497
|
- spec/api/cells_charts_api_spec.rb
|
498
498
|
- spec/api/cells_clear_objects_spec.rb
|
499
|
+
- spec/api/cells_compress_spec.rb
|
499
500
|
- spec/api/cells_conditional_formattings_api_spec.rb
|
500
501
|
- spec/api/cells_export_spec.rb
|
501
502
|
- spec/api/cells_hypelinks_api_spec.rb
|
@@ -511,6 +512,7 @@ files:
|
|
511
512
|
- spec/api/cells_properties_api_spec.rb
|
512
513
|
- spec/api/cells_protect_spec.rb
|
513
514
|
- spec/api/cells_ranges_api_spec.rb
|
515
|
+
- spec/api/cells_replace_spec.rb
|
514
516
|
- spec/api/cells_save_as_api_spec.rb
|
515
517
|
- spec/api/cells_search_spec.rb
|
516
518
|
- spec/api/cells_shapes_api_spec.rb
|