cloudmersive-convert-api-client 2.1.8 → 2.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +14 -4
- data/docs/EditHtmlApi.md +418 -0
- data/docs/EditPdfApi.md +6 -2
- data/docs/HtmlGetLanguageResult.md +9 -0
- data/docs/HtmlGetRelCanonicalUrlResult.md +9 -0
- data/docs/HtmlGetSitemapUrlResult.md +9 -0
- data/docs/MergeDocumentApi.md +2 -2
- data/lib/cloudmersive-convert-api-client.rb +3 -0
- data/lib/cloudmersive-convert-api-client/api/edit_html_api.rb +392 -0
- data/lib/cloudmersive-convert-api-client/api/edit_pdf_api.rb +3 -0
- data/lib/cloudmersive-convert-api-client/api/merge_document_api.rb +3 -3
- data/lib/cloudmersive-convert-api-client/models/html_get_language_result.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/html_get_rel_canonical_url_result.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/html_get_sitemap_url_result.rb +196 -0
- data/lib/cloudmersive-convert-api-client/version.rb +1 -1
- data/spec/api/edit_html_api_spec.rb +95 -0
- data/spec/api/edit_pdf_api_spec.rb +1 -0
- data/spec/api/merge_document_api_spec.rb +1 -1
- data/spec/models/html_get_language_result_spec.rb +47 -0
- data/spec/models/html_get_rel_canonical_url_result_spec.rb +47 -0
- data/spec/models/html_get_sitemap_url_result_spec.rb +47 -0
- metadata +11 -2
data/docs/EditPdfApi.md
CHANGED
@@ -714,7 +714,7 @@ Name | Type | Description | Notes
|
|
714
714
|
|
715
715
|
|
716
716
|
# **edit_pdf_reduce_file_size**
|
717
|
-
> String edit_pdf_reduce_file_size(input_file)
|
717
|
+
> String edit_pdf_reduce_file_size(input_file, opts)
|
718
718
|
|
719
719
|
Reduce the file size and optimize a PDF
|
720
720
|
|
@@ -736,10 +736,13 @@ api_instance = CloudmersiveConvertApiClient::EditPdfApi.new
|
|
736
736
|
|
737
737
|
input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
|
738
738
|
|
739
|
+
opts = {
|
740
|
+
quality: 8.14 # Float | Quality level for the images in the PDF, ranging from 0.0 (low quality) to 1.0 (high quality); default is 0.3
|
741
|
+
}
|
739
742
|
|
740
743
|
begin
|
741
744
|
#Reduce the file size and optimize a PDF
|
742
|
-
result = api_instance.edit_pdf_reduce_file_size(input_file)
|
745
|
+
result = api_instance.edit_pdf_reduce_file_size(input_file, opts)
|
743
746
|
p result
|
744
747
|
rescue CloudmersiveConvertApiClient::ApiError => e
|
745
748
|
puts "Exception when calling EditPdfApi->edit_pdf_reduce_file_size: #{e}"
|
@@ -751,6 +754,7 @@ end
|
|
751
754
|
Name | Type | Description | Notes
|
752
755
|
------------- | ------------- | ------------- | -------------
|
753
756
|
**input_file** | **File**| Input file to perform the operation on. |
|
757
|
+
**quality** | **Float**| Quality level for the images in the PDF, ranging from 0.0 (low quality) to 1.0 (high quality); default is 0.3 | [optional]
|
754
758
|
|
755
759
|
### Return type
|
756
760
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::HtmlGetLanguageResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
7
|
+
**language_code** | **String** | HTML language code of the HTML document, e.g. \"en\" or \"de\" | [optional]
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::HtmlGetRelCanonicalUrlResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
7
|
+
**canonical_url** | **String** | HTML canonical URL if present | [optional]
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::HtmlGetSitemapUrlResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
7
|
+
**canonical_url** | **String** | HTML sitemap URL if present | [optional]
|
8
|
+
|
9
|
+
|
data/docs/MergeDocumentApi.md
CHANGED
@@ -153,7 +153,7 @@ Name | Type | Description | Notes
|
|
153
153
|
|
154
154
|
|
155
155
|
# **merge_document_html**
|
156
|
-
>
|
156
|
+
> String merge_document_html(input_file1, input_file2)
|
157
157
|
|
158
158
|
Merge Two HTML (HTM) Files Together
|
159
159
|
|
@@ -196,7 +196,7 @@ Name | Type | Description | Notes
|
|
196
196
|
|
197
197
|
### Return type
|
198
198
|
|
199
|
-
**
|
199
|
+
**String**
|
200
200
|
|
201
201
|
### Authorization
|
202
202
|
|
@@ -148,7 +148,10 @@ require 'cloudmersive-convert-api-client/models/get_xlsx_styles_request'
|
|
148
148
|
require 'cloudmersive-convert-api-client/models/get_xlsx_styles_response'
|
149
149
|
require 'cloudmersive-convert-api-client/models/get_xlsx_worksheets_request'
|
150
150
|
require 'cloudmersive-convert-api-client/models/get_xlsx_worksheets_response'
|
151
|
+
require 'cloudmersive-convert-api-client/models/html_get_language_result'
|
151
152
|
require 'cloudmersive-convert-api-client/models/html_get_links_response'
|
153
|
+
require 'cloudmersive-convert-api-client/models/html_get_rel_canonical_url_result'
|
154
|
+
require 'cloudmersive-convert-api-client/models/html_get_sitemap_url_result'
|
152
155
|
require 'cloudmersive-convert-api-client/models/html_hyperlink'
|
153
156
|
require 'cloudmersive-convert-api-client/models/html_md_result'
|
154
157
|
require 'cloudmersive-convert-api-client/models/html_ssrf_threat_check_result'
|
@@ -19,6 +19,65 @@ module CloudmersiveConvertApiClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Append an HTML tag to the HEAD section of an HTML Document
|
23
|
+
# Appends an HTML tag to the HEAD section of an HTML document.
|
24
|
+
# @param html_tag The HTML tag to append.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
27
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
28
|
+
# @return [String]
|
29
|
+
def edit_html_html_append_header_tag(html_tag, opts = {})
|
30
|
+
data, _status_code, _headers = edit_html_html_append_header_tag_with_http_info(html_tag, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Append an HTML tag to the HEAD section of an HTML Document
|
35
|
+
# Appends an HTML tag to the HEAD section of an HTML document.
|
36
|
+
# @param html_tag The HTML tag to append.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
39
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
40
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
41
|
+
def edit_html_html_append_header_tag_with_http_info(html_tag, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: EditHtmlApi.edit_html_html_append_header_tag ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'html_tag' is set
|
46
|
+
if @api_client.config.client_side_validation && html_tag.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'html_tag' when calling EditHtmlApi.edit_html_html_append_header_tag"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/convert/edit/html/head/append/tag'
|
51
|
+
|
52
|
+
# query parameters
|
53
|
+
query_params = {}
|
54
|
+
|
55
|
+
# header parameters
|
56
|
+
header_params = {}
|
57
|
+
# HTTP header 'Accept' (if needed)
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
59
|
+
header_params[:'htmlTag'] = html_tag
|
60
|
+
header_params[:'inputFileUrl'] = opts[:'input_file_url'] if !opts[:'input_file_url'].nil?
|
61
|
+
|
62
|
+
# form parameters
|
63
|
+
form_params = {}
|
64
|
+
form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
|
65
|
+
|
66
|
+
# http body (model)
|
67
|
+
post_body = nil
|
68
|
+
auth_names = ['Apikey']
|
69
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
70
|
+
:header_params => header_params,
|
71
|
+
:query_params => query_params,
|
72
|
+
:form_params => form_params,
|
73
|
+
:body => post_body,
|
74
|
+
:auth_names => auth_names,
|
75
|
+
:return_type => 'String')
|
76
|
+
if @api_client.config.debugging
|
77
|
+
@api_client.config.logger.debug "API called: EditHtmlApi#edit_html_html_append_header_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
78
|
+
end
|
79
|
+
return data, status_code, headers
|
80
|
+
end
|
22
81
|
# Append a Heading to an HTML Document
|
23
82
|
# Appends a heading to the end of an HTML document.
|
24
83
|
# @param heading_text The text content to be used in the header.
|
@@ -335,6 +394,58 @@ module CloudmersiveConvertApiClient
|
|
335
394
|
end
|
336
395
|
return data, status_code, headers
|
337
396
|
end
|
397
|
+
# Gets the language for the HTML document
|
398
|
+
# Retrieves the language code (e.g. \"en\" or \"de\") of an HTML document.
|
399
|
+
# @param [Hash] opts the optional parameters
|
400
|
+
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
401
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
402
|
+
# @return [HtmlGetLanguageResult]
|
403
|
+
def edit_html_html_get_language(opts = {})
|
404
|
+
data, _status_code, _headers = edit_html_html_get_language_with_http_info(opts)
|
405
|
+
data
|
406
|
+
end
|
407
|
+
|
408
|
+
# Gets the language for the HTML document
|
409
|
+
# Retrieves the language code (e.g. \"en\" or \"de\") of an HTML document.
|
410
|
+
# @param [Hash] opts the optional parameters
|
411
|
+
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
412
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
413
|
+
# @return [Array<(HtmlGetLanguageResult, Fixnum, Hash)>] HtmlGetLanguageResult data, response status code and response headers
|
414
|
+
def edit_html_html_get_language_with_http_info(opts = {})
|
415
|
+
if @api_client.config.debugging
|
416
|
+
@api_client.config.logger.debug 'Calling API: EditHtmlApi.edit_html_html_get_language ...'
|
417
|
+
end
|
418
|
+
# resource path
|
419
|
+
local_var_path = '/convert/edit/html/head/get/language'
|
420
|
+
|
421
|
+
# query parameters
|
422
|
+
query_params = {}
|
423
|
+
|
424
|
+
# header parameters
|
425
|
+
header_params = {}
|
426
|
+
# HTTP header 'Accept' (if needed)
|
427
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
428
|
+
header_params[:'inputFileUrl'] = opts[:'input_file_url'] if !opts[:'input_file_url'].nil?
|
429
|
+
|
430
|
+
# form parameters
|
431
|
+
form_params = {}
|
432
|
+
form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
|
433
|
+
|
434
|
+
# http body (model)
|
435
|
+
post_body = nil
|
436
|
+
auth_names = ['Apikey']
|
437
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
438
|
+
:header_params => header_params,
|
439
|
+
:query_params => query_params,
|
440
|
+
:form_params => form_params,
|
441
|
+
:body => post_body,
|
442
|
+
:auth_names => auth_names,
|
443
|
+
:return_type => 'HtmlGetLanguageResult')
|
444
|
+
if @api_client.config.debugging
|
445
|
+
@api_client.config.logger.debug "API called: EditHtmlApi#edit_html_html_get_language\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
446
|
+
end
|
447
|
+
return data, status_code, headers
|
448
|
+
end
|
338
449
|
# Extract resolved link URLs from HTML File
|
339
450
|
# Extracts the resolved link URLs, fully-qualified if possible, from an input HTML file.
|
340
451
|
# @param [Hash] opts the optional parameters
|
@@ -390,5 +501,286 @@ module CloudmersiveConvertApiClient
|
|
390
501
|
end
|
391
502
|
return data, status_code, headers
|
392
503
|
end
|
504
|
+
# Gets the rel canonical URL for the HTML document
|
505
|
+
# Gets the rel canonical URL of an HTML document.
|
506
|
+
# @param [Hash] opts the optional parameters
|
507
|
+
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
508
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
509
|
+
# @return [HtmlGetRelCanonicalUrlResult]
|
510
|
+
def edit_html_html_get_rel_canonical(opts = {})
|
511
|
+
data, _status_code, _headers = edit_html_html_get_rel_canonical_with_http_info(opts)
|
512
|
+
data
|
513
|
+
end
|
514
|
+
|
515
|
+
# Gets the rel canonical URL for the HTML document
|
516
|
+
# Gets the rel canonical URL of an HTML document.
|
517
|
+
# @param [Hash] opts the optional parameters
|
518
|
+
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
519
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
520
|
+
# @return [Array<(HtmlGetRelCanonicalUrlResult, Fixnum, Hash)>] HtmlGetRelCanonicalUrlResult data, response status code and response headers
|
521
|
+
def edit_html_html_get_rel_canonical_with_http_info(opts = {})
|
522
|
+
if @api_client.config.debugging
|
523
|
+
@api_client.config.logger.debug 'Calling API: EditHtmlApi.edit_html_html_get_rel_canonical ...'
|
524
|
+
end
|
525
|
+
# resource path
|
526
|
+
local_var_path = '/convert/edit/html/head/get/rel-canonical-url'
|
527
|
+
|
528
|
+
# query parameters
|
529
|
+
query_params = {}
|
530
|
+
|
531
|
+
# header parameters
|
532
|
+
header_params = {}
|
533
|
+
# HTTP header 'Accept' (if needed)
|
534
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
535
|
+
header_params[:'inputFileUrl'] = opts[:'input_file_url'] if !opts[:'input_file_url'].nil?
|
536
|
+
|
537
|
+
# form parameters
|
538
|
+
form_params = {}
|
539
|
+
form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
|
540
|
+
|
541
|
+
# http body (model)
|
542
|
+
post_body = nil
|
543
|
+
auth_names = ['Apikey']
|
544
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
545
|
+
:header_params => header_params,
|
546
|
+
:query_params => query_params,
|
547
|
+
:form_params => form_params,
|
548
|
+
:body => post_body,
|
549
|
+
:auth_names => auth_names,
|
550
|
+
:return_type => 'HtmlGetRelCanonicalUrlResult')
|
551
|
+
if @api_client.config.debugging
|
552
|
+
@api_client.config.logger.debug "API called: EditHtmlApi#edit_html_html_get_rel_canonical\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
553
|
+
end
|
554
|
+
return data, status_code, headers
|
555
|
+
end
|
556
|
+
# Gets the sitemap URL for the HTML document
|
557
|
+
# Gets the sitemap link URL of an HTML document.
|
558
|
+
# @param [Hash] opts the optional parameters
|
559
|
+
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
560
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
561
|
+
# @return [HtmlGetSitemapUrlResult]
|
562
|
+
def edit_html_html_get_sitemap(opts = {})
|
563
|
+
data, _status_code, _headers = edit_html_html_get_sitemap_with_http_info(opts)
|
564
|
+
data
|
565
|
+
end
|
566
|
+
|
567
|
+
# Gets the sitemap URL for the HTML document
|
568
|
+
# Gets the sitemap link URL of an HTML document.
|
569
|
+
# @param [Hash] opts the optional parameters
|
570
|
+
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
571
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
572
|
+
# @return [Array<(HtmlGetSitemapUrlResult, Fixnum, Hash)>] HtmlGetSitemapUrlResult data, response status code and response headers
|
573
|
+
def edit_html_html_get_sitemap_with_http_info(opts = {})
|
574
|
+
if @api_client.config.debugging
|
575
|
+
@api_client.config.logger.debug 'Calling API: EditHtmlApi.edit_html_html_get_sitemap ...'
|
576
|
+
end
|
577
|
+
# resource path
|
578
|
+
local_var_path = '/convert/edit/html/head/get/sitemap-url'
|
579
|
+
|
580
|
+
# query parameters
|
581
|
+
query_params = {}
|
582
|
+
|
583
|
+
# header parameters
|
584
|
+
header_params = {}
|
585
|
+
# HTTP header 'Accept' (if needed)
|
586
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
587
|
+
header_params[:'inputFileUrl'] = opts[:'input_file_url'] if !opts[:'input_file_url'].nil?
|
588
|
+
|
589
|
+
# form parameters
|
590
|
+
form_params = {}
|
591
|
+
form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
|
592
|
+
|
593
|
+
# http body (model)
|
594
|
+
post_body = nil
|
595
|
+
auth_names = ['Apikey']
|
596
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
597
|
+
:header_params => header_params,
|
598
|
+
:query_params => query_params,
|
599
|
+
:form_params => form_params,
|
600
|
+
:body => post_body,
|
601
|
+
:auth_names => auth_names,
|
602
|
+
:return_type => 'HtmlGetSitemapUrlResult')
|
603
|
+
if @api_client.config.debugging
|
604
|
+
@api_client.config.logger.debug "API called: EditHtmlApi#edit_html_html_get_sitemap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
605
|
+
end
|
606
|
+
return data, status_code, headers
|
607
|
+
end
|
608
|
+
# Sets the language for the HTML document
|
609
|
+
# Sets the language code of an HTML document.
|
610
|
+
# @param language_code The HTML langauge code to set.
|
611
|
+
# @param [Hash] opts the optional parameters
|
612
|
+
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
613
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
614
|
+
# @return [String]
|
615
|
+
def edit_html_html_set_language(language_code, opts = {})
|
616
|
+
data, _status_code, _headers = edit_html_html_set_language_with_http_info(language_code, opts)
|
617
|
+
data
|
618
|
+
end
|
619
|
+
|
620
|
+
# Sets the language for the HTML document
|
621
|
+
# Sets the language code of an HTML document.
|
622
|
+
# @param language_code The HTML langauge code to set.
|
623
|
+
# @param [Hash] opts the optional parameters
|
624
|
+
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
625
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
626
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
627
|
+
def edit_html_html_set_language_with_http_info(language_code, opts = {})
|
628
|
+
if @api_client.config.debugging
|
629
|
+
@api_client.config.logger.debug 'Calling API: EditHtmlApi.edit_html_html_set_language ...'
|
630
|
+
end
|
631
|
+
# verify the required parameter 'language_code' is set
|
632
|
+
if @api_client.config.client_side_validation && language_code.nil?
|
633
|
+
fail ArgumentError, "Missing the required parameter 'language_code' when calling EditHtmlApi.edit_html_html_set_language"
|
634
|
+
end
|
635
|
+
# resource path
|
636
|
+
local_var_path = '/convert/edit/html/head/set/language'
|
637
|
+
|
638
|
+
# query parameters
|
639
|
+
query_params = {}
|
640
|
+
|
641
|
+
# header parameters
|
642
|
+
header_params = {}
|
643
|
+
# HTTP header 'Accept' (if needed)
|
644
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
645
|
+
header_params[:'languageCode'] = language_code
|
646
|
+
header_params[:'inputFileUrl'] = opts[:'input_file_url'] if !opts[:'input_file_url'].nil?
|
647
|
+
|
648
|
+
# form parameters
|
649
|
+
form_params = {}
|
650
|
+
form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
|
651
|
+
|
652
|
+
# http body (model)
|
653
|
+
post_body = nil
|
654
|
+
auth_names = ['Apikey']
|
655
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
656
|
+
:header_params => header_params,
|
657
|
+
:query_params => query_params,
|
658
|
+
:form_params => form_params,
|
659
|
+
:body => post_body,
|
660
|
+
:auth_names => auth_names,
|
661
|
+
:return_type => 'String')
|
662
|
+
if @api_client.config.debugging
|
663
|
+
@api_client.config.logger.debug "API called: EditHtmlApi#edit_html_html_set_language\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
664
|
+
end
|
665
|
+
return data, status_code, headers
|
666
|
+
end
|
667
|
+
# Sets the rel canonical URL for the HTML document
|
668
|
+
# Sets the rel canonical URL of an HTML document. This is useful for telling search engines and other indexers which pages are duplicates of eachother; any pages with the rel=canonical tag will be treated as duplicates of the canonical URL.
|
669
|
+
# @param canonical_url The HTML canonical URL to set.
|
670
|
+
# @param [Hash] opts the optional parameters
|
671
|
+
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
672
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
673
|
+
# @return [String]
|
674
|
+
def edit_html_html_set_rel_canonical(canonical_url, opts = {})
|
675
|
+
data, _status_code, _headers = edit_html_html_set_rel_canonical_with_http_info(canonical_url, opts)
|
676
|
+
data
|
677
|
+
end
|
678
|
+
|
679
|
+
# Sets the rel canonical URL for the HTML document
|
680
|
+
# Sets the rel canonical URL of an HTML document. This is useful for telling search engines and other indexers which pages are duplicates of eachother; any pages with the rel=canonical tag will be treated as duplicates of the canonical URL.
|
681
|
+
# @param canonical_url The HTML canonical URL to set.
|
682
|
+
# @param [Hash] opts the optional parameters
|
683
|
+
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
684
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
685
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
686
|
+
def edit_html_html_set_rel_canonical_with_http_info(canonical_url, opts = {})
|
687
|
+
if @api_client.config.debugging
|
688
|
+
@api_client.config.logger.debug 'Calling API: EditHtmlApi.edit_html_html_set_rel_canonical ...'
|
689
|
+
end
|
690
|
+
# verify the required parameter 'canonical_url' is set
|
691
|
+
if @api_client.config.client_side_validation && canonical_url.nil?
|
692
|
+
fail ArgumentError, "Missing the required parameter 'canonical_url' when calling EditHtmlApi.edit_html_html_set_rel_canonical"
|
693
|
+
end
|
694
|
+
# resource path
|
695
|
+
local_var_path = '/convert/edit/html/head/set/rel-canonical-url'
|
696
|
+
|
697
|
+
# query parameters
|
698
|
+
query_params = {}
|
699
|
+
|
700
|
+
# header parameters
|
701
|
+
header_params = {}
|
702
|
+
# HTTP header 'Accept' (if needed)
|
703
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
704
|
+
header_params[:'canonicalUrl'] = canonical_url
|
705
|
+
header_params[:'inputFileUrl'] = opts[:'input_file_url'] if !opts[:'input_file_url'].nil?
|
706
|
+
|
707
|
+
# form parameters
|
708
|
+
form_params = {}
|
709
|
+
form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
|
710
|
+
|
711
|
+
# http body (model)
|
712
|
+
post_body = nil
|
713
|
+
auth_names = ['Apikey']
|
714
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
715
|
+
:header_params => header_params,
|
716
|
+
:query_params => query_params,
|
717
|
+
:form_params => form_params,
|
718
|
+
:body => post_body,
|
719
|
+
:auth_names => auth_names,
|
720
|
+
:return_type => 'String')
|
721
|
+
if @api_client.config.debugging
|
722
|
+
@api_client.config.logger.debug "API called: EditHtmlApi#edit_html_html_set_rel_canonical\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
723
|
+
end
|
724
|
+
return data, status_code, headers
|
725
|
+
end
|
726
|
+
# Sets the sitemap URL for the HTML document
|
727
|
+
# Sets the sitemap URL of an HTML document.
|
728
|
+
# @param sitemap_url The HTML sitemap URL to set.
|
729
|
+
# @param [Hash] opts the optional parameters
|
730
|
+
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
731
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
732
|
+
# @return [String]
|
733
|
+
def edit_html_html_set_sitemap_url(sitemap_url, opts = {})
|
734
|
+
data, _status_code, _headers = edit_html_html_set_sitemap_url_with_http_info(sitemap_url, opts)
|
735
|
+
data
|
736
|
+
end
|
737
|
+
|
738
|
+
# Sets the sitemap URL for the HTML document
|
739
|
+
# Sets the sitemap URL of an HTML document.
|
740
|
+
# @param sitemap_url The HTML sitemap URL to set.
|
741
|
+
# @param [Hash] opts the optional parameters
|
742
|
+
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
743
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
744
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
745
|
+
def edit_html_html_set_sitemap_url_with_http_info(sitemap_url, opts = {})
|
746
|
+
if @api_client.config.debugging
|
747
|
+
@api_client.config.logger.debug 'Calling API: EditHtmlApi.edit_html_html_set_sitemap_url ...'
|
748
|
+
end
|
749
|
+
# verify the required parameter 'sitemap_url' is set
|
750
|
+
if @api_client.config.client_side_validation && sitemap_url.nil?
|
751
|
+
fail ArgumentError, "Missing the required parameter 'sitemap_url' when calling EditHtmlApi.edit_html_html_set_sitemap_url"
|
752
|
+
end
|
753
|
+
# resource path
|
754
|
+
local_var_path = '/convert/edit/html/head/set/sitemap-url'
|
755
|
+
|
756
|
+
# query parameters
|
757
|
+
query_params = {}
|
758
|
+
|
759
|
+
# header parameters
|
760
|
+
header_params = {}
|
761
|
+
# HTTP header 'Accept' (if needed)
|
762
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
763
|
+
header_params[:'sitemapUrl'] = sitemap_url
|
764
|
+
header_params[:'inputFileUrl'] = opts[:'input_file_url'] if !opts[:'input_file_url'].nil?
|
765
|
+
|
766
|
+
# form parameters
|
767
|
+
form_params = {}
|
768
|
+
form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
|
769
|
+
|
770
|
+
# http body (model)
|
771
|
+
post_body = nil
|
772
|
+
auth_names = ['Apikey']
|
773
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
774
|
+
:header_params => header_params,
|
775
|
+
:query_params => query_params,
|
776
|
+
:form_params => form_params,
|
777
|
+
:body => post_body,
|
778
|
+
:auth_names => auth_names,
|
779
|
+
:return_type => 'String')
|
780
|
+
if @api_client.config.debugging
|
781
|
+
@api_client.config.logger.debug "API called: EditHtmlApi#edit_html_html_set_sitemap_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
782
|
+
end
|
783
|
+
return data, status_code, headers
|
784
|
+
end
|
393
785
|
end
|
394
786
|
end
|