cloudmersive-convert-api-client 1.6.4 → 1.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/docs/ConvertDocumentApi.md +59 -4
- data/docs/SplitDocumentApi.md +55 -0
- data/docs/SplitTextDocumentByLinesResult.md +10 -0
- data/docs/TextDocumentLine.md +9 -0
- data/lib/cloudmersive-convert-api-client.rb +2 -0
- data/lib/cloudmersive-convert-api-client/api/convert_document_api.rb +60 -4
- data/lib/cloudmersive-convert-api-client/api/split_document_api.rb +56 -0
- data/lib/cloudmersive-convert-api-client/models/split_text_document_by_lines_result.rb +210 -0
- data/lib/cloudmersive-convert-api-client/models/text_document_line.rb +199 -0
- data/lib/cloudmersive-convert-api-client/version.rb +1 -1
- data/spec/api/convert_document_api_spec.rb +12 -0
- data/spec/api/split_document_api_spec.rb +12 -0
- data/spec/models/split_text_document_by_lines_result_spec.rb +54 -0
- data/spec/models/text_document_line_spec.rb +48 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31c3b9486b0fb3e997dfe4154dc594e663cfa34b2d0178aad7b0e5006e1f1b4c
|
4
|
+
data.tar.gz: ed42cfd522a8022cd2a5c70fb5fa7511f0b14d160cf9f831d8d7434e0a7b31fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31eb5abdbb51f33f14bf0f14cc88926fbfd5f3263ef24b9801cb06a12fb22019fbdab2e3322deec92efc6a17739dc82dfe1cb5441ec9eec37e807b0697cb54ea
|
7
|
+
data.tar.gz: 4a4dc57cd8bb31311232fd3e98d5fe9c02383d1b19d0a7ab27b6b1dc685f4a65afffaa13b1f254fbdef79f6bfbb1170004d8865f2b974cfa6925e4334b7ce761
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Convert API lets you effortlessly convert file formats and types.
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: v1
|
10
|
-
- Package version: 1.6.
|
10
|
+
- Package version: 1.6.5
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,15 +23,15 @@ gem build cloudmersive-convert-api-client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./cloudmersive-convert-api-client-1.6.
|
26
|
+
gem install ./cloudmersive-convert-api-client-1.6.5.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-convert-api-client-1.6.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-convert-api-client-1.6.5.gem` to install the development dependencies)
|
29
29
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
31
|
|
32
32
|
Finally add this to the Gemfile:
|
33
33
|
|
34
|
-
gem 'cloudmersive-convert-api-client', '~> 1.6.
|
34
|
+
gem 'cloudmersive-convert-api-client', '~> 1.6.5'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -108,6 +108,7 @@ Class | Method | HTTP request | Description
|
|
108
108
|
*CloudmersiveConvertApiClient::ConvertDocumentApi* | [**convert_document_csv_to_xlsx**](docs/ConvertDocumentApi.md#convert_document_csv_to_xlsx) | **POST** /convert/csv/to/xlsx | Convert CSV to Excel XLSX Spreadsheet
|
109
109
|
*CloudmersiveConvertApiClient::ConvertDocumentApi* | [**convert_document_doc_to_docx**](docs/ConvertDocumentApi.md#convert_document_doc_to_docx) | **POST** /convert/doc/to/docx | Convert Word DOC (97-03) Document to DOCX
|
110
110
|
*CloudmersiveConvertApiClient::ConvertDocumentApi* | [**convert_document_doc_to_pdf**](docs/ConvertDocumentApi.md#convert_document_doc_to_pdf) | **POST** /convert/doc/to/pdf | Convert Word DOC (97-03) Document to PDF
|
111
|
+
*CloudmersiveConvertApiClient::ConvertDocumentApi* | [**convert_document_doc_to_txt**](docs/ConvertDocumentApi.md#convert_document_doc_to_txt) | **POST** /convert/doc/to/txt | Convert Word DOC (97-03) Document to Text (txt)
|
111
112
|
*CloudmersiveConvertApiClient::ConvertDocumentApi* | [**convert_document_docx_to_pdf**](docs/ConvertDocumentApi.md#convert_document_docx_to_pdf) | **POST** /convert/docx/to/pdf | Convert Word DOCX Document to PDF
|
112
113
|
*CloudmersiveConvertApiClient::ConvertDocumentApi* | [**convert_document_docx_to_txt**](docs/ConvertDocumentApi.md#convert_document_docx_to_txt) | **POST** /convert/docx/to/txt | Convert Word DOCX Document to Text (txt)
|
113
114
|
*CloudmersiveConvertApiClient::ConvertDocumentApi* | [**convert_document_html_to_pdf**](docs/ConvertDocumentApi.md#convert_document_html_to_pdf) | **POST** /convert/html/to/pdf | Convert HTML document file to PDF Document
|
@@ -217,6 +218,7 @@ Class | Method | HTTP request | Description
|
|
217
218
|
*CloudmersiveConvertApiClient::SplitDocumentApi* | [**split_document_docx**](docs/SplitDocumentApi.md#split_document_docx) | **POST** /convert/split/docx | Split a single Word Document DOCX into Separate Documents by Page
|
218
219
|
*CloudmersiveConvertApiClient::SplitDocumentApi* | [**split_document_pdf_by_page**](docs/SplitDocumentApi.md#split_document_pdf_by_page) | **POST** /convert/split/pdf | Split a PDF file into separate PDF files, one per page
|
219
220
|
*CloudmersiveConvertApiClient::SplitDocumentApi* | [**split_document_pptx**](docs/SplitDocumentApi.md#split_document_pptx) | **POST** /convert/split/pptx | Split a single PowerPoint Presentation PPTX into Separate Slides
|
221
|
+
*CloudmersiveConvertApiClient::SplitDocumentApi* | [**split_document_txt_by_line**](docs/SplitDocumentApi.md#split_document_txt_by_line) | **POST** /convert/split/txt/by-line | Split a single Text file (txt) into lines
|
220
222
|
*CloudmersiveConvertApiClient::SplitDocumentApi* | [**split_document_xlsx**](docs/SplitDocumentApi.md#split_document_xlsx) | **POST** /convert/split/xlsx | Split a single Excel XLSX into Separate Worksheets
|
221
223
|
*CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_autodetect_validation**](docs/ValidateDocumentApi.md#validate_document_autodetect_validation) | **POST** /convert/validate/autodetect | Autodetect content type and validate
|
222
224
|
*CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_docx_validation**](docs/ValidateDocumentApi.md#validate_document_docx_validation) | **POST** /convert/validate/docx | Validate a Word document (DOCX)
|
@@ -358,8 +360,10 @@ Class | Method | HTTP request | Description
|
|
358
360
|
- [CloudmersiveConvertApiClient::SplitDocxDocumentResult](docs/SplitDocxDocumentResult.md)
|
359
361
|
- [CloudmersiveConvertApiClient::SplitPdfResult](docs/SplitPdfResult.md)
|
360
362
|
- [CloudmersiveConvertApiClient::SplitPptxPresentationResult](docs/SplitPptxPresentationResult.md)
|
363
|
+
- [CloudmersiveConvertApiClient::SplitTextDocumentByLinesResult](docs/SplitTextDocumentByLinesResult.md)
|
361
364
|
- [CloudmersiveConvertApiClient::SplitXlsxWorksheetResult](docs/SplitXlsxWorksheetResult.md)
|
362
365
|
- [CloudmersiveConvertApiClient::TextConversionResult](docs/TextConversionResult.md)
|
366
|
+
- [CloudmersiveConvertApiClient::TextDocumentLine](docs/TextDocumentLine.md)
|
363
367
|
- [CloudmersiveConvertApiClient::UpdateDocxTableCellRequest](docs/UpdateDocxTableCellRequest.md)
|
364
368
|
- [CloudmersiveConvertApiClient::UpdateDocxTableCellResponse](docs/UpdateDocxTableCellResponse.md)
|
365
369
|
- [CloudmersiveConvertApiClient::UpdateDocxTableRowRequest](docs/UpdateDocxTableRowRequest.md)
|
data/docs/ConvertDocumentApi.md
CHANGED
@@ -11,6 +11,7 @@ Method | HTTP request | Description
|
|
11
11
|
[**convert_document_csv_to_xlsx**](ConvertDocumentApi.md#convert_document_csv_to_xlsx) | **POST** /convert/csv/to/xlsx | Convert CSV to Excel XLSX Spreadsheet
|
12
12
|
[**convert_document_doc_to_docx**](ConvertDocumentApi.md#convert_document_doc_to_docx) | **POST** /convert/doc/to/docx | Convert Word DOC (97-03) Document to DOCX
|
13
13
|
[**convert_document_doc_to_pdf**](ConvertDocumentApi.md#convert_document_doc_to_pdf) | **POST** /convert/doc/to/pdf | Convert Word DOC (97-03) Document to PDF
|
14
|
+
[**convert_document_doc_to_txt**](ConvertDocumentApi.md#convert_document_doc_to_txt) | **POST** /convert/doc/to/txt | Convert Word DOC (97-03) Document to Text (txt)
|
14
15
|
[**convert_document_docx_to_pdf**](ConvertDocumentApi.md#convert_document_docx_to_pdf) | **POST** /convert/docx/to/pdf | Convert Word DOCX Document to PDF
|
15
16
|
[**convert_document_docx_to_txt**](ConvertDocumentApi.md#convert_document_docx_to_txt) | **POST** /convert/docx/to/txt | Convert Word DOCX Document to Text (txt)
|
16
17
|
[**convert_document_html_to_pdf**](ConvertDocumentApi.md#convert_document_html_to_pdf) | **POST** /convert/html/to/pdf | Convert HTML document file to PDF Document
|
@@ -251,7 +252,7 @@ Name | Type | Description | Notes
|
|
251
252
|
### HTTP request headers
|
252
253
|
|
253
254
|
- **Content-Type**: multipart/form-data
|
254
|
-
- **Accept**: application/
|
255
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
255
256
|
|
256
257
|
|
257
258
|
|
@@ -417,6 +418,60 @@ Name | Type | Description | Notes
|
|
417
418
|
|
418
419
|
|
419
420
|
|
421
|
+
# **convert_document_doc_to_txt**
|
422
|
+
> TextConversionResult convert_document_doc_to_txt(input_file)
|
423
|
+
|
424
|
+
Convert Word DOC (97-03) Document to Text (txt)
|
425
|
+
|
426
|
+
Convert Office Word DOC (97-03) Document (doc) to text
|
427
|
+
|
428
|
+
### Example
|
429
|
+
```ruby
|
430
|
+
# load the gem
|
431
|
+
require 'cloudmersive-convert-api-client'
|
432
|
+
# setup authorization
|
433
|
+
CloudmersiveConvertApiClient.configure do |config|
|
434
|
+
# Configure API key authorization: Apikey
|
435
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
436
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
437
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
438
|
+
end
|
439
|
+
|
440
|
+
api_instance = CloudmersiveConvertApiClient::ConvertDocumentApi.new
|
441
|
+
|
442
|
+
input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
|
443
|
+
|
444
|
+
|
445
|
+
begin
|
446
|
+
#Convert Word DOC (97-03) Document to Text (txt)
|
447
|
+
result = api_instance.convert_document_doc_to_txt(input_file)
|
448
|
+
p result
|
449
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
450
|
+
puts "Exception when calling ConvertDocumentApi->convert_document_doc_to_txt: #{e}"
|
451
|
+
end
|
452
|
+
```
|
453
|
+
|
454
|
+
### Parameters
|
455
|
+
|
456
|
+
Name | Type | Description | Notes
|
457
|
+
------------- | ------------- | ------------- | -------------
|
458
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
459
|
+
|
460
|
+
### Return type
|
461
|
+
|
462
|
+
[**TextConversionResult**](TextConversionResult.md)
|
463
|
+
|
464
|
+
### Authorization
|
465
|
+
|
466
|
+
[Apikey](../README.md#Apikey)
|
467
|
+
|
468
|
+
### HTTP request headers
|
469
|
+
|
470
|
+
- **Content-Type**: multipart/form-data
|
471
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
472
|
+
|
473
|
+
|
474
|
+
|
420
475
|
# **convert_document_docx_to_pdf**
|
421
476
|
> String convert_document_docx_to_pdf(input_file)
|
422
477
|
|
@@ -521,7 +576,7 @@ Name | Type | Description | Notes
|
|
521
576
|
### HTTP request headers
|
522
577
|
|
523
578
|
- **Content-Type**: multipart/form-data
|
524
|
-
- **Accept**: application/
|
579
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
525
580
|
|
526
581
|
|
527
582
|
|
@@ -1302,7 +1357,7 @@ Name | Type | Description | Notes
|
|
1302
1357
|
### HTTP request headers
|
1303
1358
|
|
1304
1359
|
- **Content-Type**: multipart/form-data
|
1305
|
-
- **Accept**: application/
|
1360
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
1306
1361
|
|
1307
1362
|
|
1308
1363
|
|
@@ -1630,7 +1685,7 @@ Name | Type | Description | Notes
|
|
1630
1685
|
### HTTP request headers
|
1631
1686
|
|
1632
1687
|
- **Content-Type**: multipart/form-data
|
1633
|
-
- **Accept**: application/
|
1688
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
1634
1689
|
|
1635
1690
|
|
1636
1691
|
|
data/docs/SplitDocumentApi.md
CHANGED
@@ -7,6 +7,7 @@ Method | HTTP request | Description
|
|
7
7
|
[**split_document_docx**](SplitDocumentApi.md#split_document_docx) | **POST** /convert/split/docx | Split a single Word Document DOCX into Separate Documents by Page
|
8
8
|
[**split_document_pdf_by_page**](SplitDocumentApi.md#split_document_pdf_by_page) | **POST** /convert/split/pdf | Split a PDF file into separate PDF files, one per page
|
9
9
|
[**split_document_pptx**](SplitDocumentApi.md#split_document_pptx) | **POST** /convert/split/pptx | Split a single PowerPoint Presentation PPTX into Separate Slides
|
10
|
+
[**split_document_txt_by_line**](SplitDocumentApi.md#split_document_txt_by_line) | **POST** /convert/split/txt/by-line | Split a single Text file (txt) into lines
|
10
11
|
[**split_document_xlsx**](SplitDocumentApi.md#split_document_xlsx) | **POST** /convert/split/xlsx | Split a single Excel XLSX into Separate Worksheets
|
11
12
|
|
12
13
|
|
@@ -184,6 +185,60 @@ Name | Type | Description | Notes
|
|
184
185
|
|
185
186
|
|
186
187
|
|
188
|
+
# **split_document_txt_by_line**
|
189
|
+
> SplitTextDocumentByLinesResult split_document_txt_by_line(input_file)
|
190
|
+
|
191
|
+
Split a single Text file (txt) into lines
|
192
|
+
|
193
|
+
Split a Text (txt) Document by line, returning each line separately in order. Supports multiple types of newlines.
|
194
|
+
|
195
|
+
### Example
|
196
|
+
```ruby
|
197
|
+
# load the gem
|
198
|
+
require 'cloudmersive-convert-api-client'
|
199
|
+
# setup authorization
|
200
|
+
CloudmersiveConvertApiClient.configure do |config|
|
201
|
+
# Configure API key authorization: Apikey
|
202
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
203
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
204
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
205
|
+
end
|
206
|
+
|
207
|
+
api_instance = CloudmersiveConvertApiClient::SplitDocumentApi.new
|
208
|
+
|
209
|
+
input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
|
210
|
+
|
211
|
+
|
212
|
+
begin
|
213
|
+
#Split a single Text file (txt) into lines
|
214
|
+
result = api_instance.split_document_txt_by_line(input_file)
|
215
|
+
p result
|
216
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
217
|
+
puts "Exception when calling SplitDocumentApi->split_document_txt_by_line: #{e}"
|
218
|
+
end
|
219
|
+
```
|
220
|
+
|
221
|
+
### Parameters
|
222
|
+
|
223
|
+
Name | Type | Description | Notes
|
224
|
+
------------- | ------------- | ------------- | -------------
|
225
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
226
|
+
|
227
|
+
### Return type
|
228
|
+
|
229
|
+
[**SplitTextDocumentByLinesResult**](SplitTextDocumentByLinesResult.md)
|
230
|
+
|
231
|
+
### Authorization
|
232
|
+
|
233
|
+
[Apikey](../README.md#Apikey)
|
234
|
+
|
235
|
+
### HTTP request headers
|
236
|
+
|
237
|
+
- **Content-Type**: multipart/form-data
|
238
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
239
|
+
|
240
|
+
|
241
|
+
|
187
242
|
# **split_document_xlsx**
|
188
243
|
> SplitXlsxWorksheetResult split_document_xlsx(input_file, opts)
|
189
244
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::SplitTextDocumentByLinesResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**result_lines** | [**Array<TextDocumentLine>**](TextDocumentLine.md) | | [optional]
|
7
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
8
|
+
**line_count** | **Integer** | The count of lines in the text file | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::TextDocumentLine
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**line_number** | **Integer** | The 1-based line index of the line | [optional]
|
7
|
+
**line_contents** | **String** | The text contents of a single line of a text file | [optional]
|
8
|
+
|
9
|
+
|
@@ -144,8 +144,10 @@ require 'cloudmersive-convert-api-client/models/split_document_result'
|
|
144
144
|
require 'cloudmersive-convert-api-client/models/split_docx_document_result'
|
145
145
|
require 'cloudmersive-convert-api-client/models/split_pdf_result'
|
146
146
|
require 'cloudmersive-convert-api-client/models/split_pptx_presentation_result'
|
147
|
+
require 'cloudmersive-convert-api-client/models/split_text_document_by_lines_result'
|
147
148
|
require 'cloudmersive-convert-api-client/models/split_xlsx_worksheet_result'
|
148
149
|
require 'cloudmersive-convert-api-client/models/text_conversion_result'
|
150
|
+
require 'cloudmersive-convert-api-client/models/text_document_line'
|
149
151
|
require 'cloudmersive-convert-api-client/models/update_docx_table_cell_request'
|
150
152
|
require 'cloudmersive-convert-api-client/models/update_docx_table_cell_response'
|
151
153
|
require 'cloudmersive-convert-api-client/models/update_docx_table_row_request'
|
@@ -222,7 +222,7 @@ module CloudmersiveConvertApiClient
|
|
222
222
|
# header parameters
|
223
223
|
header_params = {}
|
224
224
|
# HTTP header 'Accept' (if needed)
|
225
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/
|
225
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
226
226
|
# HTTP header 'Content-Type'
|
227
227
|
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
228
228
|
header_params[:'textFormattingMode'] = opts[:'text_formatting_mode'] if !opts[:'text_formatting_mode'].nil?
|
@@ -415,6 +415,62 @@ module CloudmersiveConvertApiClient
|
|
415
415
|
return data, status_code, headers
|
416
416
|
end
|
417
417
|
|
418
|
+
# Convert Word DOC (97-03) Document to Text (txt)
|
419
|
+
# Convert Office Word DOC (97-03) Document (doc) to text
|
420
|
+
# @param input_file Input file to perform the operation on.
|
421
|
+
# @param [Hash] opts the optional parameters
|
422
|
+
# @return [TextConversionResult]
|
423
|
+
def convert_document_doc_to_txt(input_file, opts = {})
|
424
|
+
data, _status_code, _headers = convert_document_doc_to_txt_with_http_info(input_file, opts)
|
425
|
+
return data
|
426
|
+
end
|
427
|
+
|
428
|
+
# Convert Word DOC (97-03) Document to Text (txt)
|
429
|
+
# Convert Office Word DOC (97-03) Document (doc) to text
|
430
|
+
# @param input_file Input file to perform the operation on.
|
431
|
+
# @param [Hash] opts the optional parameters
|
432
|
+
# @return [Array<(TextConversionResult, Fixnum, Hash)>] TextConversionResult data, response status code and response headers
|
433
|
+
def convert_document_doc_to_txt_with_http_info(input_file, opts = {})
|
434
|
+
if @api_client.config.debugging
|
435
|
+
@api_client.config.logger.debug "Calling API: ConvertDocumentApi.convert_document_doc_to_txt ..."
|
436
|
+
end
|
437
|
+
# verify the required parameter 'input_file' is set
|
438
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
439
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_doc_to_txt"
|
440
|
+
end
|
441
|
+
# resource path
|
442
|
+
local_var_path = "/convert/doc/to/txt"
|
443
|
+
|
444
|
+
# query parameters
|
445
|
+
query_params = {}
|
446
|
+
|
447
|
+
# header parameters
|
448
|
+
header_params = {}
|
449
|
+
# HTTP header 'Accept' (if needed)
|
450
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
451
|
+
# HTTP header 'Content-Type'
|
452
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
453
|
+
|
454
|
+
# form parameters
|
455
|
+
form_params = {}
|
456
|
+
form_params["inputFile"] = input_file
|
457
|
+
|
458
|
+
# http body (model)
|
459
|
+
post_body = nil
|
460
|
+
auth_names = ['Apikey']
|
461
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
462
|
+
:header_params => header_params,
|
463
|
+
:query_params => query_params,
|
464
|
+
:form_params => form_params,
|
465
|
+
:body => post_body,
|
466
|
+
:auth_names => auth_names,
|
467
|
+
:return_type => 'TextConversionResult')
|
468
|
+
if @api_client.config.debugging
|
469
|
+
@api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_doc_to_txt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
470
|
+
end
|
471
|
+
return data, status_code, headers
|
472
|
+
end
|
473
|
+
|
418
474
|
# Convert Word DOCX Document to PDF
|
419
475
|
# Convert Office Word Documents (docx) to standard PDF
|
420
476
|
# @param input_file Input file to perform the operation on.
|
@@ -503,7 +559,7 @@ module CloudmersiveConvertApiClient
|
|
503
559
|
# header parameters
|
504
560
|
header_params = {}
|
505
561
|
# HTTP header 'Accept' (if needed)
|
506
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/
|
562
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
507
563
|
# HTTP header 'Content-Type'
|
508
564
|
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
509
565
|
|
@@ -1321,7 +1377,7 @@ module CloudmersiveConvertApiClient
|
|
1321
1377
|
# header parameters
|
1322
1378
|
header_params = {}
|
1323
1379
|
# HTTP header 'Accept' (if needed)
|
1324
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/
|
1380
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
1325
1381
|
# HTTP header 'Content-Type'
|
1326
1382
|
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
1327
1383
|
|
@@ -1660,7 +1716,7 @@ module CloudmersiveConvertApiClient
|
|
1660
1716
|
# header parameters
|
1661
1717
|
header_params = {}
|
1662
1718
|
# HTTP header 'Accept' (if needed)
|
1663
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/
|
1719
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
1664
1720
|
# HTTP header 'Content-Type'
|
1665
1721
|
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
1666
1722
|
|
@@ -197,6 +197,62 @@ module CloudmersiveConvertApiClient
|
|
197
197
|
return data, status_code, headers
|
198
198
|
end
|
199
199
|
|
200
|
+
# Split a single Text file (txt) into lines
|
201
|
+
# Split a Text (txt) Document by line, returning each line separately in order. Supports multiple types of newlines.
|
202
|
+
# @param input_file Input file to perform the operation on.
|
203
|
+
# @param [Hash] opts the optional parameters
|
204
|
+
# @return [SplitTextDocumentByLinesResult]
|
205
|
+
def split_document_txt_by_line(input_file, opts = {})
|
206
|
+
data, _status_code, _headers = split_document_txt_by_line_with_http_info(input_file, opts)
|
207
|
+
return data
|
208
|
+
end
|
209
|
+
|
210
|
+
# Split a single Text file (txt) into lines
|
211
|
+
# Split a Text (txt) Document by line, returning each line separately in order. Supports multiple types of newlines.
|
212
|
+
# @param input_file Input file to perform the operation on.
|
213
|
+
# @param [Hash] opts the optional parameters
|
214
|
+
# @return [Array<(SplitTextDocumentByLinesResult, Fixnum, Hash)>] SplitTextDocumentByLinesResult data, response status code and response headers
|
215
|
+
def split_document_txt_by_line_with_http_info(input_file, opts = {})
|
216
|
+
if @api_client.config.debugging
|
217
|
+
@api_client.config.logger.debug "Calling API: SplitDocumentApi.split_document_txt_by_line ..."
|
218
|
+
end
|
219
|
+
# verify the required parameter 'input_file' is set
|
220
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
221
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling SplitDocumentApi.split_document_txt_by_line"
|
222
|
+
end
|
223
|
+
# resource path
|
224
|
+
local_var_path = "/convert/split/txt/by-line"
|
225
|
+
|
226
|
+
# query parameters
|
227
|
+
query_params = {}
|
228
|
+
|
229
|
+
# header parameters
|
230
|
+
header_params = {}
|
231
|
+
# HTTP header 'Accept' (if needed)
|
232
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
233
|
+
# HTTP header 'Content-Type'
|
234
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
235
|
+
|
236
|
+
# form parameters
|
237
|
+
form_params = {}
|
238
|
+
form_params["inputFile"] = input_file
|
239
|
+
|
240
|
+
# http body (model)
|
241
|
+
post_body = nil
|
242
|
+
auth_names = ['Apikey']
|
243
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
244
|
+
:header_params => header_params,
|
245
|
+
:query_params => query_params,
|
246
|
+
:form_params => form_params,
|
247
|
+
:body => post_body,
|
248
|
+
:auth_names => auth_names,
|
249
|
+
:return_type => 'SplitTextDocumentByLinesResult')
|
250
|
+
if @api_client.config.debugging
|
251
|
+
@api_client.config.logger.debug "API called: SplitDocumentApi#split_document_txt_by_line\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
252
|
+
end
|
253
|
+
return data, status_code, headers
|
254
|
+
end
|
255
|
+
|
200
256
|
# Split a single Excel XLSX into Separate Worksheets
|
201
257
|
# Split an Excel XLSX Spreadsheet, comprised of multiple Worksheets (or Tabs) into separate Excel XLSX spreadsheet files, with each containing exactly one Worksheet.
|
202
258
|
# @param input_file Input file to perform the operation on.
|
@@ -0,0 +1,210 @@
|
|
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.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module CloudmersiveConvertApiClient
|
16
|
+
# The result of splitting a Text document into separate lines
|
17
|
+
class SplitTextDocumentByLinesResult
|
18
|
+
attr_accessor :result_lines
|
19
|
+
|
20
|
+
# True if the operation was successful, false otherwise
|
21
|
+
attr_accessor :successful
|
22
|
+
|
23
|
+
# The count of lines in the text file
|
24
|
+
attr_accessor :line_count
|
25
|
+
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'result_lines' => :'ResultLines',
|
31
|
+
:'successful' => :'Successful',
|
32
|
+
:'line_count' => :'LineCount'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.swagger_types
|
38
|
+
{
|
39
|
+
:'result_lines' => :'Array<TextDocumentLine>',
|
40
|
+
:'successful' => :'BOOLEAN',
|
41
|
+
:'line_count' => :'Integer'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
return unless attributes.is_a?(Hash)
|
49
|
+
|
50
|
+
# convert string to symbol for hash key
|
51
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
52
|
+
|
53
|
+
if attributes.has_key?(:'ResultLines')
|
54
|
+
if (value = attributes[:'ResultLines']).is_a?(Array)
|
55
|
+
self.result_lines = value
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
if attributes.has_key?(:'Successful')
|
60
|
+
self.successful = attributes[:'Successful']
|
61
|
+
end
|
62
|
+
|
63
|
+
if attributes.has_key?(:'LineCount')
|
64
|
+
self.line_count = attributes[:'LineCount']
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
|
69
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
70
|
+
# @return Array for valid properties with the reasons
|
71
|
+
def list_invalid_properties
|
72
|
+
invalid_properties = Array.new
|
73
|
+
return invalid_properties
|
74
|
+
end
|
75
|
+
|
76
|
+
# Check to see if the all the properties in the model are valid
|
77
|
+
# @return true if the model is valid
|
78
|
+
def valid?
|
79
|
+
return true
|
80
|
+
end
|
81
|
+
|
82
|
+
# Checks equality by comparing each attribute.
|
83
|
+
# @param [Object] Object to be compared
|
84
|
+
def ==(o)
|
85
|
+
return true if self.equal?(o)
|
86
|
+
self.class == o.class &&
|
87
|
+
result_lines == o.result_lines &&
|
88
|
+
successful == o.successful &&
|
89
|
+
line_count == o.line_count
|
90
|
+
end
|
91
|
+
|
92
|
+
# @see the `==` method
|
93
|
+
# @param [Object] Object to be compared
|
94
|
+
def eql?(o)
|
95
|
+
self == o
|
96
|
+
end
|
97
|
+
|
98
|
+
# Calculates hash code according to all attributes.
|
99
|
+
# @return [Fixnum] Hash code
|
100
|
+
def hash
|
101
|
+
[result_lines, successful, line_count].hash
|
102
|
+
end
|
103
|
+
|
104
|
+
# Builds the object from hash
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
106
|
+
# @return [Object] Returns the model itself
|
107
|
+
def build_from_hash(attributes)
|
108
|
+
return nil unless attributes.is_a?(Hash)
|
109
|
+
self.class.swagger_types.each_pair do |key, type|
|
110
|
+
if type =~ /\AArray<(.*)>/i
|
111
|
+
# check to ensure the input is an array given that the the attribute
|
112
|
+
# is documented as an array but the input is not
|
113
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
114
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
115
|
+
end
|
116
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
117
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
118
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
119
|
+
end
|
120
|
+
|
121
|
+
self
|
122
|
+
end
|
123
|
+
|
124
|
+
# Deserializes the data based on type
|
125
|
+
# @param string type Data type
|
126
|
+
# @param string value Value to be deserialized
|
127
|
+
# @return [Object] Deserialized data
|
128
|
+
def _deserialize(type, value)
|
129
|
+
case type.to_sym
|
130
|
+
when :DateTime
|
131
|
+
DateTime.parse(value)
|
132
|
+
when :Date
|
133
|
+
Date.parse(value)
|
134
|
+
when :String
|
135
|
+
value.to_s
|
136
|
+
when :Integer
|
137
|
+
value.to_i
|
138
|
+
when :Float
|
139
|
+
value.to_f
|
140
|
+
when :BOOLEAN
|
141
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
142
|
+
true
|
143
|
+
else
|
144
|
+
false
|
145
|
+
end
|
146
|
+
when :Object
|
147
|
+
# generic object (usually a Hash), return directly
|
148
|
+
value
|
149
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
150
|
+
inner_type = Regexp.last_match[:inner_type]
|
151
|
+
value.map { |v| _deserialize(inner_type, v) }
|
152
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
153
|
+
k_type = Regexp.last_match[:k_type]
|
154
|
+
v_type = Regexp.last_match[:v_type]
|
155
|
+
{}.tap do |hash|
|
156
|
+
value.each do |k, v|
|
157
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
else # model
|
161
|
+
temp_model = CloudmersiveConvertApiClient.const_get(type).new
|
162
|
+
temp_model.build_from_hash(value)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
# Returns the string representation of the object
|
167
|
+
# @return [String] String presentation of the object
|
168
|
+
def to_s
|
169
|
+
to_hash.to_s
|
170
|
+
end
|
171
|
+
|
172
|
+
# to_body is an alias to to_hash (backward compatibility)
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
174
|
+
def to_body
|
175
|
+
to_hash
|
176
|
+
end
|
177
|
+
|
178
|
+
# Returns the object in the form of hash
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
180
|
+
def to_hash
|
181
|
+
hash = {}
|
182
|
+
self.class.attribute_map.each_pair do |attr, param|
|
183
|
+
value = self.send(attr)
|
184
|
+
next if value.nil?
|
185
|
+
hash[param] = _to_hash(value)
|
186
|
+
end
|
187
|
+
hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Outputs non-array value in the form of hash
|
191
|
+
# For object, use to_hash. Otherwise, just return the value
|
192
|
+
# @param [Object] value Any valid value
|
193
|
+
# @return [Hash] Returns the value in the form of hash
|
194
|
+
def _to_hash(value)
|
195
|
+
if value.is_a?(Array)
|
196
|
+
value.compact.map{ |v| _to_hash(v) }
|
197
|
+
elsif value.is_a?(Hash)
|
198
|
+
{}.tap do |hash|
|
199
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
200
|
+
end
|
201
|
+
elsif value.respond_to? :to_hash
|
202
|
+
value.to_hash
|
203
|
+
else
|
204
|
+
value
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
end
|
209
|
+
|
210
|
+
end
|
@@ -0,0 +1,199 @@
|
|
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.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module CloudmersiveConvertApiClient
|
16
|
+
# A single line of a Text document
|
17
|
+
class TextDocumentLine
|
18
|
+
# The 1-based line index of the line
|
19
|
+
attr_accessor :line_number
|
20
|
+
|
21
|
+
# The text contents of a single line of a text file
|
22
|
+
attr_accessor :line_contents
|
23
|
+
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'line_number' => :'LineNumber',
|
29
|
+
:'line_contents' => :'LineContents'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.swagger_types
|
35
|
+
{
|
36
|
+
:'line_number' => :'Integer',
|
37
|
+
:'line_contents' => :'String'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Initializes the object
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
+
def initialize(attributes = {})
|
44
|
+
return unless attributes.is_a?(Hash)
|
45
|
+
|
46
|
+
# convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
48
|
+
|
49
|
+
if attributes.has_key?(:'LineNumber')
|
50
|
+
self.line_number = attributes[:'LineNumber']
|
51
|
+
end
|
52
|
+
|
53
|
+
if attributes.has_key?(:'LineContents')
|
54
|
+
self.line_contents = attributes[:'LineContents']
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
60
|
+
# @return Array for valid properties with the reasons
|
61
|
+
def list_invalid_properties
|
62
|
+
invalid_properties = Array.new
|
63
|
+
return invalid_properties
|
64
|
+
end
|
65
|
+
|
66
|
+
# Check to see if the all the properties in the model are valid
|
67
|
+
# @return true if the model is valid
|
68
|
+
def valid?
|
69
|
+
return true
|
70
|
+
end
|
71
|
+
|
72
|
+
# Checks equality by comparing each attribute.
|
73
|
+
# @param [Object] Object to be compared
|
74
|
+
def ==(o)
|
75
|
+
return true if self.equal?(o)
|
76
|
+
self.class == o.class &&
|
77
|
+
line_number == o.line_number &&
|
78
|
+
line_contents == o.line_contents
|
79
|
+
end
|
80
|
+
|
81
|
+
# @see the `==` method
|
82
|
+
# @param [Object] Object to be compared
|
83
|
+
def eql?(o)
|
84
|
+
self == o
|
85
|
+
end
|
86
|
+
|
87
|
+
# Calculates hash code according to all attributes.
|
88
|
+
# @return [Fixnum] Hash code
|
89
|
+
def hash
|
90
|
+
[line_number, line_contents].hash
|
91
|
+
end
|
92
|
+
|
93
|
+
# Builds the object from hash
|
94
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
95
|
+
# @return [Object] Returns the model itself
|
96
|
+
def build_from_hash(attributes)
|
97
|
+
return nil unless attributes.is_a?(Hash)
|
98
|
+
self.class.swagger_types.each_pair do |key, type|
|
99
|
+
if type =~ /\AArray<(.*)>/i
|
100
|
+
# check to ensure the input is an array given that the the attribute
|
101
|
+
# is documented as an array but the input is not
|
102
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
103
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
104
|
+
end
|
105
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
106
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
107
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
108
|
+
end
|
109
|
+
|
110
|
+
self
|
111
|
+
end
|
112
|
+
|
113
|
+
# Deserializes the data based on type
|
114
|
+
# @param string type Data type
|
115
|
+
# @param string value Value to be deserialized
|
116
|
+
# @return [Object] Deserialized data
|
117
|
+
def _deserialize(type, value)
|
118
|
+
case type.to_sym
|
119
|
+
when :DateTime
|
120
|
+
DateTime.parse(value)
|
121
|
+
when :Date
|
122
|
+
Date.parse(value)
|
123
|
+
when :String
|
124
|
+
value.to_s
|
125
|
+
when :Integer
|
126
|
+
value.to_i
|
127
|
+
when :Float
|
128
|
+
value.to_f
|
129
|
+
when :BOOLEAN
|
130
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
131
|
+
true
|
132
|
+
else
|
133
|
+
false
|
134
|
+
end
|
135
|
+
when :Object
|
136
|
+
# generic object (usually a Hash), return directly
|
137
|
+
value
|
138
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
139
|
+
inner_type = Regexp.last_match[:inner_type]
|
140
|
+
value.map { |v| _deserialize(inner_type, v) }
|
141
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
142
|
+
k_type = Regexp.last_match[:k_type]
|
143
|
+
v_type = Regexp.last_match[:v_type]
|
144
|
+
{}.tap do |hash|
|
145
|
+
value.each do |k, v|
|
146
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
else # model
|
150
|
+
temp_model = CloudmersiveConvertApiClient.const_get(type).new
|
151
|
+
temp_model.build_from_hash(value)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
# Returns the string representation of the object
|
156
|
+
# @return [String] String presentation of the object
|
157
|
+
def to_s
|
158
|
+
to_hash.to_s
|
159
|
+
end
|
160
|
+
|
161
|
+
# to_body is an alias to to_hash (backward compatibility)
|
162
|
+
# @return [Hash] Returns the object in the form of hash
|
163
|
+
def to_body
|
164
|
+
to_hash
|
165
|
+
end
|
166
|
+
|
167
|
+
# Returns the object in the form of hash
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
169
|
+
def to_hash
|
170
|
+
hash = {}
|
171
|
+
self.class.attribute_map.each_pair do |attr, param|
|
172
|
+
value = self.send(attr)
|
173
|
+
next if value.nil?
|
174
|
+
hash[param] = _to_hash(value)
|
175
|
+
end
|
176
|
+
hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Outputs non-array value in the form of hash
|
180
|
+
# For object, use to_hash. Otherwise, just return the value
|
181
|
+
# @param [Object] value Any valid value
|
182
|
+
# @return [Hash] Returns the value in the form of hash
|
183
|
+
def _to_hash(value)
|
184
|
+
if value.is_a?(Array)
|
185
|
+
value.compact.map{ |v| _to_hash(v) }
|
186
|
+
elsif value.is_a?(Hash)
|
187
|
+
{}.tap do |hash|
|
188
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
189
|
+
end
|
190
|
+
elsif value.respond_to? :to_hash
|
191
|
+
value.to_hash
|
192
|
+
else
|
193
|
+
value
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
end
|
198
|
+
|
199
|
+
end
|
@@ -117,6 +117,18 @@ describe 'ConvertDocumentApi' do
|
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
+
# unit tests for convert_document_doc_to_txt
|
121
|
+
# Convert Word DOC (97-03) Document to Text (txt)
|
122
|
+
# Convert Office Word DOC (97-03) Document (doc) to text
|
123
|
+
# @param input_file Input file to perform the operation on.
|
124
|
+
# @param [Hash] opts the optional parameters
|
125
|
+
# @return [TextConversionResult]
|
126
|
+
describe 'convert_document_doc_to_txt test' do
|
127
|
+
it "should work" do
|
128
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
120
132
|
# unit tests for convert_document_docx_to_pdf
|
121
133
|
# Convert Word DOCX Document to PDF
|
122
134
|
# Convert Office Word Documents (docx) to standard PDF
|
@@ -71,6 +71,18 @@ describe 'SplitDocumentApi' do
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
+
# unit tests for split_document_txt_by_line
|
75
|
+
# Split a single Text file (txt) into lines
|
76
|
+
# Split a Text (txt) Document by line, returning each line separately in order. Supports multiple types of newlines.
|
77
|
+
# @param input_file Input file to perform the operation on.
|
78
|
+
# @param [Hash] opts the optional parameters
|
79
|
+
# @return [SplitTextDocumentByLinesResult]
|
80
|
+
describe 'split_document_txt_by_line test' do
|
81
|
+
it "should work" do
|
82
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
74
86
|
# unit tests for split_document_xlsx
|
75
87
|
# Split a single Excel XLSX into Separate Worksheets
|
76
88
|
# Split an Excel XLSX Spreadsheet, comprised of multiple Worksheets (or Tabs) into separate Excel XLSX spreadsheet files, with each containing exactly one Worksheet.
|
@@ -0,0 +1,54 @@
|
|
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.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for CloudmersiveConvertApiClient::SplitTextDocumentByLinesResult
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'SplitTextDocumentByLinesResult' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = CloudmersiveConvertApiClient::SplitTextDocumentByLinesResult.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of SplitTextDocumentByLinesResult' do
|
31
|
+
it 'should create an instance of SplitTextDocumentByLinesResult' do
|
32
|
+
expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::SplitTextDocumentByLinesResult)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "result_lines"' 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 "successful"' 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 "line_count"' 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
|
+
end
|
54
|
+
|
@@ -0,0 +1,48 @@
|
|
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.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for CloudmersiveConvertApiClient::TextDocumentLine
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'TextDocumentLine' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = CloudmersiveConvertApiClient::TextDocumentLine.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of TextDocumentLine' do
|
31
|
+
it 'should create an instance of TextDocumentLine' do
|
32
|
+
expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::TextDocumentLine)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "line_number"' 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 "line_contents"' 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
|
48
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudmersive-convert-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cloudmersive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -339,8 +339,10 @@ files:
|
|
339
339
|
- "./docs/SplitDocxDocumentResult.md"
|
340
340
|
- "./docs/SplitPdfResult.md"
|
341
341
|
- "./docs/SplitPptxPresentationResult.md"
|
342
|
+
- "./docs/SplitTextDocumentByLinesResult.md"
|
342
343
|
- "./docs/SplitXlsxWorksheetResult.md"
|
343
344
|
- "./docs/TextConversionResult.md"
|
345
|
+
- "./docs/TextDocumentLine.md"
|
344
346
|
- "./docs/UpdateDocxTableCellRequest.md"
|
345
347
|
- "./docs/UpdateDocxTableCellResponse.md"
|
346
348
|
- "./docs/UpdateDocxTableRowRequest.md"
|
@@ -509,8 +511,10 @@ files:
|
|
509
511
|
- "./lib/cloudmersive-convert-api-client/models/split_docx_document_result.rb"
|
510
512
|
- "./lib/cloudmersive-convert-api-client/models/split_pdf_result.rb"
|
511
513
|
- "./lib/cloudmersive-convert-api-client/models/split_pptx_presentation_result.rb"
|
514
|
+
- "./lib/cloudmersive-convert-api-client/models/split_text_document_by_lines_result.rb"
|
512
515
|
- "./lib/cloudmersive-convert-api-client/models/split_xlsx_worksheet_result.rb"
|
513
516
|
- "./lib/cloudmersive-convert-api-client/models/text_conversion_result.rb"
|
517
|
+
- "./lib/cloudmersive-convert-api-client/models/text_document_line.rb"
|
514
518
|
- "./lib/cloudmersive-convert-api-client/models/update_docx_table_cell_request.rb"
|
515
519
|
- "./lib/cloudmersive-convert-api-client/models/update_docx_table_cell_response.rb"
|
516
520
|
- "./lib/cloudmersive-convert-api-client/models/update_docx_table_row_request.rb"
|
@@ -675,8 +679,10 @@ files:
|
|
675
679
|
- "./spec/models/split_docx_document_result_spec.rb"
|
676
680
|
- "./spec/models/split_pdf_result_spec.rb"
|
677
681
|
- "./spec/models/split_pptx_presentation_result_spec.rb"
|
682
|
+
- "./spec/models/split_text_document_by_lines_result_spec.rb"
|
678
683
|
- "./spec/models/split_xlsx_worksheet_result_spec.rb"
|
679
684
|
- "./spec/models/text_conversion_result_spec.rb"
|
685
|
+
- "./spec/models/text_document_line_spec.rb"
|
680
686
|
- "./spec/models/update_docx_table_cell_request_spec.rb"
|
681
687
|
- "./spec/models/update_docx_table_cell_response_spec.rb"
|
682
688
|
- "./spec/models/update_docx_table_row_request_spec.rb"
|