cloudmersive-convert-api-client 1.7.5 → 1.7.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd33579cf5967f09473a0affa369671112c65be5284192f24f99f4307b7a9d19
4
- data.tar.gz: cf649e84729034b5abf1da7ab61fc8bb9609008433bccf4ac971df0222979a3e
3
+ metadata.gz: 03ebf8b3092912e7bb2347ac84cfc530be87dc42c157dda0409a8ab108738792
4
+ data.tar.gz: ab778551b685b740f6a151d2dfb48a501eed8492438303005d5e896530ce4053
5
5
  SHA512:
6
- metadata.gz: 889df1a634674598296ba5ef89f9b9a207f70e7e36fcf960b3e3cca2e136563c011833df72e206b115b191a5e2e487be42b8801fe1fee43a29fe1dcc5d49ba28
7
- data.tar.gz: 4e9e541beedef3d83d33b7eec3441b373ebb3b1093e03c4f18d20fc827445654d482e9d8e8b3e19b7948b73fcd4ff9cceefe27f86c7f703a3b7e4c1afc6d7bd3
6
+ metadata.gz: 435a627e9f6dc79aefcbfa8e9201f848840c8c18339e5f962f268f6866811e3030151988e46d3006c4393513e3b879e423ac9d4d8ce7adf11122e426b34c38c4
7
+ data.tar.gz: d0197210a982e1956d16542e10bc06770296d77016308f6b8b57bfd5d710d5bb09f65351a6400ca3214577745ae9b1ac87b760977fc24175970ca483906cad18
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.7.5
10
+ - Package version: 1.7.6
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.7.5.gem
26
+ gem install ./cloudmersive-convert-api-client-1.7.6.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-convert-api-client-1.7.5.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-convert-api-client-1.7.6.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.7.5'
34
+ gem 'cloudmersive-convert-api-client', '~> 1.7.6'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -246,6 +246,7 @@ Class | Method | HTTP request | Description
246
246
  *CloudmersiveConvertApiClient::SplitDocumentApi* | [**split_document_txt_by_string**](docs/SplitDocumentApi.md#split_document_txt_by_string) | **POST** /convert/split/txt/by-string | Split a single Text file (txt) by a string delimiter
247
247
  *CloudmersiveConvertApiClient::SplitDocumentApi* | [**split_document_xlsx**](docs/SplitDocumentApi.md#split_document_xlsx) | **POST** /convert/split/xlsx | Split a single Excel XLSX into Separate Worksheets
248
248
  *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_autodetect_validation**](docs/ValidateDocumentApi.md#validate_document_autodetect_validation) | **POST** /convert/validate/autodetect | Autodetect content type and validate
249
+ *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_csv_validation**](docs/ValidateDocumentApi.md#validate_document_csv_validation) | **POST** /convert/validate/csv | Validate a CSV file document (CSV)
249
250
  *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_docx_validation**](docs/ValidateDocumentApi.md#validate_document_docx_validation) | **POST** /convert/validate/docx | Validate a Word document (DOCX)
250
251
  *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_executable_validation**](docs/ValidateDocumentApi.md#validate_document_executable_validation) | **POST** /convert/validate/executable | Validate if a file is executable
251
252
  *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_g_zip_validation**](docs/ValidateDocumentApi.md#validate_document_g_zip_validation) | **POST** /convert/validate/gzip | Validate a GZip Archive file (gzip or gz)
@@ -22,7 +22,7 @@ Method | HTTP request | Description
22
22
 
23
23
 
24
24
  # **convert_data_csv_to_json**
25
- > Object convert_data_csv_to_json(input_file)
25
+ > Object convert_data_csv_to_json(input_file, opts)
26
26
 
27
27
  Convert CSV to JSON conversion
28
28
 
@@ -44,10 +44,13 @@ api_instance = CloudmersiveConvertApiClient::ConvertDataApi.new
44
44
 
45
45
  input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
46
46
 
47
+ opts = {
48
+ column_names_from_first_row: true # BOOLEAN | Optional; If true, the first row will be used as the labels for the columns; if false, columns will be named Column0, Column1, etc. Default is true. Set to false if you are not using column headings, or have an irregular column structure.
49
+ }
47
50
 
48
51
  begin
49
52
  #Convert CSV to JSON conversion
50
- result = api_instance.convert_data_csv_to_json(input_file)
53
+ result = api_instance.convert_data_csv_to_json(input_file, opts)
51
54
  p result
52
55
  rescue CloudmersiveConvertApiClient::ApiError => e
53
56
  puts "Exception when calling ConvertDataApi->convert_data_csv_to_json: #{e}"
@@ -59,6 +62,7 @@ end
59
62
  Name | Type | Description | Notes
60
63
  ------------- | ------------- | ------------- | -------------
61
64
  **input_file** | **File**| Input file to perform the operation on. |
65
+ **column_names_from_first_row** | **BOOLEAN**| Optional; If true, the first row will be used as the labels for the columns; if false, columns will be named Column0, Column1, etc. Default is true. Set to false if you are not using column headings, or have an irregular column structure. | [optional]
62
66
 
63
67
  ### Return type
64
68
 
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.cloudmersive.com*
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
7
  [**validate_document_autodetect_validation**](ValidateDocumentApi.md#validate_document_autodetect_validation) | **POST** /convert/validate/autodetect | Autodetect content type and validate
8
+ [**validate_document_csv_validation**](ValidateDocumentApi.md#validate_document_csv_validation) | **POST** /convert/validate/csv | Validate a CSV file document (CSV)
8
9
  [**validate_document_docx_validation**](ValidateDocumentApi.md#validate_document_docx_validation) | **POST** /convert/validate/docx | Validate a Word document (DOCX)
9
10
  [**validate_document_executable_validation**](ValidateDocumentApi.md#validate_document_executable_validation) | **POST** /convert/validate/executable | Validate if a file is executable
10
11
  [**validate_document_g_zip_validation**](ValidateDocumentApi.md#validate_document_g_zip_validation) | **POST** /convert/validate/gzip | Validate a GZip Archive file (gzip or gz)
@@ -72,6 +73,60 @@ Name | Type | Description | Notes
72
73
 
73
74
 
74
75
 
76
+ # **validate_document_csv_validation**
77
+ > DocumentValidationResult validate_document_csv_validation(input_file)
78
+
79
+ Validate a CSV file document (CSV)
80
+
81
+ Validate a CSV file document (CSV); if the document is not valid, identifies the errors in the document
82
+
83
+ ### Example
84
+ ```ruby
85
+ # load the gem
86
+ require 'cloudmersive-convert-api-client'
87
+ # setup authorization
88
+ CloudmersiveConvertApiClient.configure do |config|
89
+ # Configure API key authorization: Apikey
90
+ config.api_key['Apikey'] = 'YOUR API KEY'
91
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
92
+ #config.api_key_prefix['Apikey'] = 'Bearer'
93
+ end
94
+
95
+ api_instance = CloudmersiveConvertApiClient::ValidateDocumentApi.new
96
+
97
+ input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
98
+
99
+
100
+ begin
101
+ #Validate a CSV file document (CSV)
102
+ result = api_instance.validate_document_csv_validation(input_file)
103
+ p result
104
+ rescue CloudmersiveConvertApiClient::ApiError => e
105
+ puts "Exception when calling ValidateDocumentApi->validate_document_csv_validation: #{e}"
106
+ end
107
+ ```
108
+
109
+ ### Parameters
110
+
111
+ Name | Type | Description | Notes
112
+ ------------- | ------------- | ------------- | -------------
113
+ **input_file** | **File**| Input file to perform the operation on. |
114
+
115
+ ### Return type
116
+
117
+ [**DocumentValidationResult**](DocumentValidationResult.md)
118
+
119
+ ### Authorization
120
+
121
+ [Apikey](../README.md#Apikey)
122
+
123
+ ### HTTP request headers
124
+
125
+ - **Content-Type**: multipart/form-data
126
+ - **Accept**: application/json, text/json, application/xml, text/xml
127
+
128
+
129
+
75
130
  # **validate_document_docx_validation**
76
131
  > DocumentValidationResult validate_document_docx_validation(input_file)
77
132
 
@@ -24,6 +24,7 @@ module CloudmersiveConvertApiClient
24
24
  # Convert a CSV file to a JSON object array
25
25
  # @param input_file Input file to perform the operation on.
26
26
  # @param [Hash] opts the optional parameters
27
+ # @option opts [BOOLEAN] :column_names_from_first_row Optional; If true, the first row will be used as the labels for the columns; if false, columns will be named Column0, Column1, etc. Default is true. Set to false if you are not using column headings, or have an irregular column structure.
27
28
  # @return [Object]
28
29
  def convert_data_csv_to_json(input_file, opts = {})
29
30
  data, _status_code, _headers = convert_data_csv_to_json_with_http_info(input_file, opts)
@@ -34,6 +35,7 @@ module CloudmersiveConvertApiClient
34
35
  # Convert a CSV file to a JSON object array
35
36
  # @param input_file Input file to perform the operation on.
36
37
  # @param [Hash] opts the optional parameters
38
+ # @option opts [BOOLEAN] :column_names_from_first_row Optional; If true, the first row will be used as the labels for the columns; if false, columns will be named Column0, Column1, etc. Default is true. Set to false if you are not using column headings, or have an irregular column structure.
37
39
  # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
38
40
  def convert_data_csv_to_json_with_http_info(input_file, opts = {})
39
41
  if @api_client.config.debugging
@@ -55,6 +57,7 @@ module CloudmersiveConvertApiClient
55
57
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
58
  # HTTP header 'Content-Type'
57
59
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
60
+ header_params[:'columnNamesFromFirstRow'] = opts[:'column_names_from_first_row'] if !opts[:'column_names_from_first_row'].nil?
58
61
 
59
62
  # form parameters
60
63
  form_params = {}
@@ -76,6 +76,62 @@ module CloudmersiveConvertApiClient
76
76
  return data, status_code, headers
77
77
  end
78
78
 
79
+ # Validate a CSV file document (CSV)
80
+ # Validate a CSV file document (CSV); if the document is not valid, identifies the errors in the document
81
+ # @param input_file Input file to perform the operation on.
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [DocumentValidationResult]
84
+ def validate_document_csv_validation(input_file, opts = {})
85
+ data, _status_code, _headers = validate_document_csv_validation_with_http_info(input_file, opts)
86
+ return data
87
+ end
88
+
89
+ # Validate a CSV file document (CSV)
90
+ # Validate a CSV file document (CSV); if the document is not valid, identifies the errors in the document
91
+ # @param input_file Input file to perform the operation on.
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [Array<(DocumentValidationResult, Fixnum, Hash)>] DocumentValidationResult data, response status code and response headers
94
+ def validate_document_csv_validation_with_http_info(input_file, opts = {})
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug "Calling API: ValidateDocumentApi.validate_document_csv_validation ..."
97
+ end
98
+ # verify the required parameter 'input_file' is set
99
+ if @api_client.config.client_side_validation && input_file.nil?
100
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling ValidateDocumentApi.validate_document_csv_validation"
101
+ end
102
+ # resource path
103
+ local_var_path = "/convert/validate/csv"
104
+
105
+ # query parameters
106
+ query_params = {}
107
+
108
+ # header parameters
109
+ header_params = {}
110
+ # HTTP header 'Accept' (if needed)
111
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
112
+ # HTTP header 'Content-Type'
113
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
114
+
115
+ # form parameters
116
+ form_params = {}
117
+ form_params["inputFile"] = input_file
118
+
119
+ # http body (model)
120
+ post_body = nil
121
+ auth_names = ['Apikey']
122
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
123
+ :header_params => header_params,
124
+ :query_params => query_params,
125
+ :form_params => form_params,
126
+ :body => post_body,
127
+ :auth_names => auth_names,
128
+ :return_type => 'DocumentValidationResult')
129
+ if @api_client.config.debugging
130
+ @api_client.config.logger.debug "API called: ValidateDocumentApi#validate_document_csv_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
131
+ end
132
+ return data, status_code, headers
133
+ end
134
+
79
135
  # Validate a Word document (DOCX)
80
136
  # Validate a Word document (DOCX); if the document is not valid, identifies the errors in the document
81
137
  # @param input_file Input file to perform the operation on.
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.3.1
11
11
  =end
12
12
 
13
13
  module CloudmersiveConvertApiClient
14
- VERSION = "1.7.5"
14
+ VERSION = "1.7.6"
15
15
  end
@@ -37,6 +37,7 @@ describe 'ConvertDataApi' do
37
37
  # Convert a CSV file to a JSON object array
38
38
  # @param input_file Input file to perform the operation on.
39
39
  # @param [Hash] opts the optional parameters
40
+ # @option opts [BOOLEAN] :column_names_from_first_row Optional; If true, the first row will be used as the labels for the columns; if false, columns will be named Column0, Column1, etc. Default is true. Set to false if you are not using column headings, or have an irregular column structure.
40
41
  # @return [Object]
41
42
  describe 'convert_data_csv_to_json test' do
42
43
  it "should work" do
@@ -44,6 +44,18 @@ describe 'ValidateDocumentApi' do
44
44
  end
45
45
  end
46
46
 
47
+ # unit tests for validate_document_csv_validation
48
+ # Validate a CSV file document (CSV)
49
+ # Validate a CSV file document (CSV); if the document is not valid, identifies the errors in the document
50
+ # @param input_file Input file to perform the operation on.
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [DocumentValidationResult]
53
+ describe 'validate_document_csv_validation test' 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
+
47
59
  # unit tests for validate_document_docx_validation
48
60
  # Validate a Word document (DOCX)
49
61
  # Validate a Word document (DOCX); if the document is not valid, identifies the errors in the document
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.7.5
4
+ version: 1.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-20 00:00:00.000000000 Z
11
+ date: 2020-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus