aspose_cells_cloud 24.5 → 24.7
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.
- checksums.yaml +4 -4
- data/README.md +14 -5
- data/lib/aspose_cells_cloud/api/cells_api.rb +16 -1
- data/lib/aspose_cells_cloud/models/abstract_calculation_monitor.rb +3 -3
- data/lib/aspose_cells_cloud/models/add_text_options.rb +306 -0
- data/lib/aspose_cells_cloud/models/{query_data_source.rb → applied_operate.rb} +12 -36
- data/lib/aspose_cells_cloud/models/{transformation.rb → applied_step.rb} +23 -23
- data/lib/aspose_cells_cloud/models/base_operate_options.rb +210 -0
- data/lib/aspose_cells_cloud/models/{query_table.rb → data_query.rb} +46 -46
- data/lib/aspose_cells_cloud/models/data_transformation_request.rb +26 -14
- data/lib/aspose_cells_cloud/models/load_data.rb +11 -47
- data/lib/aspose_cells_cloud/models/load_to.rb +3 -3
- data/lib/aspose_cells_cloud/models/merge_queries.rb +39 -75
- data/lib/aspose_cells_cloud/models/pivot_column.rb +18 -6
- data/lib/aspose_cells_cloud/models/unpivot_column.rb +19 -7
- data/lib/aspose_cells_cloud/requests/post_access_token_request.rb +92 -0
- data/lib/aspose_cells_cloud/requests/post_add_text_content_request.rb +103 -0
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/lib/aspose_cells_cloud.rb +7 -3
- data/spec/api/data_processing_controller_spec.rb +34 -0
- metadata +9 -5
@@ -31,52 +31,40 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class MergeQueries
|
34
|
-
#Indicates the
|
35
|
-
attr_accessor :
|
36
|
-
#
|
37
|
-
attr_accessor :file_info_a
|
38
|
-
#Represents data item.
|
39
|
-
attr_accessor :data_item_a
|
40
|
-
#Represents index field of DataA
|
34
|
+
#Indicates the name of the data query , it is matched in the data query set.
|
35
|
+
attr_accessor :data_query_name_a
|
36
|
+
#Represents index field of DataA.
|
41
37
|
attr_accessor :data_a_index_field
|
42
|
-
#Indicates the
|
43
|
-
attr_accessor :
|
44
|
-
#
|
45
|
-
attr_accessor :file_info_b
|
46
|
-
#Represents data item.
|
47
|
-
attr_accessor :data_item_b
|
48
|
-
#Represents index field of DataB
|
38
|
+
#Indicates the name of the data query , it is matched in the data query set.
|
39
|
+
attr_accessor :data_query_name_b
|
40
|
+
#Represents index field of DataB.
|
49
41
|
attr_accessor :data_b_index_field
|
50
|
-
#
|
42
|
+
#Represents ethods of data consolidation.
|
51
43
|
attr_accessor :join_type
|
44
|
+
#
|
45
|
+
attr_accessor :applied_operate_type
|
52
46
|
|
53
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
48
|
def self.attribute_map
|
55
49
|
{
|
56
|
-
:'
|
57
|
-
:'file_info_a' => :'FileInfoA',
|
58
|
-
:'data_item_a' => :'DataItemA',
|
50
|
+
:'data_query_name_a' => :'DataQueryNameA',
|
59
51
|
:'data_a_index_field' => :'DataAIndexField',
|
60
|
-
:'
|
61
|
-
:'file_info_b' => :'FileInfoB',
|
62
|
-
:'data_item_b' => :'DataItemB',
|
52
|
+
:'data_query_name_b' => :'DataQueryNameB',
|
63
53
|
:'data_b_index_field' => :'DataBIndexField',
|
64
|
-
:'join_type' => :'JoinType'
|
54
|
+
:'join_type' => :'JoinType',
|
55
|
+
:'applied_operate_type' => :'AppliedOperateType'
|
65
56
|
}
|
66
57
|
end
|
67
58
|
|
68
59
|
# Attribute type mapping.
|
69
60
|
def self.swagger_types
|
70
61
|
{
|
71
|
-
:'
|
72
|
-
:'file_info_a' => :'FileInfo',
|
73
|
-
:'data_item_a' => :'DataItem',
|
62
|
+
:'data_query_name_a' => :'String',
|
74
63
|
:'data_a_index_field' => :'String',
|
75
|
-
:'
|
76
|
-
:'file_info_b' => :'FileInfo',
|
77
|
-
:'data_item_b' => :'DataItem',
|
64
|
+
:'data_query_name_b' => :'String',
|
78
65
|
:'data_b_index_field' => :'String',
|
79
|
-
:'join_type' => :'String'
|
66
|
+
:'join_type' => :'String',
|
67
|
+
:'applied_operate_type' => :'String'
|
80
68
|
}
|
81
69
|
end
|
82
70
|
|
@@ -88,26 +76,14 @@ module AsposeCellsCloud
|
|
88
76
|
# convert string to symbol for hash key
|
89
77
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
90
78
|
|
91
|
-
if attributes.has_key?(:'
|
92
|
-
self.
|
93
|
-
end
|
94
|
-
if attributes.has_key?(:'FileInfoA')
|
95
|
-
self.file_info_a = attributes[:'FileInfoA']
|
96
|
-
end
|
97
|
-
if attributes.has_key?(:'DataItemA')
|
98
|
-
self.data_item_a = attributes[:'DataItemA']
|
79
|
+
if attributes.has_key?(:'DataQueryNameA')
|
80
|
+
self.data_query_name_a = attributes[:'DataQueryNameA']
|
99
81
|
end
|
100
82
|
if attributes.has_key?(:'DataAIndexField')
|
101
83
|
self.data_a_index_field = attributes[:'DataAIndexField']
|
102
84
|
end
|
103
|
-
if attributes.has_key?(:'
|
104
|
-
self.
|
105
|
-
end
|
106
|
-
if attributes.has_key?(:'FileInfoB')
|
107
|
-
self.file_info_b = attributes[:'FileInfoB']
|
108
|
-
end
|
109
|
-
if attributes.has_key?(:'DataItemB')
|
110
|
-
self.data_item_b = attributes[:'DataItemB']
|
85
|
+
if attributes.has_key?(:'DataQueryNameB')
|
86
|
+
self.data_query_name_b = attributes[:'DataQueryNameB']
|
111
87
|
end
|
112
88
|
if attributes.has_key?(:'DataBIndexField')
|
113
89
|
self.data_b_index_field = attributes[:'DataBIndexField']
|
@@ -115,6 +91,9 @@ module AsposeCellsCloud
|
|
115
91
|
if attributes.has_key?(:'JoinType')
|
116
92
|
self.join_type = attributes[:'JoinType']
|
117
93
|
end
|
94
|
+
if attributes.has_key?(:'AppliedOperateType')
|
95
|
+
self.applied_operate_type = attributes[:'AppliedOperateType']
|
96
|
+
end
|
118
97
|
|
119
98
|
end
|
120
99
|
|
@@ -122,26 +101,14 @@ module AsposeCellsCloud
|
|
122
101
|
# @return Array for valid properies with the reasons
|
123
102
|
def list_invalid_properties
|
124
103
|
invalid_properties = Array.new
|
125
|
-
if @
|
126
|
-
invalid_properties.push("invalid value for '
|
127
|
-
end
|
128
|
-
if @file_info_a.nil?
|
129
|
-
invalid_properties.push("invalid value for 'file_info_a', file_info_a cannot be nil.")
|
130
|
-
end
|
131
|
-
if @data_item_a.nil?
|
132
|
-
invalid_properties.push("invalid value for 'data_item_a', data_item_a cannot be nil.")
|
104
|
+
if @data_query_name_a.nil?
|
105
|
+
invalid_properties.push("invalid value for 'data_query_name_a', data_query_name_a cannot be nil.")
|
133
106
|
end
|
134
107
|
if @data_a_index_field.nil?
|
135
108
|
invalid_properties.push("invalid value for 'data_a_index_field', data_a_index_field cannot be nil.")
|
136
109
|
end
|
137
|
-
if @
|
138
|
-
invalid_properties.push("invalid value for '
|
139
|
-
end
|
140
|
-
if @file_info_b.nil?
|
141
|
-
invalid_properties.push("invalid value for 'file_info_b', file_info_b cannot be nil.")
|
142
|
-
end
|
143
|
-
if @data_item_b.nil?
|
144
|
-
invalid_properties.push("invalid value for 'data_item_b', data_item_b cannot be nil.")
|
110
|
+
if @data_query_name_b.nil?
|
111
|
+
invalid_properties.push("invalid value for 'data_query_name_b', data_query_name_b cannot be nil.")
|
145
112
|
end
|
146
113
|
if @data_b_index_field.nil?
|
147
114
|
invalid_properties.push("invalid value for 'data_b_index_field', data_b_index_field cannot be nil.")
|
@@ -149,6 +116,9 @@ module AsposeCellsCloud
|
|
149
116
|
if @join_type.nil?
|
150
117
|
invalid_properties.push("invalid value for 'join_type', join_type cannot be nil.")
|
151
118
|
end
|
119
|
+
if @applied_operate_type.nil?
|
120
|
+
invalid_properties.push("invalid value for 'applied_operate_type', applied_operate_type cannot be nil.")
|
121
|
+
end
|
152
122
|
|
153
123
|
return invalid_properties
|
154
124
|
end
|
@@ -156,15 +126,12 @@ module AsposeCellsCloud
|
|
156
126
|
# Check to see if the all the properties in the model are valid
|
157
127
|
# @return true if the model is valid
|
158
128
|
def valid?
|
159
|
-
return false if @
|
160
|
-
return false if @file_info_a.nil?
|
161
|
-
return false if @data_item_a.nil?
|
129
|
+
return false if @data_query_name_a.nil?
|
162
130
|
return false if @data_a_index_field.nil?
|
163
|
-
return false if @
|
164
|
-
return false if @file_info_b.nil?
|
165
|
-
return false if @data_item_b.nil?
|
131
|
+
return false if @data_query_name_b.nil?
|
166
132
|
return false if @data_b_index_field.nil?
|
167
133
|
return false if @join_type.nil?
|
134
|
+
return false if @applied_operate_type.nil?
|
168
135
|
return true
|
169
136
|
end
|
170
137
|
|
@@ -173,15 +140,12 @@ module AsposeCellsCloud
|
|
173
140
|
def ==(o)
|
174
141
|
return true if self.equal?(o)
|
175
142
|
self.class == o.class &&
|
176
|
-
|
177
|
-
file_info_a == o.file_info_a &&
|
178
|
-
data_item_a == o.data_item_a &&
|
143
|
+
data_query_name_a == o.data_query_name_a &&
|
179
144
|
data_a_index_field == o.data_a_index_field &&
|
180
|
-
|
181
|
-
file_info_b == o.file_info_b &&
|
182
|
-
data_item_b == o.data_item_b &&
|
145
|
+
data_query_name_b == o.data_query_name_b &&
|
183
146
|
data_b_index_field == o.data_b_index_field &&
|
184
|
-
join_type == o.join_type
|
147
|
+
join_type == o.join_type &&
|
148
|
+
applied_operate_type == o.applied_operate_type
|
185
149
|
std_dev == o.std_dev
|
186
150
|
end
|
187
151
|
|
@@ -194,7 +158,7 @@ module AsposeCellsCloud
|
|
194
158
|
# Calculates hash code according to all attributes.
|
195
159
|
# @return [Fixnum] Hash code
|
196
160
|
def hash
|
197
|
-
[
|
161
|
+
[ data_query_name_a , data_a_index_field , data_query_name_b , data_b_index_field , join_type , applied_operate_type ].hash
|
198
162
|
end
|
199
163
|
|
200
164
|
# Builds the object from hash
|
@@ -31,16 +31,19 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class PivotColumn
|
34
|
-
#
|
34
|
+
#Represents pivot column name.
|
35
35
|
attr_accessor :pivot_column_name
|
36
|
-
#
|
36
|
+
#Represents column name that sets the column's value to the value of the pivot column.
|
37
37
|
attr_accessor :value_column_names
|
38
|
+
#
|
39
|
+
attr_accessor :applied_operate_type
|
38
40
|
|
39
41
|
# Attribute mapping from ruby-style variable name to JSON key.
|
40
42
|
def self.attribute_map
|
41
43
|
{
|
42
44
|
:'pivot_column_name' => :'PivotColumnName',
|
43
|
-
:'value_column_names' => :'ValueColumnNames'
|
45
|
+
:'value_column_names' => :'ValueColumnNames',
|
46
|
+
:'applied_operate_type' => :'AppliedOperateType'
|
44
47
|
}
|
45
48
|
end
|
46
49
|
|
@@ -48,7 +51,8 @@ module AsposeCellsCloud
|
|
48
51
|
def self.swagger_types
|
49
52
|
{
|
50
53
|
:'pivot_column_name' => :'String',
|
51
|
-
:'value_column_names' => :'Array<String>'
|
54
|
+
:'value_column_names' => :'Array<String>',
|
55
|
+
:'applied_operate_type' => :'String'
|
52
56
|
}
|
53
57
|
end
|
54
58
|
|
@@ -66,6 +70,9 @@ module AsposeCellsCloud
|
|
66
70
|
if attributes.has_key?(:'ValueColumnNames')
|
67
71
|
self.value_column_names = attributes[:'ValueColumnNames']
|
68
72
|
end
|
73
|
+
if attributes.has_key?(:'AppliedOperateType')
|
74
|
+
self.applied_operate_type = attributes[:'AppliedOperateType']
|
75
|
+
end
|
69
76
|
|
70
77
|
end
|
71
78
|
|
@@ -79,6 +86,9 @@ module AsposeCellsCloud
|
|
79
86
|
if @value_column_names.nil?
|
80
87
|
invalid_properties.push("invalid value for 'value_column_names', value_column_names cannot be nil.")
|
81
88
|
end
|
89
|
+
if @applied_operate_type.nil?
|
90
|
+
invalid_properties.push("invalid value for 'applied_operate_type', applied_operate_type cannot be nil.")
|
91
|
+
end
|
82
92
|
|
83
93
|
return invalid_properties
|
84
94
|
end
|
@@ -88,6 +98,7 @@ module AsposeCellsCloud
|
|
88
98
|
def valid?
|
89
99
|
return false if @pivot_column_name.nil?
|
90
100
|
return false if @value_column_names.nil?
|
101
|
+
return false if @applied_operate_type.nil?
|
91
102
|
return true
|
92
103
|
end
|
93
104
|
|
@@ -97,7 +108,8 @@ module AsposeCellsCloud
|
|
97
108
|
return true if self.equal?(o)
|
98
109
|
self.class == o.class &&
|
99
110
|
pivot_column_name == o.pivot_column_name &&
|
100
|
-
value_column_names == o.value_column_names
|
111
|
+
value_column_names == o.value_column_names &&
|
112
|
+
applied_operate_type == o.applied_operate_type
|
101
113
|
std_dev == o.std_dev
|
102
114
|
end
|
103
115
|
|
@@ -110,7 +122,7 @@ module AsposeCellsCloud
|
|
110
122
|
# Calculates hash code according to all attributes.
|
111
123
|
# @return [Fixnum] Hash code
|
112
124
|
def hash
|
113
|
-
[ pivot_column_name , value_column_names ].hash
|
125
|
+
[ pivot_column_name , value_column_names , applied_operate_type ].hash
|
114
126
|
end
|
115
127
|
|
116
128
|
# Builds the object from hash
|
@@ -31,19 +31,22 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class UnpivotColumn
|
34
|
-
#
|
34
|
+
#Indicates unpivot column names.
|
35
35
|
attr_accessor :unpivot_column_names
|
36
|
-
#
|
36
|
+
#Indicates the column is used to store the name of unpivot columns.
|
37
37
|
attr_accessor :column_map_name
|
38
|
-
#
|
38
|
+
#Indicates the column is used to store the value of unpivot columns.
|
39
39
|
attr_accessor :value_map_name
|
40
|
+
#
|
41
|
+
attr_accessor :applied_operate_type
|
40
42
|
|
41
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
42
44
|
def self.attribute_map
|
43
45
|
{
|
44
46
|
:'unpivot_column_names' => :'UnpivotColumnNames',
|
45
47
|
:'column_map_name' => :'ColumnMapName',
|
46
|
-
:'value_map_name' => :'ValueMapName'
|
48
|
+
:'value_map_name' => :'ValueMapName',
|
49
|
+
:'applied_operate_type' => :'AppliedOperateType'
|
47
50
|
}
|
48
51
|
end
|
49
52
|
|
@@ -52,7 +55,8 @@ module AsposeCellsCloud
|
|
52
55
|
{
|
53
56
|
:'unpivot_column_names' => :'Array<String>',
|
54
57
|
:'column_map_name' => :'String',
|
55
|
-
:'value_map_name' => :'String'
|
58
|
+
:'value_map_name' => :'String',
|
59
|
+
:'applied_operate_type' => :'String'
|
56
60
|
}
|
57
61
|
end
|
58
62
|
|
@@ -73,6 +77,9 @@ module AsposeCellsCloud
|
|
73
77
|
if attributes.has_key?(:'ValueMapName')
|
74
78
|
self.value_map_name = attributes[:'ValueMapName']
|
75
79
|
end
|
80
|
+
if attributes.has_key?(:'AppliedOperateType')
|
81
|
+
self.applied_operate_type = attributes[:'AppliedOperateType']
|
82
|
+
end
|
76
83
|
|
77
84
|
end
|
78
85
|
|
@@ -89,6 +96,9 @@ module AsposeCellsCloud
|
|
89
96
|
if @value_map_name.nil?
|
90
97
|
invalid_properties.push("invalid value for 'value_map_name', value_map_name cannot be nil.")
|
91
98
|
end
|
99
|
+
if @applied_operate_type.nil?
|
100
|
+
invalid_properties.push("invalid value for 'applied_operate_type', applied_operate_type cannot be nil.")
|
101
|
+
end
|
92
102
|
|
93
103
|
return invalid_properties
|
94
104
|
end
|
@@ -99,6 +109,7 @@ module AsposeCellsCloud
|
|
99
109
|
return false if @unpivot_column_names.nil?
|
100
110
|
return false if @column_map_name.nil?
|
101
111
|
return false if @value_map_name.nil?
|
112
|
+
return false if @applied_operate_type.nil?
|
102
113
|
return true
|
103
114
|
end
|
104
115
|
|
@@ -109,7 +120,8 @@ module AsposeCellsCloud
|
|
109
120
|
self.class == o.class &&
|
110
121
|
unpivot_column_names == o.unpivot_column_names &&
|
111
122
|
column_map_name == o.column_map_name &&
|
112
|
-
value_map_name == o.value_map_name
|
123
|
+
value_map_name == o.value_map_name &&
|
124
|
+
applied_operate_type == o.applied_operate_type
|
113
125
|
std_dev == o.std_dev
|
114
126
|
end
|
115
127
|
|
@@ -122,7 +134,7 @@ module AsposeCellsCloud
|
|
122
134
|
# Calculates hash code according to all attributes.
|
123
135
|
# @return [Fixnum] Hash code
|
124
136
|
def hash
|
125
|
-
[ unpivot_column_names , column_map_name , value_map_name ].hash
|
137
|
+
[ unpivot_column_names , column_map_name , value_map_name , applied_operate_type ].hash
|
126
138
|
end
|
127
139
|
|
128
140
|
# Builds the object from hash
|
@@ -0,0 +1,92 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="PostAccessToken_request.rb.cs">
|
4
|
+
Copyright (c) 2024 Aspose.Cells Cloud
|
5
|
+
</copyright>
|
6
|
+
<summary>
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
9
|
+
in the Software without restriction, including without limitation the rights
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
12
|
+
furnished to do so, subject to the following conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
15
|
+
copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
SOFTWARE.
|
24
|
+
</summary>
|
25
|
+
--------------------------------------------------------------------------------------------------------------------
|
26
|
+
=end
|
27
|
+
|
28
|
+
|
29
|
+
require "uri"
|
30
|
+
|
31
|
+
module AsposeCellsCloud
|
32
|
+
class PostAccessTokenRequest
|
33
|
+
|
34
|
+
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return unless attributes.is_a?(Hash)
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
40
|
+
|
41
|
+
|
42
|
+
end
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
44
|
+
def self.attribute_map
|
45
|
+
{
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
def self.swagger_types
|
51
|
+
{
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
def create_http_request(api_client,opts = {})
|
56
|
+
if api_client.config.debugging
|
57
|
+
api_client.config.logger.debug "Calling API: CellsApi.post_access_token ..."
|
58
|
+
end
|
59
|
+
api_client.request_token_if_needed
|
60
|
+
|
61
|
+
# resource path
|
62
|
+
local_var_path = "/cells/connect/token"
|
63
|
+
# query parameters
|
64
|
+
query_params = {}
|
65
|
+
# header parameters
|
66
|
+
header_params = {}
|
67
|
+
# HTTP header 'Accept' (if needed)
|
68
|
+
header_params['Accept'] = api_client.select_header_accept(['application/json'])
|
69
|
+
# HTTP header 'Content-Type'
|
70
|
+
header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
|
71
|
+
|
72
|
+
# form parameters
|
73
|
+
form_params = {}
|
74
|
+
post_body = nil
|
75
|
+
|
76
|
+
|
77
|
+
#auth_names = []
|
78
|
+
auth_names = ['JWT']
|
79
|
+
data, status_code, headers = api_client.call_api(:POST, local_var_path,
|
80
|
+
:header_params => header_params,
|
81
|
+
:query_params => query_params,
|
82
|
+
:form_params => form_params,
|
83
|
+
:body => post_body,
|
84
|
+
:auth_names => auth_names,
|
85
|
+
:return_type => 'String')
|
86
|
+
if api_client.config.debugging
|
87
|
+
api_client.config.logger.debug "API called: Specification.Name>Api.post_access_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="PostAddTextContent_request.rb.cs">
|
4
|
+
Copyright (c) 2024 Aspose.Cells Cloud
|
5
|
+
</copyright>
|
6
|
+
<summary>
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
9
|
+
in the Software without restriction, including without limitation the rights
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
12
|
+
furnished to do so, subject to the following conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
15
|
+
copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
SOFTWARE.
|
24
|
+
</summary>
|
25
|
+
--------------------------------------------------------------------------------------------------------------------
|
26
|
+
=end
|
27
|
+
|
28
|
+
|
29
|
+
require "uri"
|
30
|
+
|
31
|
+
module AsposeCellsCloud
|
32
|
+
class PostAddTextContentRequest
|
33
|
+
|
34
|
+
attr_accessor :add_text_options
|
35
|
+
|
36
|
+
def initialize(attributes = {})
|
37
|
+
return unless attributes.is_a?(Hash)
|
38
|
+
|
39
|
+
# convert string to symbol for hash key
|
40
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
41
|
+
|
42
|
+
if attributes.has_key?(:'addTextOptions')
|
43
|
+
self.add_text_options = attributes[:'addTextOptions']
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'add_text_options' => :'addTextOptions'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.swagger_types
|
56
|
+
{
|
57
|
+
:'add_text_options' => :'AddTextOptions'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
def create_http_request(api_client,opts = {})
|
62
|
+
if api_client.config.debugging
|
63
|
+
api_client.config.logger.debug "Calling API: CellsApi.post_add_text_content ..."
|
64
|
+
end
|
65
|
+
api_client.request_token_if_needed
|
66
|
+
# verify the required parameter 'add_text_options' is set
|
67
|
+
if api_client.config.client_side_validation && add_text_options.nil?
|
68
|
+
fail ArgumentError, "Missing the required parameter 'add_text_options' when calling CellsApi.post_add_text_content "
|
69
|
+
end
|
70
|
+
|
71
|
+
# resource path
|
72
|
+
local_var_path = "/cells/addtext"
|
73
|
+
# query parameters
|
74
|
+
query_params = {}
|
75
|
+
# header parameters
|
76
|
+
header_params = {}
|
77
|
+
# HTTP header 'Accept' (if needed)
|
78
|
+
header_params['Accept'] = api_client.select_header_accept(['application/json'])
|
79
|
+
# HTTP header 'Content-Type'
|
80
|
+
header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
|
81
|
+
|
82
|
+
# form parameters
|
83
|
+
form_params = {}
|
84
|
+
post_body = nil
|
85
|
+
post_body = api_client.object_to_http_body(add_text_options)
|
86
|
+
|
87
|
+
|
88
|
+
#auth_names = []
|
89
|
+
auth_names = ['JWT']
|
90
|
+
data, status_code, headers = api_client.call_api(:POST, local_var_path,
|
91
|
+
:header_params => header_params,
|
92
|
+
:query_params => query_params,
|
93
|
+
:form_params => form_params,
|
94
|
+
:body => post_body,
|
95
|
+
:auth_names => auth_names,
|
96
|
+
:return_type => 'FileInfo')
|
97
|
+
if api_client.config.debugging
|
98
|
+
api_client.config.logger.debug "API called: Specification.Name>Api.post_add_text_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
99
|
+
end
|
100
|
+
return data, status_code, headers
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
data/lib/aspose_cells_cloud.rb
CHANGED
@@ -336,19 +336,21 @@ require 'aspose_cells_cloud/models/worksheet_moving_request'
|
|
336
336
|
require 'aspose_cells_cloud/models/image_or_print_options'
|
337
337
|
require 'aspose_cells_cloud/models/rendering_font'
|
338
338
|
require 'aspose_cells_cloud/models/rendering_watermark'
|
339
|
+
require 'aspose_cells_cloud/models/applied_operate'
|
340
|
+
require 'aspose_cells_cloud/models/applied_step'
|
341
|
+
require 'aspose_cells_cloud/models/data_query'
|
339
342
|
require 'aspose_cells_cloud/models/load_data'
|
340
343
|
require 'aspose_cells_cloud/models/load_to'
|
341
344
|
require 'aspose_cells_cloud/models/merge_queries'
|
342
345
|
require 'aspose_cells_cloud/models/pivot_column'
|
343
|
-
require 'aspose_cells_cloud/models/query_data_source'
|
344
|
-
require 'aspose_cells_cloud/models/query_table'
|
345
|
-
require 'aspose_cells_cloud/models/transformation'
|
346
346
|
require 'aspose_cells_cloud/models/unpivot_column'
|
347
347
|
require 'aspose_cells_cloud/models/pivot_field'
|
348
348
|
require 'aspose_cells_cloud/models/pivot_filter'
|
349
349
|
require 'aspose_cells_cloud/models/pivot_item'
|
350
350
|
require 'aspose_cells_cloud/models/pivot_table'
|
351
351
|
require 'aspose_cells_cloud/models/pivot_tables'
|
352
|
+
require 'aspose_cells_cloud/models/add_text_options'
|
353
|
+
require 'aspose_cells_cloud/models/base_operate_options'
|
352
354
|
require 'aspose_cells_cloud/models/cell_value'
|
353
355
|
require 'aspose_cells_cloud/models/custom_parser_config'
|
354
356
|
require 'aspose_cells_cloud/models/import2_dimension_double_array_option'
|
@@ -464,6 +466,7 @@ require 'aspose_cells_cloud/requests/post_batch_protect_request'
|
|
464
466
|
require 'aspose_cells_cloud/requests/post_batch_lock_request'
|
465
467
|
require 'aspose_cells_cloud/requests/post_batch_unlock_request'
|
466
468
|
require 'aspose_cells_cloud/requests/post_batch_split_request'
|
469
|
+
require 'aspose_cells_cloud/requests/post_access_token_request'
|
467
470
|
require 'aspose_cells_cloud/requests/post_clear_contents_request'
|
468
471
|
require 'aspose_cells_cloud/requests/post_clear_formats_request'
|
469
472
|
require 'aspose_cells_cloud/requests/post_update_worksheet_range_style_request'
|
@@ -696,6 +699,7 @@ require 'aspose_cells_cloud/requests/delete_worksheet_sparkline_group_request'
|
|
696
699
|
require 'aspose_cells_cloud/requests/put_worksheet_sparkline_group_request'
|
697
700
|
require 'aspose_cells_cloud/requests/post_worksheet_sparkline_group_request'
|
698
701
|
require 'aspose_cells_cloud/requests/post_run_task_request'
|
702
|
+
require 'aspose_cells_cloud/requests/post_add_text_content_request'
|
699
703
|
require 'aspose_cells_cloud/requests/get_workbook_default_style_request'
|
700
704
|
require 'aspose_cells_cloud/requests/get_workbook_text_items_request'
|
701
705
|
require 'aspose_cells_cloud/requests/get_workbook_names_request'
|
@@ -70,4 +70,38 @@ describe 'CellsApi' do
|
|
70
70
|
@instance.post_workbook_data_fill(request);
|
71
71
|
end
|
72
72
|
end
|
73
|
+
|
74
|
+
describe 'post_data_transformation test' do
|
75
|
+
it "should work" do
|
76
|
+
remote_folder = 'TestData/In'
|
77
|
+
|
78
|
+
local_name = 'BookTableL2W.xlsx'
|
79
|
+
remote_name = 'BookTableL2W.xlsx'
|
80
|
+
|
81
|
+
|
82
|
+
mapFiles = { }
|
83
|
+
mapFiles[local_name] = ::File.open(File.expand_path("TestData/"+local_name),"r")
|
84
|
+
|
85
|
+
uploadrequest = AsposeCellsCloud::UploadFileRequest.new( { :UploadFiles=>mapFiles,:path=>remote_folder })
|
86
|
+
@instance.upload_file(uploadrequest)
|
87
|
+
dataTransformationRequestLoadDataLoadTo = AsposeCellsCloud::LoadTo.new(:beginColumnIndex=>2 ,:beginRowIndex=>3 ,:Worksheet=>'L2W' );
|
88
|
+
dataTransformationRequestLoadDataDataQueryDataItem = AsposeCellsCloud::DataItem.new(:DataItemType=>'Table' ,:Value=>'Table1' );
|
89
|
+
dataTransformationRequestLoadDataDataQueryDataSource = AsposeCellsCloud::DataSource.new(:DataSourceType=>'CloudFileSystem' ,:DataPath=>'BookTableL2W.xlsx' );
|
90
|
+
dataTransformationRequestLoadDataDataQuery = AsposeCellsCloud::DataQuery.new(:Name=>'DataQuery' ,:DataItem=>dataTransformationRequestLoadDataDataQueryDataItem ,:DataSource=>dataTransformationRequestLoadDataDataQueryDataSource ,:DataSourceDataType=>'ListObject' );
|
91
|
+
dataTransformationRequestLoadData = AsposeCellsCloud::LoadData.new(:LoadTo=>dataTransformationRequestLoadDataLoadTo ,:DataQuery=>dataTransformationRequestLoadDataDataQuery );
|
92
|
+
dataTransformationRequestAppliedStepsAppliedStep0AppliedOperateUnpivotColumnNames = [
|
93
|
+
'2017',
|
94
|
+
'2018',
|
95
|
+
'2019'
|
96
|
+
];
|
97
|
+
dataTransformationRequestAppliedStepsAppliedStep0AppliedOperate = AsposeCellsCloud::UnpivotColumn.new(:AppliedOperateType=>'UnpivotColumn' ,:ValueMapName=>'Count' ,:ColumnMapName=>'Date' ,:UnpivotColumnNames=>dataTransformationRequestAppliedStepsAppliedStep0AppliedOperateUnpivotColumnNames );
|
98
|
+
dataTransformationRequestAppliedStepsAppliedStep0 = AsposeCellsCloud::AppliedStep.new(:StepName=>'UnpivotColumn' ,:AppliedOperate=>dataTransformationRequestAppliedStepsAppliedStep0AppliedOperate );
|
99
|
+
dataTransformationRequestAppliedSteps = [
|
100
|
+
dataTransformationRequestAppliedStepsAppliedStep0
|
101
|
+
];
|
102
|
+
dataTransformationRequest = AsposeCellsCloud::DataTransformationRequest.new(:LoadData=>dataTransformationRequestLoadData ,:AppliedSteps=>dataTransformationRequestAppliedSteps );
|
103
|
+
request = AsposeCellsCloud::PostDataTransformationRequest.new(:dataTransformationRequest=>dataTransformationRequest);
|
104
|
+
@instance.post_data_transformation(request);
|
105
|
+
end
|
106
|
+
end
|
73
107
|
end
|