cloudmersive-convert-api-client 2.1.7 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -4
  3. data/docs/DocxTableTableFillRequest.md +12 -0
  4. data/docs/DocxTableTableFillTableCell.md +9 -0
  5. data/docs/DocxTableTableFillTableRow.md +8 -0
  6. data/docs/EditHtmlApi.md +418 -0
  7. data/docs/EditPdfApi.md +6 -2
  8. data/docs/HtmlGetLanguageResult.md +9 -0
  9. data/docs/HtmlGetRelCanonicalUrlResult.md +9 -0
  10. data/docs/HtmlGetSitemapUrlResult.md +9 -0
  11. data/docs/MergeDocumentApi.md +2 -2
  12. data/docs/TransformDocumentApi.md +55 -0
  13. data/docs/ZipArchiveApi.md +16 -3
  14. data/lib/cloudmersive-convert-api-client.rb +6 -0
  15. data/lib/cloudmersive-convert-api-client/api/edit_html_api.rb +392 -0
  16. data/lib/cloudmersive-convert-api-client/api/edit_pdf_api.rb +3 -0
  17. data/lib/cloudmersive-convert-api-client/api/merge_document_api.rb +3 -3
  18. data/lib/cloudmersive-convert-api-client/api/transform_document_api.rb +54 -0
  19. data/lib/cloudmersive-convert-api-client/api/zip_archive_api.rb +20 -3
  20. data/lib/cloudmersive-convert-api-client/models/docx_table_table_fill_request.rb +243 -0
  21. data/lib/cloudmersive-convert-api-client/models/docx_table_table_fill_table_cell.rb +196 -0
  22. data/lib/cloudmersive-convert-api-client/models/docx_table_table_fill_table_row.rb +188 -0
  23. data/lib/cloudmersive-convert-api-client/models/html_get_language_result.rb +196 -0
  24. data/lib/cloudmersive-convert-api-client/models/html_get_rel_canonical_url_result.rb +196 -0
  25. data/lib/cloudmersive-convert-api-client/models/html_get_sitemap_url_result.rb +196 -0
  26. data/lib/cloudmersive-convert-api-client/version.rb +1 -1
  27. data/spec/api/edit_html_api_spec.rb +95 -0
  28. data/spec/api/edit_pdf_api_spec.rb +1 -0
  29. data/spec/api/merge_document_api_spec.rb +1 -1
  30. data/spec/api/transform_document_api_spec.rb +12 -0
  31. data/spec/api/zip_archive_api_spec.rb +3 -0
  32. data/spec/models/docx_table_table_fill_request_spec.rb +65 -0
  33. data/spec/models/docx_table_table_fill_table_cell_spec.rb +47 -0
  34. data/spec/models/docx_table_table_fill_table_row_spec.rb +41 -0
  35. data/spec/models/html_get_language_result_spec.rb +47 -0
  36. data/spec/models/html_get_rel_canonical_url_result_spec.rb +47 -0
  37. data/spec/models/html_get_sitemap_url_result_spec.rb +47 -0
  38. metadata +20 -2
@@ -0,0 +1,196 @@
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveConvertApiClient
16
+ # Result of getting the sitemap URL of the input HTML document
17
+ class HtmlGetSitemapUrlResult
18
+ # True if the operation was successful, false otherwise
19
+ attr_accessor :successful
20
+
21
+ # HTML sitemap URL if present
22
+ attr_accessor :canonical_url
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'successful' => :'Successful',
28
+ :'canonical_url' => :'CanonicalUrl'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'successful' => :'BOOLEAN',
36
+ :'canonical_url' => :'String'
37
+ }
38
+ end
39
+
40
+ # Initializes the object
41
+ # @param [Hash] attributes Model attributes in the form of hash
42
+ def initialize(attributes = {})
43
+ return unless attributes.is_a?(Hash)
44
+
45
+ # convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
47
+
48
+ if attributes.has_key?(:'Successful')
49
+ self.successful = attributes[:'Successful']
50
+ end
51
+
52
+ if attributes.has_key?(:'CanonicalUrl')
53
+ self.canonical_url = attributes[:'CanonicalUrl']
54
+ end
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properties with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ invalid_properties
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ def valid?
67
+ true
68
+ end
69
+
70
+ # Checks equality by comparing each attribute.
71
+ # @param [Object] Object to be compared
72
+ def ==(o)
73
+ return true if self.equal?(o)
74
+ self.class == o.class &&
75
+ successful == o.successful &&
76
+ canonical_url == o.canonical_url
77
+ end
78
+
79
+ # @see the `==` method
80
+ # @param [Object] Object to be compared
81
+ def eql?(o)
82
+ self == o
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Fixnum] Hash code
87
+ def hash
88
+ [successful, canonical_url].hash
89
+ end
90
+
91
+ # Builds the object from hash
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ # @return [Object] Returns the model itself
94
+ def build_from_hash(attributes)
95
+ return nil unless attributes.is_a?(Hash)
96
+ self.class.swagger_types.each_pair do |key, type|
97
+ if type =~ /\AArray<(.*)>/i
98
+ # check to ensure the input is an array given that the attribute
99
+ # is documented as an array but the input is not
100
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
101
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
102
+ end
103
+ elsif !attributes[self.class.attribute_map[key]].nil?
104
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
105
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
106
+ end
107
+
108
+ self
109
+ end
110
+
111
+ # Deserializes the data based on type
112
+ # @param string type Data type
113
+ # @param string value Value to be deserialized
114
+ # @return [Object] Deserialized data
115
+ def _deserialize(type, value)
116
+ case type.to_sym
117
+ when :DateTime
118
+ DateTime.parse(value)
119
+ when :Date
120
+ Date.parse(value)
121
+ when :String
122
+ value.to_s
123
+ when :Integer
124
+ value.to_i
125
+ when :Float
126
+ value.to_f
127
+ when :BOOLEAN
128
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
129
+ true
130
+ else
131
+ false
132
+ end
133
+ when :Object
134
+ # generic object (usually a Hash), return directly
135
+ value
136
+ when /\AArray<(?<inner_type>.+)>\z/
137
+ inner_type = Regexp.last_match[:inner_type]
138
+ value.map { |v| _deserialize(inner_type, v) }
139
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
140
+ k_type = Regexp.last_match[:k_type]
141
+ v_type = Regexp.last_match[:v_type]
142
+ {}.tap do |hash|
143
+ value.each do |k, v|
144
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
145
+ end
146
+ end
147
+ else # model
148
+ temp_model = CloudmersiveConvertApiClient.const_get(type).new
149
+ temp_model.build_from_hash(value)
150
+ end
151
+ end
152
+
153
+ # Returns the string representation of the object
154
+ # @return [String] String presentation of the object
155
+ def to_s
156
+ to_hash.to_s
157
+ end
158
+
159
+ # to_body is an alias to to_hash (backward compatibility)
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_body
162
+ to_hash
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ next if value.nil?
172
+ hash[param] = _to_hash(value)
173
+ end
174
+ hash
175
+ end
176
+
177
+ # Outputs non-array value in the form of hash
178
+ # For object, use to_hash. Otherwise, just return the value
179
+ # @param [Object] value Any valid value
180
+ # @return [Hash] Returns the value in the form of hash
181
+ def _to_hash(value)
182
+ if value.is_a?(Array)
183
+ value.compact.map { |v| _to_hash(v) }
184
+ elsif value.is_a?(Hash)
185
+ {}.tap do |hash|
186
+ value.each { |k, v| hash[k] = _to_hash(v) }
187
+ end
188
+ elsif value.respond_to? :to_hash
189
+ value.to_hash
190
+ else
191
+ value
192
+ end
193
+ end
194
+
195
+ end
196
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.14
11
11
  =end
12
12
 
13
13
  module CloudmersiveConvertApiClient
14
- VERSION = '2.1.7'
14
+ VERSION = '2.2.1'
15
15
  end
@@ -32,6 +32,20 @@ describe 'EditHtmlApi' do
32
32
  end
33
33
  end
34
34
 
35
+ # unit tests for edit_html_html_append_header_tag
36
+ # Append an HTML tag to the HEAD section of an HTML Document
37
+ # Appends an HTML tag to the HEAD section of an HTML document.
38
+ # @param html_tag The HTML tag to append.
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [File] :input_file Optional: Input file to perform the operation on.
41
+ # @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
42
+ # @return [String]
43
+ describe 'edit_html_html_append_header_tag test' do
44
+ it 'should work' do
45
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
46
+ end
47
+ end
48
+
35
49
  # unit tests for edit_html_html_append_heading
36
50
  # Append a Heading to an HTML Document
37
51
  # Appends a heading to the end of an HTML document.
@@ -111,6 +125,19 @@ describe 'EditHtmlApi' do
111
125
  end
112
126
  end
113
127
 
128
+ # unit tests for edit_html_html_get_language
129
+ # Gets the language for the HTML document
130
+ # Retrieves the language code (e.g. \&quot;en\&quot; or \&quot;de\&quot;) of an HTML document.
131
+ # @param [Hash] opts the optional parameters
132
+ # @option opts [File] :input_file Optional: Input file to perform the operation on.
133
+ # @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
134
+ # @return [HtmlGetLanguageResult]
135
+ describe 'edit_html_html_get_language test' do
136
+ it 'should work' do
137
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
138
+ end
139
+ end
140
+
114
141
  # unit tests for edit_html_html_get_links
115
142
  # Extract resolved link URLs from HTML File
116
143
  # Extracts the resolved link URLs, fully-qualified if possible, from an input HTML file.
@@ -125,4 +152,72 @@ describe 'EditHtmlApi' do
125
152
  end
126
153
  end
127
154
 
155
+ # unit tests for edit_html_html_get_rel_canonical
156
+ # Gets the rel canonical URL for the HTML document
157
+ # Gets the rel canonical URL of an HTML document.
158
+ # @param [Hash] opts the optional parameters
159
+ # @option opts [File] :input_file Optional: Input file to perform the operation on.
160
+ # @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
161
+ # @return [HtmlGetRelCanonicalUrlResult]
162
+ describe 'edit_html_html_get_rel_canonical test' do
163
+ it 'should work' do
164
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
165
+ end
166
+ end
167
+
168
+ # unit tests for edit_html_html_get_sitemap
169
+ # Gets the sitemap URL for the HTML document
170
+ # Gets the sitemap link URL of an HTML document.
171
+ # @param [Hash] opts the optional parameters
172
+ # @option opts [File] :input_file Optional: Input file to perform the operation on.
173
+ # @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
174
+ # @return [HtmlGetSitemapUrlResult]
175
+ describe 'edit_html_html_get_sitemap test' do
176
+ it 'should work' do
177
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
178
+ end
179
+ end
180
+
181
+ # unit tests for edit_html_html_set_language
182
+ # Sets the language for the HTML document
183
+ # Sets the language code of an HTML document.
184
+ # @param language_code The HTML langauge code to set.
185
+ # @param [Hash] opts the optional parameters
186
+ # @option opts [File] :input_file Optional: Input file to perform the operation on.
187
+ # @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
188
+ # @return [String]
189
+ describe 'edit_html_html_set_language test' do
190
+ it 'should work' do
191
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
192
+ end
193
+ end
194
+
195
+ # unit tests for edit_html_html_set_rel_canonical
196
+ # Sets the rel canonical URL for the HTML document
197
+ # Sets the rel canonical URL of an HTML document. This is useful for telling search engines and other indexers which pages are duplicates of eachother; any pages with the rel&#x3D;canonical tag will be treated as duplicates of the canonical URL.
198
+ # @param canonical_url The HTML canonical URL to set.
199
+ # @param [Hash] opts the optional parameters
200
+ # @option opts [File] :input_file Optional: Input file to perform the operation on.
201
+ # @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
202
+ # @return [String]
203
+ describe 'edit_html_html_set_rel_canonical test' do
204
+ it 'should work' do
205
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
206
+ end
207
+ end
208
+
209
+ # unit tests for edit_html_html_set_sitemap_url
210
+ # Sets the sitemap URL for the HTML document
211
+ # Sets the sitemap URL of an HTML document.
212
+ # @param sitemap_url The HTML sitemap URL to set.
213
+ # @param [Hash] opts the optional parameters
214
+ # @option opts [File] :input_file Optional: Input file to perform the operation on.
215
+ # @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
216
+ # @return [String]
217
+ describe 'edit_html_html_set_sitemap_url test' do
218
+ it 'should work' do
219
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
220
+ end
221
+ end
222
+
128
223
  end
@@ -193,6 +193,7 @@ describe 'EditPdfApi' do
193
193
  # Reduces the file size and optimizes the content of a PDF to minimize its file size.
194
194
  # @param input_file Input file to perform the operation on.
195
195
  # @param [Hash] opts the optional parameters
196
+ # @option opts [Float] :quality Quality level for the images in the PDF, ranging from 0.0 (low quality) to 1.0 (high quality); default is 0.3
196
197
  # @return [String]
197
198
  describe 'edit_pdf_reduce_file_size test' do
198
199
  it 'should work' do
@@ -72,7 +72,7 @@ describe 'MergeDocumentApi' do
72
72
  # @param input_file1 First input file to perform the operation on.
73
73
  # @param input_file2 Second input file to perform the operation on (more than 2 can be supplied).
74
74
  # @param [Hash] opts the optional parameters
75
- # @return [Object]
75
+ # @return [String]
76
76
  describe 'merge_document_html test' do
77
77
  it 'should work' do
78
78
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -48,6 +48,18 @@ describe 'TransformDocumentApi' do
48
48
  end
49
49
  end
50
50
 
51
+ # unit tests for transform_document_docx_table_fill_in
52
+ # Fill in data in a table in a Word DOCX document
53
+ # Replace placeholder rows ina table in an Office Word Document (docx) using one or more templates
54
+ # @param request
55
+ # @param [Hash] opts the optional parameters
56
+ # @return [String]
57
+ describe 'transform_document_docx_table_fill_in test' do
58
+ it 'should work' do
59
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
60
+ end
61
+ end
62
+
51
63
  # unit tests for transform_document_pptx_replace
52
64
  # Replace string in PowerPoint PPTX presentation
53
65
  # Replace all instances of a string in an Office PowerPoint Document (pptx)
@@ -91,7 +91,10 @@ describe 'ZipArchiveApi' do
91
91
  # unit tests for zip_archive_zip_create_quarantine
92
92
  # Create an encrypted zip file to quarantine a dangerous file
93
93
  # Create a new zip archive by compressing input files, and also applies encryption and password protection to the zip, for the purposes of quarantining the underlyikng file.
94
+ # @param password Password to place on the Zip file; the longer the password, the more secure
95
+ # @param input_file1 First input file to perform the operation on.
94
96
  # @param [Hash] opts the optional parameters
97
+ # @option opts [String] :encryption_algorithm Encryption algorithm to use; possible values are AES-256 (recommended), AES-128, and PK-Zip (not recommended; legacy, weak encryption algorithm). Default is AES-256.
95
98
  # @return [Object]
96
99
  describe 'zip_archive_zip_create_quarantine test' do
97
100
  it 'should work' do
@@ -0,0 +1,65 @@
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveConvertApiClient::DocxTableTableFillRequest
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'DocxTableTableFillRequest' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::DocxTableTableFillRequest.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of DocxTableTableFillRequest' do
31
+ it 'should create an instance of DocxTableTableFillRequest' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::DocxTableTableFillRequest)
33
+ end
34
+ end
35
+ describe 'test attribute "input_file_url"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "input_file_data"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "table_start_tag"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "table_end_tag"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ describe 'test attribute "data_to_fill_in"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
65
+ end
@@ -0,0 +1,47 @@
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveConvertApiClient::DocxTableTableFillTableCell
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'DocxTableTableFillTableCell' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::DocxTableTableFillTableCell.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of DocxTableTableFillTableCell' do
31
+ it 'should create an instance of DocxTableTableFillTableCell' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::DocxTableTableFillTableCell)
33
+ end
34
+ end
35
+ describe 'test attribute "target_tag"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "replacement_value"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end