aspose_cells_cloud 1.0.3 → 1.0.5

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.
@@ -86,8 +86,6 @@ module AsposeCellsCloud
86
86
  end
87
87
 
88
88
  url = sign(url, opts[:query_params])
89
- puts "URL is #{url}"
90
- puts "req_opts is #{req_opts}"
91
89
  Typhoeus::Request.new(url, req_opts)
92
90
 
93
91
  end
@@ -97,7 +95,6 @@ module AsposeCellsCloud
97
95
 
98
96
  def sign(url, query_params)
99
97
 
100
- puts "URL1 #{url}"
101
98
  fail "Please set Aspose App key and SID first. You can get App key and App SID from https://cloud.aspose.com" if AsposeApp.app_key.nil? || AsposeApp.app_sid.nil?
102
99
 
103
100
  url = url[0..-2] if url[-1].eql? '/'
@@ -110,11 +107,9 @@ module AsposeCellsCloud
110
107
  url = url[0..-2]
111
108
  end
112
109
 
113
- url = "http://api.aspose.com/1.1/storage/folder/test_folder"
114
110
  url = URI.escape(url)
115
- puts "URL2 #{url}"
116
111
  parsed_url = URI.parse(url)
117
-
112
+
118
113
  url_to_sign = "#{parsed_url.scheme}://#{parsed_url.host}#{parsed_url.path}"
119
114
  url_to_sign += "?#{parsed_url.query}" if parsed_url.query
120
115
  if parsed_url.query
@@ -122,8 +117,7 @@ module AsposeCellsCloud
122
117
  else
123
118
  url_to_sign += "?appSID=#{AsposeApp.app_sid}"
124
119
  end
125
-
126
- puts "URL3 #{url_to_sign}"
120
+
127
121
  # create a signature using the private key and the URL
128
122
  raw_signature = OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha1'), AsposeApp.app_key, url_to_sign)
129
123
 
@@ -143,6 +137,7 @@ module AsposeCellsCloud
143
137
 
144
138
  # prepend the server and append the signature.
145
139
  url_to_sign + "&signature=#{signature}"
140
+
146
141
  end
147
142
 
148
143
  # Deserialize the response to the given return type.
@@ -0,0 +1,61 @@
1
+ module AsposeCellsCloud
2
+ #
3
+ class CellValue < BaseObject
4
+ attr_accessor :row_index, :column_index, :type, :value
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'row_index' => :'rowIndex',
11
+
12
+ #
13
+ :'column_index' => :'columnIndex',
14
+
15
+ #
16
+ :'type' => :'type',
17
+
18
+ #
19
+ :'value' => :'value'
20
+
21
+ }
22
+ end
23
+
24
+ # attribute type
25
+ def self.swagger_types
26
+ {
27
+ :'row_index' => :'Integer',
28
+ :'column_index' => :'Integer',
29
+ :'type' => :'String',
30
+ :'value' => :'String'
31
+
32
+ }
33
+ end
34
+
35
+ def initialize(attributes = {})
36
+ return if !attributes.is_a?(Hash) || attributes.empty?
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
40
+
41
+
42
+ if attributes[:'rowIndex']
43
+ self.row_index = attributes[:'rowIndex']
44
+ end
45
+
46
+ if attributes[:'columnIndex']
47
+ self.column_index = attributes[:'columnIndex']
48
+ end
49
+
50
+ if attributes[:'type']
51
+ self.type = attributes[:'type']
52
+ end
53
+
54
+ if attributes[:'value']
55
+ self.value = attributes[:'value']
56
+ end
57
+
58
+ end
59
+
60
+ end
61
+ end
@@ -0,0 +1,77 @@
1
+ module AsposeCellsCloud
2
+ #
3
+ class CopyOptions < BaseObject
4
+ attr_accessor :column_character_width, :copy_invalid_formulas_as_values, :copy_names, :extend_to_adjacent_range, :refer_to_destination_sheet, :refer_to_sheet_with_same_name
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # Indicates whether copying column width in unit of characters.
10
+ :'column_character_width' => :'ColumnCharacterWidth',
11
+
12
+ # If the formula is not valid for the dest destination, only copy values.
13
+ :'copy_invalid_formulas_as_values' => :'CopyInvalidFormulasAsValues',
14
+
15
+ # Indicates whether copying the names.
16
+ :'copy_names' => :'CopyNames',
17
+
18
+ # Indicates whether extend ranges when copying the range to adjacent range.
19
+ :'extend_to_adjacent_range' => :'ExtendToAdjacentRange',
20
+
21
+ # When copying the range in the same file and the chart refers to the source sheet,\n False means the copied chart&#39;s data source will not be changed. True means the\n copied chart&#39;s data source refers to the destination sheet.\n
22
+ :'refer_to_destination_sheet' => :'ReferToDestinationSheet',
23
+
24
+ #
25
+ :'refer_to_sheet_with_same_name' => :'ReferToSheetWithSameName'
26
+
27
+ }
28
+ end
29
+
30
+ # attribute type
31
+ def self.swagger_types
32
+ {
33
+ :'column_character_width' => :'BOOLEAN',
34
+ :'copy_invalid_formulas_as_values' => :'BOOLEAN',
35
+ :'copy_names' => :'BOOLEAN',
36
+ :'extend_to_adjacent_range' => :'BOOLEAN',
37
+ :'refer_to_destination_sheet' => :'BOOLEAN',
38
+ :'refer_to_sheet_with_same_name' => :'BOOLEAN'
39
+
40
+ }
41
+ end
42
+
43
+ def initialize(attributes = {})
44
+ return if !attributes.is_a?(Hash) || attributes.empty?
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
48
+
49
+
50
+ if attributes[:'ColumnCharacterWidth']
51
+ self.column_character_width = attributes[:'ColumnCharacterWidth']
52
+ end
53
+
54
+ if attributes[:'CopyInvalidFormulasAsValues']
55
+ self.copy_invalid_formulas_as_values = attributes[:'CopyInvalidFormulasAsValues']
56
+ end
57
+
58
+ if attributes[:'CopyNames']
59
+ self.copy_names = attributes[:'CopyNames']
60
+ end
61
+
62
+ if attributes[:'ExtendToAdjacentRange']
63
+ self.extend_to_adjacent_range = attributes[:'ExtendToAdjacentRange']
64
+ end
65
+
66
+ if attributes[:'ReferToDestinationSheet']
67
+ self.refer_to_destination_sheet = attributes[:'ReferToDestinationSheet']
68
+ end
69
+
70
+ if attributes[:'ReferToSheetWithSameName']
71
+ self.refer_to_sheet_with_same_name = attributes[:'ReferToSheetWithSameName']
72
+ end
73
+
74
+ end
75
+
76
+ end
77
+ end
@@ -0,0 +1,71 @@
1
+ module AsposeCellsCloud
2
+ #
3
+ class ImportBatchDataOption < BaseObject
4
+ attr_accessor :destination_worksheet, :is_insert, :source, :import_data_type, :batch_data
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'destination_worksheet' => :'DestinationWorksheet',
11
+
12
+ #
13
+ :'is_insert' => :'IsInsert',
14
+
15
+ #
16
+ :'source' => :'Source',
17
+
18
+ #
19
+ :'import_data_type' => :'ImportDataType',
20
+
21
+ #
22
+ :'batch_data' => :'BatchData'
23
+
24
+ }
25
+ end
26
+
27
+ # attribute type
28
+ def self.swagger_types
29
+ {
30
+ :'destination_worksheet' => :'String',
31
+ :'is_insert' => :'BOOLEAN',
32
+ :'source' => :'ImportSource',
33
+ :'import_data_type' => :'String',
34
+ :'batch_data' => :'Array<CellValue>'
35
+
36
+ }
37
+ end
38
+
39
+ def initialize(attributes = {})
40
+ return if !attributes.is_a?(Hash) || attributes.empty?
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
44
+
45
+
46
+ if attributes[:'DestinationWorksheet']
47
+ self.destination_worksheet = attributes[:'DestinationWorksheet']
48
+ end
49
+
50
+ if attributes[:'IsInsert']
51
+ self.is_insert = attributes[:'IsInsert']
52
+ end
53
+
54
+ if attributes[:'Source']
55
+ self.source = attributes[:'Source']
56
+ end
57
+
58
+ if attributes[:'ImportDataType']
59
+ self.import_data_type = attributes[:'ImportDataType']
60
+ end
61
+
62
+ if attributes[:'BatchData']
63
+ if (value = attributes[:'BatchData']).is_a?(Array)
64
+ self.batch_data = value
65
+ end
66
+ end
67
+
68
+ end
69
+
70
+ end
71
+ end
@@ -0,0 +1,45 @@
1
+ module AsposeCellsCloud
2
+ #
3
+ class ImportDataTaskDescription < BaseObject
4
+ attr_accessor :task_type, :import_data_task_parameter
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'task_type' => :'TaskType',
11
+
12
+ #
13
+ :'import_data_task_parameter' => :'ImportDataTaskParameter'
14
+
15
+ }
16
+ end
17
+
18
+ # attribute type
19
+ def self.swagger_types
20
+ {
21
+ :'task_type' => :'String',
22
+ :'import_data_task_parameter' => :'ImportDataTaskParameter'
23
+
24
+ }
25
+ end
26
+
27
+ def initialize(attributes = {})
28
+ return if !attributes.is_a?(Hash) || attributes.empty?
29
+
30
+ # convert string to symbol for hash key
31
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
32
+
33
+
34
+ if attributes[:'TaskType']
35
+ self.task_type = attributes[:'TaskType']
36
+ end
37
+
38
+ if attributes[:'ImportDataTaskParameter']
39
+ self.import_data_task_parameter = attributes[:'ImportDataTaskParameter']
40
+ end
41
+
42
+ end
43
+
44
+ end
45
+ end
@@ -0,0 +1,45 @@
1
+ module AsposeCellsCloud
2
+ #
3
+ class ImportDataTaskParameter < BaseObject
4
+ attr_accessor :workbook, :import_batch_data_option
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'workbook' => :'Workbook',
11
+
12
+ #
13
+ :'import_batch_data_option' => :'ImportBatchDataOption'
14
+
15
+ }
16
+ end
17
+
18
+ # attribute type
19
+ def self.swagger_types
20
+ {
21
+ :'workbook' => :'ImportSource',
22
+ :'import_batch_data_option' => :'ImportBatchDataOption'
23
+
24
+ }
25
+ end
26
+
27
+ def initialize(attributes = {})
28
+ return if !attributes.is_a?(Hash) || attributes.empty?
29
+
30
+ # convert string to symbol for hash key
31
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
32
+
33
+
34
+ if attributes[:'Workbook']
35
+ self.workbook = attributes[:'Workbook']
36
+ end
37
+
38
+ if attributes[:'ImportBatchDataOption']
39
+ self.import_batch_data_option = attributes[:'ImportBatchDataOption']
40
+ end
41
+
42
+ end
43
+
44
+ end
45
+ end
@@ -0,0 +1,95 @@
1
+ module AsposeCellsCloud
2
+ #
3
+ class ImportDoubleArrayOption < BaseObject
4
+ attr_accessor :destination_worksheet, :first_row, :first_column, :is_insert, :source, :import_data_type, :is_vertical, :data
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'destination_worksheet' => :'DestinationWorksheet',
11
+
12
+ #
13
+ :'first_row' => :'FirstRow',
14
+
15
+ #
16
+ :'first_column' => :'FirstColumn',
17
+
18
+ #
19
+ :'is_insert' => :'IsInsert',
20
+
21
+ #
22
+ :'source' => :'Source',
23
+
24
+ #
25
+ :'import_data_type' => :'ImportDataType',
26
+
27
+ #
28
+ :'is_vertical' => :'IsVertical',
29
+
30
+ #
31
+ :'data' => :'Data'
32
+
33
+ }
34
+ end
35
+
36
+ # attribute type
37
+ def self.swagger_types
38
+ {
39
+ :'destination_worksheet' => :'String',
40
+ :'first_row' => :'Integer',
41
+ :'first_column' => :'Integer',
42
+ :'is_insert' => :'BOOLEAN',
43
+ :'source' => :'ImportSource',
44
+ :'import_data_type' => :'String',
45
+ :'is_vertical' => :'BOOLEAN',
46
+ :'data' => :'Array<Float>'
47
+
48
+ }
49
+ end
50
+
51
+ def initialize(attributes = {})
52
+ return if !attributes.is_a?(Hash) || attributes.empty?
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
56
+
57
+
58
+ if attributes[:'DestinationWorksheet']
59
+ self.destination_worksheet = attributes[:'DestinationWorksheet']
60
+ end
61
+
62
+ if attributes[:'FirstRow']
63
+ self.first_row = attributes[:'FirstRow']
64
+ end
65
+
66
+ if attributes[:'FirstColumn']
67
+ self.first_column = attributes[:'FirstColumn']
68
+ end
69
+
70
+ if attributes[:'IsInsert']
71
+ self.is_insert = attributes[:'IsInsert']
72
+ end
73
+
74
+ if attributes[:'Source']
75
+ self.source = attributes[:'Source']
76
+ end
77
+
78
+ if attributes[:'ImportDataType']
79
+ self.import_data_type = attributes[:'ImportDataType']
80
+ end
81
+
82
+ if attributes[:'IsVertical']
83
+ self.is_vertical = attributes[:'IsVertical']
84
+ end
85
+
86
+ if attributes[:'Data']
87
+ if (value = attributes[:'Data']).is_a?(Array)
88
+ self.data = value
89
+ end
90
+ end
91
+
92
+ end
93
+
94
+ end
95
+ end