Class: CloudmersiveConvertApiClient::EditTextApi
- Inherits:
-
Object
- Object
- CloudmersiveConvertApiClient::EditTextApi
- Defined in:
- lib/cloudmersive-convert-api-client/api/edit_text_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#edit_text_base64_decode(request, opts = {}) ⇒ Base64DecodeResponse
Base 64 decode, convert base 64 string to binary content Decodes / converts base 64 UTF-8 text string to binary content.
-
#edit_text_base64_decode_with_http_info(request, opts = {}) ⇒ Array<(Base64DecodeResponse, Fixnum, Hash)>
Base 64 decode, convert base 64 string to binary content Decodes / converts base 64 UTF-8 text string to binary content.
-
#edit_text_base64_detect(request, opts = {}) ⇒ Base64DetectResponse
Detect, check if text string is base 64 encoded Checks, detects if input string is base 64 encoded.
-
#edit_text_base64_detect_with_http_info(request, opts = {}) ⇒ Array<(Base64DetectResponse, Fixnum, Hash)>
Detect, check if text string is base 64 encoded Checks, detects if input string is base 64 encoded.
-
#edit_text_base64_encode(request, opts = {}) ⇒ Base64EncodeResponse
Base 64 encode, convert binary or file data to a text string Encodes / converts binary or file data to a text string.
-
#edit_text_base64_encode_with_http_info(request, opts = {}) ⇒ Array<(Base64EncodeResponse, Fixnum, Hash)>
Base 64 encode, convert binary or file data to a text string Encodes / converts binary or file data to a text string.
-
#edit_text_change_line_endings(line_ending_type, input_file, opts = {}) ⇒ ChangeLineEndingResponse
Set, change line endings of a text file Sets the line ending type of a text file; set to Windows, Unix or Mac.
-
#edit_text_change_line_endings_with_http_info(line_ending_type, input_file, opts = {}) ⇒ Array<(ChangeLineEndingResponse, Fixnum, Hash)>
Set, change line endings of a text file Sets the line ending type of a text file; set to Windows, Unix or Mac.
-
#edit_text_detect_line_endings(input_file, opts = {}) ⇒ DetectLineEndingsResponse
Detect line endings of a text file Detect line ending type (Windows, Unix or Mac) of an input file.
-
#edit_text_detect_line_endings_with_http_info(input_file, opts = {}) ⇒ Array<(DetectLineEndingsResponse, Fixnum, Hash)>
Detect line endings of a text file Detect line ending type (Windows, Unix or Mac) of an input file.
-
#edit_text_find_regex(request, opts = {}) ⇒ FindStringRegexResponse
Find a regular expression regex in text input Find all occurrences of the input regular expression in the input content, and returns the matches.
-
#edit_text_find_regex_with_http_info(request, opts = {}) ⇒ Array<(FindStringRegexResponse, Fixnum, Hash)>
Find a regular expression regex in text input Find all occurrences of the input regular expression in the input content, and returns the matches.
-
#edit_text_find_simple(request, opts = {}) ⇒ FindStringSimpleResponse
Find a string in text input Finds all occurrences of the input string in the input content, and returns the matches.
-
#edit_text_find_simple_with_http_info(request, opts = {}) ⇒ Array<(FindStringSimpleResponse, Fixnum, Hash)>
Find a string in text input Finds all occurrences of the input string in the input content, and returns the matches.
-
#edit_text_remove_all_whitespace(request, opts = {}) ⇒ RemoveWhitespaceFromTextResponse
Remove whitespace from text string Removes all whitespace from text, leaving behind only non-whitespace characters.
-
#edit_text_remove_all_whitespace_with_http_info(request, opts = {}) ⇒ Array<(RemoveWhitespaceFromTextResponse, Fixnum, Hash)>
Remove whitespace from text string Removes all whitespace from text, leaving behind only non-whitespace characters.
-
#edit_text_remove_html(request, opts = {}) ⇒ RemoveHtmlFromTextResponse
Remove HTML from text string Removes HTML from text, leaving behind only text.
-
#edit_text_remove_html_with_http_info(request, opts = {}) ⇒ Array<(RemoveHtmlFromTextResponse, Fixnum, Hash)>
Remove HTML from text string Removes HTML from text, leaving behind only text.
-
#edit_text_replace_regex(request, opts = {}) ⇒ ReplaceStringRegexResponse
Replace a string in text with a regex regular expression string Replaces all occurrences of the input regular expression regex string in the input content, and returns the result.
-
#edit_text_replace_regex_with_http_info(request, opts = {}) ⇒ Array<(ReplaceStringRegexResponse, Fixnum, Hash)>
Replace a string in text with a regex regular expression string Replaces all occurrences of the input regular expression regex string in the input content, and returns the result.
-
#edit_text_replace_simple(request, opts = {}) ⇒ ReplaceStringSimpleResponse
Replace a string in text with another string value Replaces all occurrences of the input string in the input content, and returns the result.
-
#edit_text_replace_simple_with_http_info(request, opts = {}) ⇒ Array<(ReplaceStringSimpleResponse, Fixnum, Hash)>
Replace a string in text with another string value Replaces all occurrences of the input string in the input content, and returns the result.
-
#edit_text_text_encoding_detect(input_file, opts = {}) ⇒ TextEncodingDetectResponse
Detect text encoding of file Checks text encoding of file.
-
#edit_text_text_encoding_detect_with_http_info(input_file, opts = {}) ⇒ Array<(TextEncodingDetectResponse, Fixnum, Hash)>
Detect text encoding of file Checks text encoding of file.
-
#edit_text_trim_whitespace(request, opts = {}) ⇒ RemoveWhitespaceFromTextResponse
Trim leading and trailing whitespace from text string Trim leading and trailing whitespace from text, leaving behind a trimmed string.
-
#edit_text_trim_whitespace_with_http_info(request, opts = {}) ⇒ Array<(RemoveWhitespaceFromTextResponse, Fixnum, Hash)>
Trim leading and trailing whitespace from text string Trim leading and trailing whitespace from text, leaving behind a trimmed string.
-
#initialize(api_client = ApiClient.default) ⇒ EditTextApi
constructor
A new instance of EditTextApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ EditTextApi
Returns a new instance of EditTextApi.
19 20 21 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#edit_text_base64_decode(request, opts = {}) ⇒ Base64DecodeResponse
Base 64 decode, convert base 64 string to binary content Decodes / converts base 64 UTF-8 text string to binary content
27 28 29 30 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 27 def edit_text_base64_decode(request, opts = {}) data, _status_code, _headers = edit_text_base64_decode_with_http_info(request, opts) data end |
#edit_text_base64_decode_with_http_info(request, opts = {}) ⇒ Array<(Base64DecodeResponse, Fixnum, Hash)>
Base 64 decode, convert base 64 string to binary content Decodes / converts base 64 UTF-8 text string to binary content
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 37 def edit_text_base64_decode_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditTextApi.edit_text_base64_decode ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling EditTextApi.edit_text_base64_decode" end # resource path local_var_path = '/convert/edit/text/encoding/base64/decode' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Base64DecodeResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditTextApi#edit_text_base64_decode\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_text_base64_detect(request, opts = {}) ⇒ Base64DetectResponse
Detect, check if text string is base 64 encoded Checks, detects if input string is base 64 encoded
81 82 83 84 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 81 def edit_text_base64_detect(request, opts = {}) data, _status_code, _headers = edit_text_base64_detect_with_http_info(request, opts) data end |
#edit_text_base64_detect_with_http_info(request, opts = {}) ⇒ Array<(Base64DetectResponse, Fixnum, Hash)>
Detect, check if text string is base 64 encoded Checks, detects if input string is base 64 encoded
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 91 def edit_text_base64_detect_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditTextApi.edit_text_base64_detect ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling EditTextApi.edit_text_base64_detect" end # resource path local_var_path = '/convert/edit/text/encoding/base64/detect' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Base64DetectResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditTextApi#edit_text_base64_detect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_text_base64_encode(request, opts = {}) ⇒ Base64EncodeResponse
Base 64 encode, convert binary or file data to a text string Encodes / converts binary or file data to a text string
135 136 137 138 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 135 def edit_text_base64_encode(request, opts = {}) data, _status_code, _headers = edit_text_base64_encode_with_http_info(request, opts) data end |
#edit_text_base64_encode_with_http_info(request, opts = {}) ⇒ Array<(Base64EncodeResponse, Fixnum, Hash)>
Base 64 encode, convert binary or file data to a text string Encodes / converts binary or file data to a text string
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 145 def edit_text_base64_encode_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditTextApi.edit_text_base64_encode ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling EditTextApi.edit_text_base64_encode" end # resource path local_var_path = '/convert/edit/text/encoding/base64/encode' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Base64EncodeResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditTextApi#edit_text_base64_encode\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_text_change_line_endings(line_ending_type, input_file, opts = {}) ⇒ ChangeLineEndingResponse
Set, change line endings of a text file Sets the line ending type of a text file; set to Windows, Unix or Mac.
190 191 192 193 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 190 def edit_text_change_line_endings(line_ending_type, input_file, opts = {}) data, _status_code, _headers = edit_text_change_line_endings_with_http_info(line_ending_type, input_file, opts) data end |
#edit_text_change_line_endings_with_http_info(line_ending_type, input_file, opts = {}) ⇒ Array<(ChangeLineEndingResponse, Fixnum, Hash)>
Set, change line endings of a text file Sets the line ending type of a text file; set to Windows, Unix or Mac.
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 201 def edit_text_change_line_endings_with_http_info(line_ending_type, input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditTextApi.edit_text_change_line_endings ...' end # verify the required parameter 'line_ending_type' is set if @api_client.config.client_side_validation && line_ending_type.nil? fail ArgumentError, "Missing the required parameter 'line_ending_type' when calling EditTextApi.edit_text_change_line_endings" end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling EditTextApi.edit_text_change_line_endings" end # resource path local_var_path = '/convert/edit/text/line-endings/change' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'lineEndingType'] = line_ending_type # form parameters form_params = {} form_params['inputFile'] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ChangeLineEndingResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditTextApi#edit_text_change_line_endings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_text_detect_line_endings(input_file, opts = {}) ⇒ DetectLineEndingsResponse
Detect line endings of a text file Detect line ending type (Windows, Unix or Mac) of an input file.
251 252 253 254 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 251 def edit_text_detect_line_endings(input_file, opts = {}) data, _status_code, _headers = edit_text_detect_line_endings_with_http_info(input_file, opts) data end |
#edit_text_detect_line_endings_with_http_info(input_file, opts = {}) ⇒ Array<(DetectLineEndingsResponse, Fixnum, Hash)>
Detect line endings of a text file Detect line ending type (Windows, Unix or Mac) of an input file.
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 261 def edit_text_detect_line_endings_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditTextApi.edit_text_detect_line_endings ...' end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling EditTextApi.edit_text_detect_line_endings" end # resource path local_var_path = '/convert/edit/text/line-endings/detect' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['inputFile'] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DetectLineEndingsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditTextApi#edit_text_detect_line_endings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_text_find_regex(request, opts = {}) ⇒ FindStringRegexResponse
Find a regular expression regex in text input Find all occurrences of the input regular expression in the input content, and returns the matches
306 307 308 309 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 306 def edit_text_find_regex(request, opts = {}) data, _status_code, _headers = edit_text_find_regex_with_http_info(request, opts) data end |
#edit_text_find_regex_with_http_info(request, opts = {}) ⇒ Array<(FindStringRegexResponse, Fixnum, Hash)>
Find a regular expression regex in text input Find all occurrences of the input regular expression in the input content, and returns the matches
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 316 def edit_text_find_regex_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditTextApi.edit_text_find_regex ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling EditTextApi.edit_text_find_regex" end # resource path local_var_path = '/convert/edit/text/find/regex' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'FindStringRegexResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditTextApi#edit_text_find_regex\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_text_find_simple(request, opts = {}) ⇒ FindStringSimpleResponse
Find a string in text input Finds all occurrences of the input string in the input content, and returns the matches
360 361 362 363 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 360 def edit_text_find_simple(request, opts = {}) data, _status_code, _headers = edit_text_find_simple_with_http_info(request, opts) data end |
#edit_text_find_simple_with_http_info(request, opts = {}) ⇒ Array<(FindStringSimpleResponse, Fixnum, Hash)>
Find a string in text input Finds all occurrences of the input string in the input content, and returns the matches
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 370 def edit_text_find_simple_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditTextApi.edit_text_find_simple ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling EditTextApi.edit_text_find_simple" end # resource path local_var_path = '/convert/edit/text/find/string' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'FindStringSimpleResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditTextApi#edit_text_find_simple\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_text_remove_all_whitespace(request, opts = {}) ⇒ RemoveWhitespaceFromTextResponse
Remove whitespace from text string Removes all whitespace from text, leaving behind only non-whitespace characters. Whitespace includes newlines, spaces and other whitespace characters.
414 415 416 417 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 414 def edit_text_remove_all_whitespace(request, opts = {}) data, _status_code, _headers = edit_text_remove_all_whitespace_with_http_info(request, opts) data end |
#edit_text_remove_all_whitespace_with_http_info(request, opts = {}) ⇒ Array<(RemoveWhitespaceFromTextResponse, Fixnum, Hash)>
Remove whitespace from text string Removes all whitespace from text, leaving behind only non-whitespace characters. Whitespace includes newlines, spaces and other whitespace characters.
424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 424 def edit_text_remove_all_whitespace_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditTextApi.edit_text_remove_all_whitespace ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling EditTextApi.edit_text_remove_all_whitespace" end # resource path local_var_path = '/convert/edit/text/remove/whitespace/all' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RemoveWhitespaceFromTextResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditTextApi#edit_text_remove_all_whitespace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_text_remove_html(request, opts = {}) ⇒ RemoveHtmlFromTextResponse
Remove HTML from text string Removes HTML from text, leaving behind only text. Formatted text will become plain text. Important for protecting against HTML and Cross-Site-Scripting attacks.
468 469 470 471 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 468 def edit_text_remove_html(request, opts = {}) data, _status_code, _headers = edit_text_remove_html_with_http_info(request, opts) data end |
#edit_text_remove_html_with_http_info(request, opts = {}) ⇒ Array<(RemoveHtmlFromTextResponse, Fixnum, Hash)>
Remove HTML from text string Removes HTML from text, leaving behind only text. Formatted text will become plain text. Important for protecting against HTML and Cross-Site-Scripting attacks.
478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 478 def edit_text_remove_html_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditTextApi.edit_text_remove_html ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling EditTextApi.edit_text_remove_html" end # resource path local_var_path = '/convert/edit/text/remove/html' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RemoveHtmlFromTextResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditTextApi#edit_text_remove_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_text_replace_regex(request, opts = {}) ⇒ ReplaceStringRegexResponse
Replace a string in text with a regex regular expression string Replaces all occurrences of the input regular expression regex string in the input content, and returns the result
522 523 524 525 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 522 def edit_text_replace_regex(request, opts = {}) data, _status_code, _headers = edit_text_replace_regex_with_http_info(request, opts) data end |
#edit_text_replace_regex_with_http_info(request, opts = {}) ⇒ Array<(ReplaceStringRegexResponse, Fixnum, Hash)>
Replace a string in text with a regex regular expression string Replaces all occurrences of the input regular expression regex string in the input content, and returns the result
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 532 def edit_text_replace_regex_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditTextApi.edit_text_replace_regex ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling EditTextApi.edit_text_replace_regex" end # resource path local_var_path = '/convert/edit/text/replace/regex' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ReplaceStringRegexResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditTextApi#edit_text_replace_regex\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_text_replace_simple(request, opts = {}) ⇒ ReplaceStringSimpleResponse
Replace a string in text with another string value Replaces all occurrences of the input string in the input content, and returns the result
576 577 578 579 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 576 def edit_text_replace_simple(request, opts = {}) data, _status_code, _headers = edit_text_replace_simple_with_http_info(request, opts) data end |
#edit_text_replace_simple_with_http_info(request, opts = {}) ⇒ Array<(ReplaceStringSimpleResponse, Fixnum, Hash)>
Replace a string in text with another string value Replaces all occurrences of the input string in the input content, and returns the result
586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 586 def edit_text_replace_simple_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditTextApi.edit_text_replace_simple ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling EditTextApi.edit_text_replace_simple" end # resource path local_var_path = '/convert/edit/text/replace/string' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ReplaceStringSimpleResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditTextApi#edit_text_replace_simple\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_text_text_encoding_detect(input_file, opts = {}) ⇒ TextEncodingDetectResponse
Detect text encoding of file Checks text encoding of file
630 631 632 633 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 630 def edit_text_text_encoding_detect(input_file, opts = {}) data, _status_code, _headers = edit_text_text_encoding_detect_with_http_info(input_file, opts) data end |
#edit_text_text_encoding_detect_with_http_info(input_file, opts = {}) ⇒ Array<(TextEncodingDetectResponse, Fixnum, Hash)>
Detect text encoding of file Checks text encoding of file
640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 640 def edit_text_text_encoding_detect_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditTextApi.edit_text_text_encoding_detect ...' end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling EditTextApi.edit_text_text_encoding_detect" end # resource path local_var_path = '/convert/edit/text/encoding/detect' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['inputFile'] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TextEncodingDetectResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditTextApi#edit_text_text_encoding_detect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_text_trim_whitespace(request, opts = {}) ⇒ RemoveWhitespaceFromTextResponse
Trim leading and trailing whitespace from text string Trim leading and trailing whitespace from text, leaving behind a trimmed string. Whitespace includes newlines, spaces and other whitespace characters.
685 686 687 688 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 685 def edit_text_trim_whitespace(request, opts = {}) data, _status_code, _headers = edit_text_trim_whitespace_with_http_info(request, opts) data end |
#edit_text_trim_whitespace_with_http_info(request, opts = {}) ⇒ Array<(RemoveWhitespaceFromTextResponse, Fixnum, Hash)>
Trim leading and trailing whitespace from text string Trim leading and trailing whitespace from text, leaving behind a trimmed string. Whitespace includes newlines, spaces and other whitespace characters.
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 |
# File 'lib/cloudmersive-convert-api-client/api/edit_text_api.rb', line 695 def edit_text_trim_whitespace_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditTextApi.edit_text_trim_whitespace ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling EditTextApi.edit_text_trim_whitespace" end # resource path local_var_path = '/convert/edit/text/remove/whitespace/trim' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RemoveWhitespaceFromTextResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditTextApi#edit_text_trim_whitespace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |