cloudmersive-convert-api-client 1.2.3 → 1.2.8

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.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +201 -0
  3. data/build.ps1 +12 -0
  4. data/client/Gemfile +7 -0
  5. data/client/README.md +184 -0
  6. data/client/Rakefile +8 -0
  7. data/client/cloudmersive-convert-api-client.gemspec +45 -0
  8. data/client/docs/CompareDocumentApi.md +66 -0
  9. data/client/docs/ConvertDataApi.md +118 -0
  10. data/client/docs/ConvertDocumentApi.md +723 -0
  11. data/client/docs/ConvertImageApi.md +69 -0
  12. data/client/docs/ConvertTemplateApi.md +63 -0
  13. data/client/docs/ConvertWebApi.md +283 -0
  14. data/client/docs/ConvertedPngPage.md +9 -0
  15. data/client/docs/DocumentValidationError.md +11 -0
  16. data/client/docs/DocumentValidationResult.md +11 -0
  17. data/client/docs/DocxFooter.md +9 -0
  18. data/client/docs/DocxHeader.md +9 -0
  19. data/client/docs/DocxInsertImageRequest.md +13 -0
  20. data/client/docs/DocxInsertImageResponse.md +9 -0
  21. data/client/docs/DocxParagraph.md +10 -0
  22. data/client/docs/DocxRun.md +14 -0
  23. data/client/docs/DocxSection.md +8 -0
  24. data/client/docs/DocxSetFooterRequest.md +10 -0
  25. data/client/docs/DocxSetFooterResponse.md +9 -0
  26. data/client/docs/DocxSetHeaderRequest.md +10 -0
  27. data/client/docs/DocxSetHeaderResponse.md +9 -0
  28. data/client/docs/DocxStyle.md +13 -0
  29. data/client/docs/DocxTable.md +45 -0
  30. data/client/docs/DocxTableCell.md +14 -0
  31. data/client/docs/DocxTableRow.md +9 -0
  32. data/client/docs/DocxText.md +9 -0
  33. data/client/docs/EditDocumentApi.md +668 -0
  34. data/client/docs/FinishEditingRequest.md +8 -0
  35. data/client/docs/GetDocxHeadersAndFootersRequest.md +9 -0
  36. data/client/docs/GetDocxHeadersAndFootersResponse.md +10 -0
  37. data/client/docs/GetDocxStylesRequest.md +9 -0
  38. data/client/docs/GetDocxStylesResponse.md +9 -0
  39. data/client/docs/GetDocxTablesRequest.md +9 -0
  40. data/client/docs/GetDocxTablesResponse.md +9 -0
  41. data/client/docs/HtmlMdResult.md +9 -0
  42. data/client/docs/HtmlTemplateApplicationRequest.md +10 -0
  43. data/client/docs/HtmlTemplateApplicationResponse.md +9 -0
  44. data/client/docs/HtmlTemplateOperation.md +10 -0
  45. data/client/docs/HtmlToOfficeRequest.md +8 -0
  46. data/client/docs/HtmlToPdfRequest.md +9 -0
  47. data/client/docs/InsertDocxTablesRequest.md +10 -0
  48. data/client/docs/InsertDocxTablesResponse.md +9 -0
  49. data/client/docs/MergeDocumentApi.md +182 -0
  50. data/client/docs/PdfToPngResult.md +9 -0
  51. data/client/docs/RemoveDocxHeadersAndFootersRequest.md +11 -0
  52. data/client/docs/RemoveDocxHeadersAndFootersResponse.md +9 -0
  53. data/client/docs/ReplaceStringRequest.md +12 -0
  54. data/client/docs/ScreenshotRequest.md +9 -0
  55. data/client/docs/ValidateDocumentApi.md +173 -0
  56. data/client/docs/ViewerResponse.md +9 -0
  57. data/client/docs/ViewerToolsApi.md +63 -0
  58. data/client/git_push.sh +55 -0
  59. data/client/lib/cloudmersive-convert-api-client.rb +89 -0
  60. data/client/lib/cloudmersive-convert-api-client/api/compare_document_api.rb +86 -0
  61. data/client/lib/cloudmersive-convert-api-client/api/convert_data_api.rb +135 -0
  62. data/client/lib/cloudmersive-convert-api-client/api/convert_document_api.rb +751 -0
  63. data/client/lib/cloudmersive-convert-api-client/api/convert_image_api.rb +91 -0
  64. data/client/lib/cloudmersive-convert-api-client/api/convert_template_api.rb +78 -0
  65. data/client/lib/cloudmersive-convert-api-client/api/convert_web_api.rb +299 -0
  66. data/client/lib/cloudmersive-convert-api-client/api/edit_document_api.rb +684 -0
  67. data/client/lib/cloudmersive-convert-api-client/api/merge_document_api.rb +212 -0
  68. data/client/lib/cloudmersive-convert-api-client/api/validate_document_api.rb +191 -0
  69. data/client/lib/cloudmersive-convert-api-client/api/viewer_tools_api.rb +79 -0
  70. data/client/lib/cloudmersive-convert-api-client/api_client.rb +389 -0
  71. data/client/lib/cloudmersive-convert-api-client/api_error.rb +38 -0
  72. data/client/lib/cloudmersive-convert-api-client/configuration.rb +209 -0
  73. data/client/lib/cloudmersive-convert-api-client/models/converted_png_page.rb +199 -0
  74. data/client/lib/cloudmersive-convert-api-client/models/document_validation_error.rb +219 -0
  75. data/client/lib/cloudmersive-convert-api-client/models/document_validation_result.rb +221 -0
  76. data/client/lib/cloudmersive-convert-api-client/models/docx_footer.rb +203 -0
  77. data/client/lib/cloudmersive-convert-api-client/models/docx_header.rb +203 -0
  78. data/client/lib/cloudmersive-convert-api-client/models/docx_insert_image_request.rb +271 -0
  79. data/client/lib/cloudmersive-convert-api-client/models/docx_insert_image_response.rb +199 -0
  80. data/client/lib/cloudmersive-convert-api-client/models/docx_paragraph.rb +211 -0
  81. data/client/lib/cloudmersive-convert-api-client/models/docx_run.rb +251 -0
  82. data/client/lib/cloudmersive-convert-api-client/models/docx_section.rb +191 -0
  83. data/client/lib/cloudmersive-convert-api-client/models/docx_set_footer_request.rb +225 -0
  84. data/client/lib/cloudmersive-convert-api-client/models/docx_set_footer_response.rb +199 -0
  85. data/client/lib/cloudmersive-convert-api-client/models/docx_set_header_request.rb +225 -0
  86. data/client/lib/cloudmersive-convert-api-client/models/docx_set_header_response.rb +199 -0
  87. data/client/lib/cloudmersive-convert-api-client/models/docx_style.rb +239 -0
  88. data/client/lib/cloudmersive-convert-api-client/models/docx_table.rb +561 -0
  89. data/client/lib/cloudmersive-convert-api-client/models/docx_table_cell.rb +251 -0
  90. data/client/lib/cloudmersive-convert-api-client/models/docx_table_row.rb +201 -0
  91. data/client/lib/cloudmersive-convert-api-client/models/docx_text.rb +199 -0
  92. data/client/lib/cloudmersive-convert-api-client/models/finish_editing_request.rb +189 -0
  93. data/client/lib/cloudmersive-convert-api-client/models/get_docx_headers_and_footers_request.rb +215 -0
  94. data/client/lib/cloudmersive-convert-api-client/models/get_docx_headers_and_footers_response.rb +211 -0
  95. data/client/lib/cloudmersive-convert-api-client/models/get_docx_styles_request.rb +215 -0
  96. data/client/lib/cloudmersive-convert-api-client/models/get_docx_styles_response.rb +201 -0
  97. data/client/lib/cloudmersive-convert-api-client/models/get_docx_tables_request.rb +215 -0
  98. data/client/lib/cloudmersive-convert-api-client/models/get_docx_tables_response.rb +201 -0
  99. data/client/lib/cloudmersive-convert-api-client/models/html_md_result.rb +199 -0
  100. data/client/lib/cloudmersive-convert-api-client/models/html_template_application_request.rb +208 -0
  101. data/client/lib/cloudmersive-convert-api-client/models/html_template_application_response.rb +197 -0
  102. data/client/lib/cloudmersive-convert-api-client/models/html_template_operation.rb +239 -0
  103. data/client/lib/cloudmersive-convert-api-client/models/html_to_office_request.rb +188 -0
  104. data/client/lib/cloudmersive-convert-api-client/models/html_to_pdf_request.rb +197 -0
  105. data/client/lib/cloudmersive-convert-api-client/models/insert_docx_tables_request.rb +225 -0
  106. data/client/lib/cloudmersive-convert-api-client/models/insert_docx_tables_response.rb +199 -0
  107. data/client/lib/cloudmersive-convert-api-client/models/pdf_to_png_result.rb +201 -0
  108. data/client/lib/cloudmersive-convert-api-client/models/remove_docx_headers_and_footers_request.rb +235 -0
  109. data/client/lib/cloudmersive-convert-api-client/models/remove_docx_headers_and_footers_response.rb +199 -0
  110. data/client/lib/cloudmersive-convert-api-client/models/replace_string_request.rb +245 -0
  111. data/client/lib/cloudmersive-convert-api-client/models/screenshot_request.rb +197 -0
  112. data/client/lib/cloudmersive-convert-api-client/models/viewer_response.rb +197 -0
  113. data/client/lib/cloudmersive-convert-api-client/version.rb +15 -0
  114. data/client/spec/api/compare_document_api_spec.rb +48 -0
  115. data/client/spec/api/convert_data_api_spec.rb +59 -0
  116. data/client/spec/api/convert_document_api_spec.rb +191 -0
  117. data/client/spec/api/convert_image_api_spec.rb +49 -0
  118. data/client/spec/api/convert_template_api_spec.rb +47 -0
  119. data/client/spec/api/convert_web_api_spec.rb +95 -0
  120. data/client/spec/api/edit_document_api_spec.rb +179 -0
  121. data/client/spec/api/merge_document_api_spec.rb +74 -0
  122. data/client/spec/api/validate_document_api_spec.rb +71 -0
  123. data/client/spec/api/viewer_tools_api_spec.rb +47 -0
  124. data/client/spec/api_client_spec.rb +226 -0
  125. data/client/spec/configuration_spec.rb +42 -0
  126. data/client/spec/models/converted_png_page_spec.rb +48 -0
  127. data/client/spec/models/document_validation_error_spec.rb +60 -0
  128. data/client/spec/models/document_validation_result_spec.rb +60 -0
  129. data/client/spec/models/docx_footer_spec.rb +48 -0
  130. data/client/spec/models/docx_header_spec.rb +48 -0
  131. data/client/spec/models/docx_insert_image_request_spec.rb +72 -0
  132. data/client/spec/models/docx_insert_image_response_spec.rb +48 -0
  133. data/client/spec/models/docx_paragraph_spec.rb +54 -0
  134. data/client/spec/models/docx_run_spec.rb +78 -0
  135. data/client/spec/models/docx_section_spec.rb +42 -0
  136. data/client/spec/models/docx_set_footer_request_spec.rb +54 -0
  137. data/client/spec/models/docx_set_footer_response_spec.rb +48 -0
  138. data/client/spec/models/docx_set_header_request_spec.rb +54 -0
  139. data/client/spec/models/docx_set_header_response_spec.rb +48 -0
  140. data/client/spec/models/docx_style_spec.rb +72 -0
  141. data/client/spec/models/docx_table_cell_spec.rb +78 -0
  142. data/client/spec/models/docx_table_row_spec.rb +48 -0
  143. data/client/spec/models/docx_table_spec.rb +264 -0
  144. data/client/spec/models/docx_text_spec.rb +48 -0
  145. data/client/spec/models/finish_editing_request_spec.rb +42 -0
  146. data/client/spec/models/get_docx_headers_and_footers_request_spec.rb +48 -0
  147. data/client/spec/models/get_docx_headers_and_footers_response_spec.rb +54 -0
  148. data/client/spec/models/get_docx_styles_request_spec.rb +48 -0
  149. data/client/spec/models/get_docx_styles_response_spec.rb +48 -0
  150. data/client/spec/models/get_docx_tables_request_spec.rb +48 -0
  151. data/client/spec/models/get_docx_tables_response_spec.rb +48 -0
  152. data/client/spec/models/html_md_result_spec.rb +48 -0
  153. data/client/spec/models/html_template_application_request_spec.rb +54 -0
  154. data/client/spec/models/html_template_application_response_spec.rb +48 -0
  155. data/client/spec/models/html_template_operation_spec.rb +58 -0
  156. data/client/spec/models/html_to_office_request_spec.rb +42 -0
  157. data/client/spec/models/html_to_pdf_request_spec.rb +48 -0
  158. data/client/spec/models/insert_docx_tables_request_spec.rb +54 -0
  159. data/client/spec/models/insert_docx_tables_response_spec.rb +48 -0
  160. data/client/spec/models/pdf_to_png_result_spec.rb +48 -0
  161. data/client/spec/models/remove_docx_headers_and_footers_request_spec.rb +60 -0
  162. data/client/spec/models/remove_docx_headers_and_footers_response_spec.rb +48 -0
  163. data/client/spec/models/replace_string_request_spec.rb +66 -0
  164. data/client/spec/models/screenshot_request_spec.rb +48 -0
  165. data/client/spec/models/viewer_response_spec.rb +48 -0
  166. data/client/spec/spec_helper.rb +111 -0
  167. data/cloudmersiveConvertApiClient-1.2.6.gem +0 -0
  168. data/cloudmersiveConvertApiClient-1.2.7.gem +0 -0
  169. data/packageconfig.json +11 -0
  170. data/swagger-codegen-cli.jar +0 -0
  171. metadata +173 -3
@@ -0,0 +1,91 @@
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: unset
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module CloudmersiveConvertApiClient
16
+ class ConvertImageApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Image format conversion
24
+ # Convert between over 100 file formats, including key formats such as Photoshop (PSD), PNG, JPG, GIF, NEF, and BMP.
25
+ # @param format1 Input file format as a 3+ letter file extension. Supported formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV
26
+ # @param format2 Output (convert to this format) file format as a 3+ letter file extension. Supported formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV
27
+ # @param input_file Input file to perform the operation on.
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [String]
30
+ def convert_image_image_format_convert(format1, format2, input_file, opts = {})
31
+ data, _status_code, _headers = convert_image_image_format_convert_with_http_info(format1, format2, input_file, opts)
32
+ return data
33
+ end
34
+
35
+ # Image format conversion
36
+ # Convert between over 100 file formats, including key formats such as Photoshop (PSD), PNG, JPG, GIF, NEF, and BMP.
37
+ # @param format1 Input file format as a 3+ letter file extension. Supported formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV
38
+ # @param format2 Output (convert to this format) file format as a 3+ letter file extension. Supported formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV
39
+ # @param input_file Input file to perform the operation on.
40
+ # @param [Hash] opts the optional parameters
41
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
42
+ def convert_image_image_format_convert_with_http_info(format1, format2, input_file, opts = {})
43
+ if @api_client.config.debugging
44
+ @api_client.config.logger.debug "Calling API: ConvertImageApi.convert_image_image_format_convert ..."
45
+ end
46
+ # verify the required parameter 'format1' is set
47
+ if @api_client.config.client_side_validation && format1.nil?
48
+ fail ArgumentError, "Missing the required parameter 'format1' when calling ConvertImageApi.convert_image_image_format_convert"
49
+ end
50
+ # verify the required parameter 'format2' is set
51
+ if @api_client.config.client_side_validation && format2.nil?
52
+ fail ArgumentError, "Missing the required parameter 'format2' when calling ConvertImageApi.convert_image_image_format_convert"
53
+ end
54
+ # verify the required parameter 'input_file' is set
55
+ if @api_client.config.client_side_validation && input_file.nil?
56
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertImageApi.convert_image_image_format_convert"
57
+ end
58
+ # resource path
59
+ local_var_path = "/convert/image/{format1}/to/{format2}".sub('{' + 'format1' + '}', format1.to_s).sub('{' + 'format2' + '}', format2.to_s)
60
+
61
+ # query parameters
62
+ query_params = {}
63
+
64
+ # header parameters
65
+ header_params = {}
66
+ # HTTP header 'Accept' (if needed)
67
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
68
+ # HTTP header 'Content-Type'
69
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
70
+
71
+ # form parameters
72
+ form_params = {}
73
+ form_params["inputFile"] = input_file
74
+
75
+ # http body (model)
76
+ post_body = nil
77
+ auth_names = ['Apikey']
78
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => 'String')
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: ConvertImageApi#convert_image_image_format_convert\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+ end
91
+ end
@@ -0,0 +1,78 @@
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: unset
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module CloudmersiveConvertApiClient
16
+ class ConvertTemplateApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Apply HTML template
24
+ # Apply operations to fill in an HTML template, generating a final HTML result
25
+ # @param value Operations to apply to template
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [HtmlTemplateApplicationResponse]
28
+ def convert_template_apply_html_template(value, opts = {})
29
+ data, _status_code, _headers = convert_template_apply_html_template_with_http_info(value, opts)
30
+ return data
31
+ end
32
+
33
+ # Apply HTML template
34
+ # Apply operations to fill in an HTML template, generating a final HTML result
35
+ # @param value Operations to apply to template
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(HtmlTemplateApplicationResponse, Fixnum, Hash)>] HtmlTemplateApplicationResponse data, response status code and response headers
38
+ def convert_template_apply_html_template_with_http_info(value, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: ConvertTemplateApi.convert_template_apply_html_template ..."
41
+ end
42
+ # verify the required parameter 'value' is set
43
+ if @api_client.config.client_side_validation && value.nil?
44
+ fail ArgumentError, "Missing the required parameter 'value' when calling ConvertTemplateApi.convert_template_apply_html_template"
45
+ end
46
+ # resource path
47
+ local_var_path = "/convert/template/html/apply"
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
58
+
59
+ # form parameters
60
+ form_params = {}
61
+
62
+ # http body (model)
63
+ post_body = @api_client.object_to_http_body(value)
64
+ auth_names = ['Apikey']
65
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => 'HtmlTemplateApplicationResponse')
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: ConvertTemplateApi#convert_template_apply_html_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,299 @@
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: unset
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module CloudmersiveConvertApiClient
16
+ class ConvertWebApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # HTML to DOCX
24
+ # Convert HTML to Office Word Document (DOCX) format
25
+ # @param input_request
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [String]
28
+ def convert_web_html_to_docx(input_request, opts = {})
29
+ data, _status_code, _headers = convert_web_html_to_docx_with_http_info(input_request, opts)
30
+ return data
31
+ end
32
+
33
+ # HTML to DOCX
34
+ # Convert HTML to Office Word Document (DOCX) format
35
+ # @param input_request
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
38
+ def convert_web_html_to_docx_with_http_info(input_request, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: ConvertWebApi.convert_web_html_to_docx ..."
41
+ end
42
+ # verify the required parameter 'input_request' is set
43
+ if @api_client.config.client_side_validation && input_request.nil?
44
+ fail ArgumentError, "Missing the required parameter 'input_request' when calling ConvertWebApi.convert_web_html_to_docx"
45
+ end
46
+ # resource path
47
+ local_var_path = "/convert/html/to/docx"
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
58
+
59
+ # form parameters
60
+ form_params = {}
61
+
62
+ # http body (model)
63
+ post_body = @api_client.object_to_http_body(input_request)
64
+ auth_names = ['Apikey']
65
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => 'String')
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: ConvertWebApi#convert_web_html_to_docx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+
78
+ # Convert HTML string to PDF
79
+ # Fully renders a website and returns a PDF of the HTML. Javascript, HTML5, CSS and other advanced features are all supported.
80
+ # @param input HTML to PDF request parameters
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [Object]
83
+ def convert_web_html_to_pdf(input, opts = {})
84
+ data, _status_code, _headers = convert_web_html_to_pdf_with_http_info(input, opts)
85
+ return data
86
+ end
87
+
88
+ # Convert HTML string to PDF
89
+ # Fully renders a website and returns a PDF of the HTML. Javascript, HTML5, CSS and other advanced features are all supported.
90
+ # @param input HTML to PDF request parameters
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
93
+ def convert_web_html_to_pdf_with_http_info(input, opts = {})
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug "Calling API: ConvertWebApi.convert_web_html_to_pdf ..."
96
+ end
97
+ # verify the required parameter 'input' is set
98
+ if @api_client.config.client_side_validation && input.nil?
99
+ fail ArgumentError, "Missing the required parameter 'input' when calling ConvertWebApi.convert_web_html_to_pdf"
100
+ end
101
+ # resource path
102
+ local_var_path = "/convert/web/html/to/pdf"
103
+
104
+ # query parameters
105
+ query_params = {}
106
+
107
+ # header parameters
108
+ header_params = {}
109
+ # HTTP header 'Accept' (if needed)
110
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
111
+ # HTTP header 'Content-Type'
112
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
113
+
114
+ # form parameters
115
+ form_params = {}
116
+
117
+ # http body (model)
118
+ post_body = @api_client.object_to_http_body(input)
119
+ auth_names = ['Apikey']
120
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
121
+ :header_params => header_params,
122
+ :query_params => query_params,
123
+ :form_params => form_params,
124
+ :body => post_body,
125
+ :auth_names => auth_names,
126
+ :return_type => 'Object')
127
+ if @api_client.config.debugging
128
+ @api_client.config.logger.debug "API called: ConvertWebApi#convert_web_html_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
129
+ end
130
+ return data, status_code, headers
131
+ end
132
+
133
+ # Convert Markdown to HTML
134
+ # Convert a markdown file (.md) to HTML
135
+ # @param input_file Input file to perform the operation on.
136
+ # @param [Hash] opts the optional parameters
137
+ # @return [HtmlMdResult]
138
+ def convert_web_md_to_html(input_file, opts = {})
139
+ data, _status_code, _headers = convert_web_md_to_html_with_http_info(input_file, opts)
140
+ return data
141
+ end
142
+
143
+ # Convert Markdown to HTML
144
+ # Convert a markdown file (.md) to HTML
145
+ # @param input_file Input file to perform the operation on.
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [Array<(HtmlMdResult, Fixnum, Hash)>] HtmlMdResult data, response status code and response headers
148
+ def convert_web_md_to_html_with_http_info(input_file, opts = {})
149
+ if @api_client.config.debugging
150
+ @api_client.config.logger.debug "Calling API: ConvertWebApi.convert_web_md_to_html ..."
151
+ end
152
+ # verify the required parameter 'input_file' is set
153
+ if @api_client.config.client_side_validation && input_file.nil?
154
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertWebApi.convert_web_md_to_html"
155
+ end
156
+ # resource path
157
+ local_var_path = "/convert/web/md/to/html"
158
+
159
+ # query parameters
160
+ query_params = {}
161
+
162
+ # header parameters
163
+ header_params = {}
164
+ # HTTP header 'Accept' (if needed)
165
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
166
+ # HTTP header 'Content-Type'
167
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
168
+
169
+ # form parameters
170
+ form_params = {}
171
+ form_params["inputFile"] = input_file
172
+
173
+ # http body (model)
174
+ post_body = nil
175
+ auth_names = ['Apikey']
176
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
177
+ :header_params => header_params,
178
+ :query_params => query_params,
179
+ :form_params => form_params,
180
+ :body => post_body,
181
+ :auth_names => auth_names,
182
+ :return_type => 'HtmlMdResult')
183
+ if @api_client.config.debugging
184
+ @api_client.config.logger.debug "API called: ConvertWebApi#convert_web_md_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
185
+ end
186
+ return data, status_code, headers
187
+ end
188
+
189
+ # Convert a URL to PDF
190
+ # Fully renders a website and returns a PDF of the full page. Javascript, HTML5, CSS and other advanced features are all supported.
191
+ # @param input URL to PDF request parameters
192
+ # @param [Hash] opts the optional parameters
193
+ # @return [String]
194
+ def convert_web_url_to_pdf(input, opts = {})
195
+ data, _status_code, _headers = convert_web_url_to_pdf_with_http_info(input, opts)
196
+ return data
197
+ end
198
+
199
+ # Convert a URL to PDF
200
+ # Fully renders a website and returns a PDF of the full page. Javascript, HTML5, CSS and other advanced features are all supported.
201
+ # @param input URL to PDF request parameters
202
+ # @param [Hash] opts the optional parameters
203
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
204
+ def convert_web_url_to_pdf_with_http_info(input, opts = {})
205
+ if @api_client.config.debugging
206
+ @api_client.config.logger.debug "Calling API: ConvertWebApi.convert_web_url_to_pdf ..."
207
+ end
208
+ # verify the required parameter 'input' is set
209
+ if @api_client.config.client_side_validation && input.nil?
210
+ fail ArgumentError, "Missing the required parameter 'input' when calling ConvertWebApi.convert_web_url_to_pdf"
211
+ end
212
+ # resource path
213
+ local_var_path = "/convert/web/url/to/pdf"
214
+
215
+ # query parameters
216
+ query_params = {}
217
+
218
+ # header parameters
219
+ header_params = {}
220
+ # HTTP header 'Accept' (if needed)
221
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
222
+ # HTTP header 'Content-Type'
223
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
224
+
225
+ # form parameters
226
+ form_params = {}
227
+
228
+ # http body (model)
229
+ post_body = @api_client.object_to_http_body(input)
230
+ auth_names = ['Apikey']
231
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
232
+ :header_params => header_params,
233
+ :query_params => query_params,
234
+ :form_params => form_params,
235
+ :body => post_body,
236
+ :auth_names => auth_names,
237
+ :return_type => 'String')
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug "API called: ConvertWebApi#convert_web_url_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
240
+ end
241
+ return data, status_code, headers
242
+ end
243
+
244
+ # Take screenshot of URL
245
+ # Fully renders a website and returns a PNG screenshot of the full page image. Javascript, HTML5, CSS and other advanced features are all supported.
246
+ # @param input Screenshot request parameters
247
+ # @param [Hash] opts the optional parameters
248
+ # @return [String]
249
+ def convert_web_url_to_screenshot(input, opts = {})
250
+ data, _status_code, _headers = convert_web_url_to_screenshot_with_http_info(input, opts)
251
+ return data
252
+ end
253
+
254
+ # Take screenshot of URL
255
+ # Fully renders a website and returns a PNG screenshot of the full page image. Javascript, HTML5, CSS and other advanced features are all supported.
256
+ # @param input Screenshot request parameters
257
+ # @param [Hash] opts the optional parameters
258
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
259
+ def convert_web_url_to_screenshot_with_http_info(input, opts = {})
260
+ if @api_client.config.debugging
261
+ @api_client.config.logger.debug "Calling API: ConvertWebApi.convert_web_url_to_screenshot ..."
262
+ end
263
+ # verify the required parameter 'input' is set
264
+ if @api_client.config.client_side_validation && input.nil?
265
+ fail ArgumentError, "Missing the required parameter 'input' when calling ConvertWebApi.convert_web_url_to_screenshot"
266
+ end
267
+ # resource path
268
+ local_var_path = "/convert/web/url/to/screenshot"
269
+
270
+ # query parameters
271
+ query_params = {}
272
+
273
+ # header parameters
274
+ header_params = {}
275
+ # HTTP header 'Accept' (if needed)
276
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
277
+ # HTTP header 'Content-Type'
278
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
279
+
280
+ # form parameters
281
+ form_params = {}
282
+
283
+ # http body (model)
284
+ post_body = @api_client.object_to_http_body(input)
285
+ auth_names = ['Apikey']
286
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
287
+ :header_params => header_params,
288
+ :query_params => query_params,
289
+ :form_params => form_params,
290
+ :body => post_body,
291
+ :auth_names => auth_names,
292
+ :return_type => 'String')
293
+ if @api_client.config.debugging
294
+ @api_client.config.logger.debug "API called: ConvertWebApi#convert_web_url_to_screenshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
295
+ end
296
+ return data, status_code, headers
297
+ end
298
+ end
299
+ end