aspose_cells_cloud 21.1 → 21.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -4
  3. data/lib/aspose_cells_cloud/api/cells_api.rb +102 -28
  4. data/lib/aspose_cells_cloud/api/lite_cells_api.rb +957 -0
  5. data/lib/aspose_cells_cloud/api_client.rb +2 -1
  6. data/lib/aspose_cells_cloud/models/access_token_response.rb +13 -13
  7. data/lib/aspose_cells_cloud/models/cells_document_property.rb +46 -13
  8. data/lib/aspose_cells_cloud/models/chart_operate_parameter.rb +7 -7
  9. data/lib/aspose_cells_cloud/models/conditional_formatting_value.rb +1 -1
  10. data/lib/aspose_cells_cloud/models/custom_filter.rb +1 -1
  11. data/lib/aspose_cells_cloud/models/dynamic_filter.rb +2 -2
  12. data/lib/aspose_cells_cloud/models/file_info.rb +221 -0
  13. data/lib/aspose_cells_cloud/models/files_result.rb +200 -0
  14. data/lib/aspose_cells_cloud/models/import_picture_option.rb +285 -0
  15. data/lib/aspose_cells_cloud/models/pivot_item.rb +1 -1
  16. data/lib/aspose_cells_cloud/models/worksheet_operate_parameter.rb +234 -0
  17. data/lib/aspose_cells_cloud/version.rb +1 -1
  18. data/lib/aspose_cells_cloud.rb +5 -0
  19. data/spec/api/cells_assembly_spec.rb +44 -0
  20. data/spec/api/cells_clear_objects_spec.rb +43 -0
  21. data/spec/api/cells_export_spec.rb +220 -0
  22. data/spec/api/cells_import_spec.rb +43 -0
  23. data/spec/api/cells_merge_spec.rb +43 -0
  24. data/spec/api/cells_metadata_spec.rb +72 -0
  25. data/spec/api/cells_properties_api_spec.rb +1 -1
  26. data/spec/api/cells_protect_spec.rb +43 -0
  27. data/spec/api/cells_search_spec.rb +43 -0
  28. data/spec/api/cells_split_spec.rb +44 -0
  29. data/spec/api/cells_unlock_spec.rb +43 -0
  30. data/spec/api/cells_watermark_spec.rb +42 -0
  31. data/spec/api/cells_workbook_api_spec.rb +26 -0
  32. data/spec/spec_helper.rb +5 -1
  33. metadata +18 -2
@@ -0,0 +1,43 @@
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 import object test' do
30
+ it "should work" do
31
+ files = {}
32
+ name = $DataSourceXlsx
33
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
34
+ name =$AssemblyTestXlsx
35
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
36
+ importdata = AsposeCellsCloud::ImportIntArrayOption.new({:DestinationWorksheet=>$SHEET1,:FirstColumn=>1,:FirstRow=>3,:ImportDataType=>'IntArray',:IsVertical=>true,:Data=>[1,2,3,4]})
37
+ result = @instance.post_import(files ,importdata)
38
+
39
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
40
+ end
41
+ end
42
+ end
43
+
@@ -0,0 +1,43 @@
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 merge object test' do
30
+ it "should work" do
31
+ files = {}
32
+ name = $DataSourceXlsx
33
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
34
+ name =$AssemblyTestXlsx
35
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
36
+
37
+ result = @instance.post_merge(files )
38
+
39
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
40
+ end
41
+ end
42
+ end
43
+
@@ -0,0 +1,72 @@
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 get metadata test' do
30
+ it "should work" do
31
+ files = {}
32
+ name = $DataSourceXlsx
33
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
34
+ name =$AssemblyTestXlsx
35
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
36
+
37
+ result = @instance.get_metadata(files)
38
+
39
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
40
+ end
41
+ end
42
+ describe 'lite_cells_unit delete metadata test' do
43
+ it "should work" do
44
+ files = {}
45
+ name = $DataSourceXlsx
46
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
47
+ name =$AssemblyTestXlsx
48
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
49
+
50
+ result = @instance.delete_metadata(files)
51
+
52
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
53
+ end
54
+ end
55
+ describe 'lite_cells_unit update metadata test' do
56
+ it "should work" do
57
+ files = {}
58
+ name = $DataSourceXlsx
59
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
60
+ name =$AssemblyTestXlsx
61
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
62
+ document_property = AsposeCellsCloud::CellsDocumentProperty.new( {:Name=>'test',:Value=>'value'})
63
+ document_properties = Array.new(1)
64
+ document_properties[0] =document_property
65
+ puts document_property.to_json
66
+ result = @instance.post_metadata(files,document_properties)
67
+
68
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
69
+ end
70
+ end
71
+ end
72
+
@@ -121,7 +121,7 @@ describe 'CellsPropertiesApi' do
121
121
  result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
122
122
  expect(result.uploaded.size).to be > 0
123
123
  result = @instance.cells_properties_put_document_property(name, property_name, { :property=>property, :folder=>folder})
124
- expect(result.code).to eql(201)
124
+ expect(result.code).to eql(200)
125
125
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
126
126
  end
127
127
  end
@@ -0,0 +1,43 @@
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 protect object test' do
30
+ it "should work" do
31
+ files = {}
32
+ name = $DataSourceXlsx
33
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
34
+ name =$AssemblyTestXlsx
35
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
36
+
37
+ result = @instance.post_protect(files ,'123456' )
38
+
39
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
40
+ end
41
+ end
42
+ end
43
+
@@ -0,0 +1,43 @@
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 search object test' do
30
+ it "should work" do
31
+ files = {}
32
+ name = $DataSourceXlsx
33
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
34
+ name =$AssemblyTestXlsx
35
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
36
+
37
+ result = @instance.post_search(files ,'1' )
38
+
39
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
40
+ end
41
+ end
42
+ end
43
+
@@ -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 split object test' do
30
+ it "should work" do
31
+ files = {}
32
+ name = $DataSourceXlsx
33
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
34
+ name =$AssemblyTestXlsx
35
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
36
+
37
+ result = @instance.post_split(files ,'png' )
38
+
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,43 @@
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 unlock object test' do
30
+ it "should work" do
31
+ files = {}
32
+ name = $needUnlockXlsx
33
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
34
+
35
+
36
+ result = @instance.post_unlock(files ,'123456' )
37
+
38
+
39
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
40
+ end
41
+ end
42
+ end
43
+
@@ -0,0 +1,42 @@
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 unlock object test' do
30
+ it "should work" do
31
+ files = {}
32
+ name = $DataSourceXlsx
33
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
34
+ name =$AssemblyTestXlsx
35
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
36
+ result = @instance.post_watermark(files ,'123456','#fff' )
37
+
38
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
39
+ end
40
+ end
41
+ end
42
+
@@ -230,6 +230,32 @@ describe 'CellsWorkbookApi' do
230
230
  end
231
231
  end
232
232
 
233
+ # unit tests for cells_workbook_post_autofit_workbook_columns
234
+ # Autofit workbook columns.
235
+ #
236
+ # @param name Document name.
237
+ # @param [Hash] opts the optional parameters
238
+ # @option opts [AutoFitterOptions] :auto_fitter_options Auto Fitter Options.
239
+ # @option opts [Integer] :start_column Start column.
240
+ # @option opts [Integer] :end_column End column.
241
+ # @option opts [String] :folder Document's folder.
242
+ # @option opts [String] :storage storage name.
243
+ # @return [CellsCloudResponse]
244
+ describe 'cells_workbook_post_autofit_workbook_columns test' do
245
+ it "should work" do
246
+ name = $BOOK1
247
+ auto_fitter_options = nil
248
+ start_column = 1
249
+ end_column = 100
250
+ only_auto = true
251
+ folder = $TEMPFOLDER
252
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
253
+ expect(result.uploaded.size).to be > 0
254
+ result = @instance.cells_workbook_post_autofit_workbook_columns(name, {:auto_fitter_options=>auto_fitter_options, :start_column=>start_column, :end_column=>end_column, :folder=>folder})
255
+ expect(result.code).to eql(200)
256
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
257
+ end
258
+ end
233
259
 
234
260
  # unit tests for cells_workbook_post_import_data
235
261
  #
data/spec/spec_helper.rb CHANGED
@@ -10,7 +10,8 @@ Swagger Codegen version: 2.3.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
  require 'openssl'
13
- OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
13
+ require 'bundler'
14
+ # OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
14
15
  # load the gem
15
16
  require 'aspose_cells_cloud'
16
17
  $grant_type = 'client_credentials' # replace NULL with a proper value
@@ -21,6 +22,9 @@ require 'aspose_cells_cloud'
21
22
  $access_token
22
23
  $BOOK1 = "Book1.xlsx"
23
24
  $MYDOC = "myDocument.xlsx"
25
+ $DataSourceXlsx = "datasource.xlsx"
26
+ $AssemblyTestXlsx = "assemblytest.xlsx"
27
+ $needUnlockXlsx = "needUnlock.xlsx"
24
28
  $PivTestFile = "TestCase.xlsx"
25
29
  $TEMPFOLDER = "RubyTest"
26
30
  $SHEET1 = "Sheet1"