cloudmersive-convert-api-client 2.0.3 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -0
- data/README.md +581 -0
- data/Rakefile +8 -0
- data/cloudmersive-convert-api-client.gemspec +45 -0
- data/docs/AddPdfAnnotationRequest.md +9 -0
- data/docs/AlternateFileFormatCandidate.md +10 -0
- data/docs/AppendXlsxRowRequest.md +11 -0
- data/docs/AppendXlsxRowResponse.md +9 -0
- data/docs/AutodetectDocumentValidationResult.md +12 -0
- data/docs/AutodetectGetInfoResult.md +14 -0
- data/docs/AutodetectToJpgResult.md +9 -0
- data/docs/AutodetectToPngResult.md +9 -0
- data/docs/AutodetectToThumbnailsResult.md +9 -0
- data/docs/Base64DecodeRequest.md +8 -0
- data/docs/Base64DecodeResponse.md +9 -0
- data/docs/Base64DetectRequest.md +8 -0
- data/docs/Base64DetectResponse.md +9 -0
- data/docs/Base64EncodeRequest.md +8 -0
- data/docs/Base64EncodeResponse.md +9 -0
- data/docs/ChangeLineEndingResponse.md +9 -0
- data/docs/ClearXlsxCellRequest.md +12 -0
- data/docs/ClearXlsxCellResponse.md +9 -0
- data/docs/ClearXlsxRowRequest.md +11 -0
- data/docs/ClearXlsxRowResponse.md +9 -0
- data/docs/CompareDocumentApi.md +66 -0
- data/docs/ConvertDataApi.md +902 -0
- data/docs/ConvertDocumentApi.md +4344 -0
- data/docs/ConvertImageApi.md +243 -0
- data/docs/ConvertTemplateApi.md +122 -0
- data/docs/ConvertWebApi.md +448 -0
- data/docs/ConvertedJpgPage.md +9 -0
- data/docs/ConvertedPngPage.md +9 -0
- data/docs/CreateBlankDocxRequest.md +8 -0
- data/docs/CreateBlankDocxResponse.md +9 -0
- data/docs/CreateBlankSpreadsheetRequest.md +8 -0
- data/docs/CreateBlankSpreadsheetResponse.md +9 -0
- data/docs/CreateSpreadsheetFromDataRequest.md +9 -0
- data/docs/CreateSpreadsheetFromDataResponse.md +9 -0
- data/docs/CreateZipArchiveRequest.md +9 -0
- data/docs/CsvCollection.md +10 -0
- data/docs/CsvFileResult.md +9 -0
- data/docs/DeleteDocxTableRowRangeRequest.md +12 -0
- data/docs/DeleteDocxTableRowRangeResponse.md +9 -0
- data/docs/DeleteDocxTableRowRequest.md +11 -0
- data/docs/DeleteDocxTableRowResponse.md +9 -0
- data/docs/DetectLineEndingsResponse.md +11 -0
- data/docs/DisableSharedWorkbookRequest.md +9 -0
- data/docs/DisableSharedWorkbookResponse.md +9 -0
- data/docs/DocumentValidationError.md +11 -0
- data/docs/DocumentValidationResult.md +12 -0
- data/docs/DocxBody.md +10 -0
- data/docs/DocxCellStyle.md +11 -0
- data/docs/DocxComment.md +16 -0
- data/docs/DocxFooter.md +10 -0
- data/docs/DocxHeader.md +10 -0
- data/docs/DocxImage.md +20 -0
- data/docs/DocxInsertCommentOnParagraphRequest.md +11 -0
- data/docs/DocxInsertImageRequest.md +16 -0
- data/docs/DocxInsertImageResponse.md +9 -0
- data/docs/DocxPage.md +9 -0
- data/docs/DocxParagraph.md +11 -0
- data/docs/DocxRemoveObjectRequest.md +10 -0
- data/docs/DocxRemoveObjectResponse.md +9 -0
- data/docs/DocxRun.md +15 -0
- data/docs/DocxSection.md +9 -0
- data/docs/DocxSetFooterAddPageNumberRequest.md +10 -0
- data/docs/DocxSetFooterRequest.md +10 -0
- data/docs/DocxSetFooterResponse.md +9 -0
- data/docs/DocxSetHeaderRequest.md +10 -0
- data/docs/DocxSetHeaderResponse.md +9 -0
- data/docs/DocxStyle.md +14 -0
- data/docs/DocxTable.md +46 -0
- data/docs/DocxTableCell.md +15 -0
- data/docs/DocxTableRow.md +10 -0
- data/docs/DocxTemplateApplicationRequest.md +8 -0
- data/docs/DocxTemplateOperation.md +10 -0
- data/docs/DocxText.md +10 -0
- data/docs/DocxToJpgResult.md +9 -0
- data/docs/DocxToPngResult.md +9 -0
- data/docs/DocxTopLevelComment.md +14 -0
- data/docs/EditDocumentApi.md +3033 -0
- data/docs/EditHtmlApi.md +329 -0
- data/docs/EditPdfApi.md +1141 -0
- data/docs/EditTextApi.md +726 -0
- data/docs/EmlAttachment.md +9 -0
- data/docs/EmlToHtmlResult.md +16 -0
- data/docs/EmlToJpgResult.md +9 -0
- data/docs/EmlToPngResult.md +9 -0
- data/docs/EnableSharedWorkbookRequest.md +9 -0
- data/docs/EnableSharedWorkbookResponse.md +9 -0
- data/docs/ExifValue.md +10 -0
- data/docs/FindDocxParagraphRequest.md +11 -0
- data/docs/FindDocxParagraphResponse.md +10 -0
- data/docs/FindRegexMatch.md +12 -0
- data/docs/FindStringMatch.md +10 -0
- data/docs/FindStringRegexRequest.md +10 -0
- data/docs/FindStringRegexResponse.md +10 -0
- data/docs/FindStringSimpleRequest.md +9 -0
- data/docs/FindStringSimpleResponse.md +10 -0
- data/docs/FinishEditingRequest.md +8 -0
- data/docs/GetDocxBodyRequest.md +9 -0
- data/docs/GetDocxBodyResponse.md +9 -0
- data/docs/GetDocxCommentsHierarchicalResponse.md +10 -0
- data/docs/GetDocxCommentsResponse.md +10 -0
- data/docs/GetDocxGetCommentsHierarchicalRequest.md +9 -0
- data/docs/GetDocxGetCommentsRequest.md +9 -0
- data/docs/GetDocxHeadersAndFootersRequest.md +9 -0
- data/docs/GetDocxHeadersAndFootersResponse.md +10 -0
- data/docs/GetDocxImagesRequest.md +9 -0
- data/docs/GetDocxImagesResponse.md +9 -0
- data/docs/GetDocxPagesRequest.md +10 -0
- data/docs/GetDocxPagesResponse.md +10 -0
- data/docs/GetDocxSectionsRequest.md +9 -0
- data/docs/GetDocxSectionsResponse.md +9 -0
- data/docs/GetDocxStylesRequest.md +9 -0
- data/docs/GetDocxStylesResponse.md +9 -0
- data/docs/GetDocxTableByIndexRequest.md +10 -0
- data/docs/GetDocxTableByIndexResponse.md +9 -0
- data/docs/GetDocxTableRowRequest.md +11 -0
- data/docs/GetDocxTableRowResponse.md +9 -0
- data/docs/GetDocxTablesRequest.md +9 -0
- data/docs/GetDocxTablesResponse.md +9 -0
- data/docs/GetFileTypeIconResult.md +10 -0
- data/docs/GetImageInfoResult.md +24 -0
- data/docs/GetPdfAnnotationsResult.md +9 -0
- data/docs/GetXlsxCellByIdentifierRequest.md +11 -0
- data/docs/GetXlsxCellByIdentifierResponse.md +9 -0
- data/docs/GetXlsxCellRequest.md +12 -0
- data/docs/GetXlsxCellResponse.md +9 -0
- data/docs/GetXlsxColumnsRequest.md +10 -0
- data/docs/GetXlsxColumnsResponse.md +9 -0
- data/docs/GetXlsxImagesRequest.md +10 -0
- data/docs/GetXlsxImagesResponse.md +9 -0
- data/docs/GetXlsxRowsAndCellsRequest.md +10 -0
- data/docs/GetXlsxRowsAndCellsResponse.md +9 -0
- data/docs/GetXlsxSpecificRowRequest.md +11 -0
- data/docs/GetXlsxSpecificRowResponse.md +9 -0
- data/docs/GetXlsxStylesRequest.md +9 -0
- data/docs/GetXlsxStylesResponse.md +9 -0
- data/docs/GetXlsxWorksheetsRequest.md +9 -0
- data/docs/GetXlsxWorksheetsResponse.md +9 -0
- data/docs/HtmlMdResult.md +9 -0
- data/docs/HtmlTemplateApplicationRequest.md +10 -0
- data/docs/HtmlTemplateApplicationResponse.md +9 -0
- data/docs/HtmlTemplateOperation.md +10 -0
- data/docs/HtmlToOfficeRequest.md +8 -0
- data/docs/HtmlToPdfRequest.md +11 -0
- data/docs/HtmlToPngRequest.md +11 -0
- data/docs/HtmlToTextRequest.md +8 -0
- data/docs/HtmlToTextResponse.md +9 -0
- data/docs/InsertDocxCommentOnParagraphResponse.md +9 -0
- data/docs/InsertDocxInsertParagraphRequest.md +12 -0
- data/docs/InsertDocxInsertParagraphResponse.md +9 -0
- data/docs/InsertDocxTableRowRequest.md +12 -0
- data/docs/InsertDocxTableRowResponse.md +9 -0
- data/docs/InsertDocxTablesRequest.md +12 -0
- data/docs/InsertDocxTablesResponse.md +9 -0
- data/docs/InsertXlsxWorksheetRequest.md +10 -0
- data/docs/InsertXlsxWorksheetResponse.md +9 -0
- data/docs/KeynoteToJpgResult.md +9 -0
- data/docs/KeynoteToPngResult.md +9 -0
- data/docs/MergeDocumentApi.md +812 -0
- data/docs/MsgAttachment.md +9 -0
- data/docs/MsgToHtmlResult.md +16 -0
- data/docs/MsgToJpgResult.md +9 -0
- data/docs/MsgToPngResult.md +9 -0
- data/docs/MultiReplaceStringRequest.md +10 -0
- data/docs/MultipageImageFormatConversionResult.md +10 -0
- data/docs/OdpToJpgResult.md +9 -0
- data/docs/OdpToPngResult.md +9 -0
- data/docs/OdsToJpgResult.md +9 -0
- data/docs/OdsToPngResult.md +9 -0
- data/docs/OdtToJpgResult.md +9 -0
- data/docs/OdtToPngResult.md +9 -0
- data/docs/PageConversionResult.md +9 -0
- data/docs/PdfAnnotation.md +19 -0
- data/docs/PdfDocument.md +10 -0
- data/docs/PdfFormField.md +11 -0
- data/docs/PdfFormFields.md +9 -0
- data/docs/PdfMetadata.md +16 -0
- data/docs/PdfPageText.md +9 -0
- data/docs/PdfTextByPageResult.md +9 -0
- data/docs/PdfToJpgResult.md +9 -0
- data/docs/PdfToPngResult.md +9 -0
- data/docs/PptxToPngResult.md +9 -0
- data/docs/PresentationResult.md +10 -0
- data/docs/RemoveDocxHeadersAndFootersRequest.md +11 -0
- data/docs/RemoveDocxHeadersAndFootersResponse.md +9 -0
- data/docs/RemoveDocxPagesRequest.md +11 -0
- data/docs/RemoveHtmlFromTextRequest.md +8 -0
- data/docs/RemoveHtmlFromTextResponse.md +9 -0
- data/docs/RemovePptxSlidesRequest.md +11 -0
- data/docs/RemoveWhitespaceFromTextRequest.md +8 -0
- data/docs/RemoveWhitespaceFromTextResponse.md +9 -0
- data/docs/RemoveXlsxWorksheetRequest.md +10 -0
- data/docs/RenameXlsxWorksheetRequest.md +11 -0
- data/docs/RenameXlsxWorksheetResponse.md +9 -0
- data/docs/ReplaceDocxParagraphRequest.md +12 -0
- data/docs/ReplaceDocxParagraphResponse.md +9 -0
- data/docs/ReplaceStringRegexRequest.md +10 -0
- data/docs/ReplaceStringRegexResponse.md +9 -0
- data/docs/ReplaceStringRequest.md +12 -0
- data/docs/ReplaceStringSimpleRequest.md +10 -0
- data/docs/ReplaceStringSimpleResponse.md +9 -0
- data/docs/RtfToJpgResult.md +9 -0
- data/docs/RtfToPngResult.md +9 -0
- data/docs/ScreenshotRequest.md +11 -0
- data/docs/SetFormFieldValue.md +11 -0
- data/docs/SetPdfFormFieldsRequest.md +9 -0
- data/docs/SetPdfMetadataRequest.md +9 -0
- data/docs/SetXlsxCellByIdentifierRequest.md +12 -0
- data/docs/SetXlsxCellByIdentifierResponse.md +9 -0
- data/docs/SetXlsxCellRequest.md +13 -0
- data/docs/SetXlsxCellResponse.md +9 -0
- data/docs/SingleReplaceString.md +10 -0
- data/docs/SplitDocumentApi.md +361 -0
- data/docs/SplitDocumentResult.md +10 -0
- data/docs/SplitDocxDocumentResult.md +9 -0
- data/docs/SplitPdfResult.md +9 -0
- data/docs/SplitPptxPresentationResult.md +9 -0
- data/docs/SplitTextDocumentByLinesResult.md +10 -0
- data/docs/SplitTextDocumentByStringResult.md +10 -0
- data/docs/SplitXlsxWorksheetResult.md +9 -0
- data/docs/TextConversionResult.md +9 -0
- data/docs/TextDocumentElement.md +9 -0
- data/docs/TextDocumentLine.md +9 -0
- data/docs/TextEncodingDetectResponse.md +9 -0
- data/docs/Thumbnail.md +9 -0
- data/docs/TransformDocumentApi.md +140 -0
- data/docs/UpdateDocxTableCellRequest.md +13 -0
- data/docs/UpdateDocxTableCellResponse.md +9 -0
- data/docs/UpdateDocxTableRowRequest.md +12 -0
- data/docs/UpdateDocxTableRowResponse.md +9 -0
- data/docs/UrlToPdfRequest.md +11 -0
- data/docs/UrlToTextRequest.md +8 -0
- data/docs/UrlToTextResponse.md +9 -0
- data/docs/ValidateDocumentApi.md +833 -0
- data/docs/ViewerResponse.md +9 -0
- data/docs/ViewerToolsApi.md +63 -0
- data/docs/WorksheetResult.md +11 -0
- data/docs/XlsxImage.md +12 -0
- data/docs/XlsxSpreadsheetCell.md +12 -0
- data/docs/XlsxSpreadsheetColumn.md +9 -0
- data/docs/XlsxSpreadsheetRow.md +9 -0
- data/docs/XlsxToPngResult.md +9 -0
- data/docs/XlsxWorksheet.md +9 -0
- data/docs/XmlAddAttributeWithXPathResult.md +10 -0
- data/docs/XmlAddChildWithXPathResult.md +10 -0
- data/docs/XmlFilterWithXPathResult.md +10 -0
- data/docs/XmlQueryWithXQueryMultiResult.md +10 -0
- data/docs/XmlQueryWithXQueryResult.md +10 -0
- data/docs/XmlRemoveAllChildrenWithXPathResult.md +10 -0
- data/docs/XmlRemoveWithXPathResult.md +11 -0
- data/docs/XmlReplaceWithXPathResult.md +10 -0
- data/docs/XmlSetValueWithXPathResult.md +10 -0
- data/docs/ZipArchiveApi.md +306 -0
- data/docs/ZipDirectory.md +10 -0
- data/docs/ZipEncryptionAdvancedRequest.md +10 -0
- data/docs/ZipExtractResponse.md +10 -0
- data/docs/ZipFile.md +9 -0
- data/git_push.sh +55 -0
- data/lib/cloudmersive-convert-api-client.rb +295 -0
- data/lib/cloudmersive-convert-api-client/api/compare_document_api.rb +85 -0
- data/lib/cloudmersive-convert-api-client/api/convert_data_api.rb +966 -0
- data/lib/cloudmersive-convert-api-client/api/convert_document_api.rb +4360 -0
- data/lib/cloudmersive-convert-api-client/api/convert_image_api.rb +273 -0
- data/lib/cloudmersive-convert-api-client/api/convert_template_api.rb +135 -0
- data/lib/cloudmersive-convert-api-client/api/convert_web_api.rb +456 -0
- data/lib/cloudmersive-convert-api-client/api/edit_document_api.rb +2994 -0
- data/lib/cloudmersive-convert-api-client/api/edit_html_api.rb +339 -0
- data/lib/cloudmersive-convert-api-client/api/edit_pdf_api.rb +1225 -0
- data/lib/cloudmersive-convert-api-client/api/edit_text_api.rb +735 -0
- data/lib/cloudmersive-convert-api-client/api/merge_document_api.rb +911 -0
- data/lib/cloudmersive-convert-api-client/api/split_document_api.rb +375 -0
- data/lib/cloudmersive-convert-api-client/api/transform_document_api.rb +161 -0
- data/lib/cloudmersive-convert-api-client/api/validate_document_api.rb +848 -0
- data/lib/cloudmersive-convert-api-client/api/viewer_tools_api.rb +78 -0
- data/lib/cloudmersive-convert-api-client/api/zip_archive_api.rb +330 -0
- data/lib/cloudmersive-convert-api-client/api_client.rb +391 -0
- data/lib/cloudmersive-convert-api-client/api_error.rb +38 -0
- data/lib/cloudmersive-convert-api-client/configuration.rb +209 -0
- data/lib/cloudmersive-convert-api-client/models/add_pdf_annotation_request.rb +213 -0
- data/lib/cloudmersive-convert-api-client/models/alternate_file_format_candidate.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/append_xlsx_row_request.rb +231 -0
- data/lib/cloudmersive-convert-api-client/models/append_xlsx_row_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/autodetect_document_validation_result.rb +227 -0
- data/lib/cloudmersive-convert-api-client/models/autodetect_get_info_result.rb +248 -0
- data/lib/cloudmersive-convert-api-client/models/autodetect_to_jpg_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/autodetect_to_png_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/autodetect_to_thumbnails_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/base64_decode_request.rb +186 -0
- data/lib/cloudmersive-convert-api-client/models/base64_decode_response.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/base64_detect_request.rb +186 -0
- data/lib/cloudmersive-convert-api-client/models/base64_detect_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/base64_encode_request.rb +201 -0
- data/lib/cloudmersive-convert-api-client/models/base64_encode_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/change_line_ending_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/clear_xlsx_cell_request.rb +241 -0
- data/lib/cloudmersive-convert-api-client/models/clear_xlsx_cell_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/clear_xlsx_row_request.rb +231 -0
- data/lib/cloudmersive-convert-api-client/models/clear_xlsx_row_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/converted_jpg_page.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/converted_png_page.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/create_blank_docx_request.rb +186 -0
- data/lib/cloudmersive-convert-api-client/models/create_blank_docx_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/create_blank_spreadsheet_request.rb +186 -0
- data/lib/cloudmersive-convert-api-client/models/create_blank_spreadsheet_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/create_spreadsheet_from_data_request.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/create_spreadsheet_from_data_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/create_zip_archive_request.rb +200 -0
- data/lib/cloudmersive-convert-api-client/models/csv_collection.rb +208 -0
- data/lib/cloudmersive-convert-api-client/models/csv_file_result.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/delete_docx_table_row_range_request.rb +241 -0
- data/lib/cloudmersive-convert-api-client/models/delete_docx_table_row_range_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/delete_docx_table_row_request.rb +231 -0
- data/lib/cloudmersive-convert-api-client/models/delete_docx_table_row_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/detect_line_endings_response.rb +216 -0
- data/lib/cloudmersive-convert-api-client/models/disable_shared_workbook_request.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/disable_shared_workbook_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/document_validation_error.rb +216 -0
- data/lib/cloudmersive-convert-api-client/models/document_validation_result.rb +228 -0
- data/lib/cloudmersive-convert-api-client/models/docx_body.rb +209 -0
- data/lib/cloudmersive-convert-api-client/models/docx_cell_style.rb +216 -0
- data/lib/cloudmersive-convert-api-client/models/docx_comment.rb +266 -0
- data/lib/cloudmersive-convert-api-client/models/docx_footer.rb +210 -0
- data/lib/cloudmersive-convert-api-client/models/docx_header.rb +210 -0
- data/lib/cloudmersive-convert-api-client/models/docx_image.rb +305 -0
- data/lib/cloudmersive-convert-api-client/models/docx_insert_comment_on_paragraph_request.rb +231 -0
- data/lib/cloudmersive-convert-api-client/models/docx_insert_image_request.rb +296 -0
- data/lib/cloudmersive-convert-api-client/models/docx_insert_image_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/docx_page.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/docx_paragraph.rb +218 -0
- data/lib/cloudmersive-convert-api-client/models/docx_remove_object_request.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/docx_remove_object_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/docx_run.rb +258 -0
- data/lib/cloudmersive-convert-api-client/models/docx_section.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/docx_set_footer_add_page_number_request.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/docx_set_footer_request.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/docx_set_footer_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/docx_set_header_request.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/docx_set_header_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/docx_style.rb +246 -0
- data/lib/cloudmersive-convert-api-client/models/docx_table.rb +568 -0
- data/lib/cloudmersive-convert-api-client/models/docx_table_cell.rb +258 -0
- data/lib/cloudmersive-convert-api-client/models/docx_table_row.rb +208 -0
- data/lib/cloudmersive-convert-api-client/models/docx_template_application_request.rb +188 -0
- data/lib/cloudmersive-convert-api-client/models/docx_template_operation.rb +239 -0
- data/lib/cloudmersive-convert-api-client/models/docx_text.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/docx_to_jpg_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/docx_to_png_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/docx_top_level_comment.rb +248 -0
- data/lib/cloudmersive-convert-api-client/models/eml_attachment.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/eml_to_html_result.rb +268 -0
- data/lib/cloudmersive-convert-api-client/models/eml_to_jpg_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/eml_to_png_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/enable_shared_workbook_request.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/enable_shared_workbook_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/exif_value.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/find_docx_paragraph_request.rb +231 -0
- data/lib/cloudmersive-convert-api-client/models/find_docx_paragraph_response.rb +208 -0
- data/lib/cloudmersive-convert-api-client/models/find_regex_match.rb +228 -0
- data/lib/cloudmersive-convert-api-client/models/find_string_match.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/find_string_regex_request.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/find_string_regex_response.rb +208 -0
- data/lib/cloudmersive-convert-api-client/models/find_string_simple_request.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/find_string_simple_response.rb +208 -0
- data/lib/cloudmersive-convert-api-client/models/finish_editing_request.rb +186 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_body_request.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_body_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_comments_hierarchical_response.rb +208 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_comments_response.rb +208 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_get_comments_hierarchical_request.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_get_comments_request.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_headers_and_footers_request.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_headers_and_footers_response.rb +208 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_images_request.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_images_response.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_pages_request.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_pages_response.rb +208 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_sections_request.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_sections_response.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_styles_request.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_styles_response.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_table_by_index_request.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_table_by_index_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_table_row_request.rb +231 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_table_row_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_tables_request.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/get_docx_tables_response.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/get_file_type_icon_result.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/get_image_info_result.rb +347 -0
- data/lib/cloudmersive-convert-api-client/models/get_pdf_annotations_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_cell_by_identifier_request.rb +231 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_cell_by_identifier_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_cell_request.rb +241 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_cell_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_columns_request.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_columns_response.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_images_request.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_images_response.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_rows_and_cells_request.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_rows_and_cells_response.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_specific_row_request.rb +231 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_specific_row_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_styles_request.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_styles_response.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_worksheets_request.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/get_xlsx_worksheets_response.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/html_md_result.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/html_template_application_request.rb +208 -0
- data/lib/cloudmersive-convert-api-client/models/html_template_application_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/html_template_operation.rb +239 -0
- data/lib/cloudmersive-convert-api-client/models/html_to_office_request.rb +186 -0
- data/lib/cloudmersive-convert-api-client/models/html_to_pdf_request.rb +216 -0
- data/lib/cloudmersive-convert-api-client/models/html_to_png_request.rb +216 -0
- data/lib/cloudmersive-convert-api-client/models/html_to_text_request.rb +186 -0
- data/lib/cloudmersive-convert-api-client/models/html_to_text_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/insert_docx_comment_on_paragraph_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/insert_docx_insert_paragraph_request.rb +241 -0
- data/lib/cloudmersive-convert-api-client/models/insert_docx_insert_paragraph_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/insert_docx_table_row_request.rb +241 -0
- data/lib/cloudmersive-convert-api-client/models/insert_docx_table_row_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/insert_docx_tables_request.rb +241 -0
- data/lib/cloudmersive-convert-api-client/models/insert_docx_tables_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/insert_xlsx_worksheet_request.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/insert_xlsx_worksheet_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/keynote_to_jpg_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/keynote_to_png_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/msg_attachment.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/msg_to_html_result.rb +268 -0
- data/lib/cloudmersive-convert-api-client/models/msg_to_jpg_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/msg_to_png_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/multi_replace_string_request.rb +223 -0
- data/lib/cloudmersive-convert-api-client/models/multipage_image_format_conversion_result.rb +208 -0
- data/lib/cloudmersive-convert-api-client/models/odp_to_jpg_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/odp_to_png_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/ods_to_jpg_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/ods_to_png_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/odt_to_jpg_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/odt_to_png_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/page_conversion_result.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/pdf_annotation.rb +296 -0
- data/lib/cloudmersive-convert-api-client/models/pdf_document.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/pdf_form_field.rb +216 -0
- data/lib/cloudmersive-convert-api-client/models/pdf_form_fields.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/pdf_metadata.rb +266 -0
- data/lib/cloudmersive-convert-api-client/models/pdf_page_text.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/pdf_text_by_page_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/pdf_to_jpg_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/pdf_to_png_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/pptx_to_png_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/presentation_result.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/remove_docx_headers_and_footers_request.rb +231 -0
- data/lib/cloudmersive-convert-api-client/models/remove_docx_headers_and_footers_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/remove_docx_pages_request.rb +231 -0
- data/lib/cloudmersive-convert-api-client/models/remove_html_from_text_request.rb +186 -0
- data/lib/cloudmersive-convert-api-client/models/remove_html_from_text_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/remove_pptx_slides_request.rb +231 -0
- data/lib/cloudmersive-convert-api-client/models/remove_whitespace_from_text_request.rb +186 -0
- data/lib/cloudmersive-convert-api-client/models/remove_whitespace_from_text_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/remove_xlsx_worksheet_request.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/rename_xlsx_worksheet_request.rb +231 -0
- data/lib/cloudmersive-convert-api-client/models/rename_xlsx_worksheet_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/replace_docx_paragraph_request.rb +241 -0
- data/lib/cloudmersive-convert-api-client/models/replace_docx_paragraph_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/replace_string_regex_request.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/replace_string_regex_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/replace_string_request.rb +241 -0
- data/lib/cloudmersive-convert-api-client/models/replace_string_simple_request.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/replace_string_simple_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/rtf_to_jpg_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/rtf_to_png_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/screenshot_request.rb +216 -0
- data/lib/cloudmersive-convert-api-client/models/set_form_field_value.rb +216 -0
- data/lib/cloudmersive-convert-api-client/models/set_pdf_form_fields_request.rb +213 -0
- data/lib/cloudmersive-convert-api-client/models/set_pdf_metadata_request.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/set_xlsx_cell_by_identifier_request.rb +241 -0
- data/lib/cloudmersive-convert-api-client/models/set_xlsx_cell_by_identifier_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/set_xlsx_cell_request.rb +251 -0
- data/lib/cloudmersive-convert-api-client/models/set_xlsx_cell_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/single_replace_string.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/split_document_result.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/split_docx_document_result.rb +197 -0
- data/lib/cloudmersive-convert-api-client/models/split_pdf_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/split_pptx_presentation_result.rb +197 -0
- data/lib/cloudmersive-convert-api-client/models/split_text_document_by_lines_result.rb +207 -0
- data/lib/cloudmersive-convert-api-client/models/split_text_document_by_string_result.rb +207 -0
- data/lib/cloudmersive-convert-api-client/models/split_xlsx_worksheet_result.rb +197 -0
- data/lib/cloudmersive-convert-api-client/models/text_conversion_result.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/text_document_element.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/text_document_line.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/text_encoding_detect_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/thumbnail.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/update_docx_table_cell_request.rb +251 -0
- data/lib/cloudmersive-convert-api-client/models/update_docx_table_cell_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/update_docx_table_row_request.rb +241 -0
- data/lib/cloudmersive-convert-api-client/models/update_docx_table_row_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/url_to_pdf_request.rb +216 -0
- data/lib/cloudmersive-convert-api-client/models/url_to_text_request.rb +186 -0
- data/lib/cloudmersive-convert-api-client/models/url_to_text_response.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/viewer_response.rb +194 -0
- data/lib/cloudmersive-convert-api-client/models/worksheet_result.rb +231 -0
- data/lib/cloudmersive-convert-api-client/models/xlsx_image.rb +225 -0
- data/lib/cloudmersive-convert-api-client/models/xlsx_spreadsheet_cell.rb +225 -0
- data/lib/cloudmersive-convert-api-client/models/xlsx_spreadsheet_column.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/xlsx_spreadsheet_row.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/xlsx_to_png_result.rb +198 -0
- data/lib/cloudmersive-convert-api-client/models/xlsx_worksheet.rb +196 -0
- data/lib/cloudmersive-convert-api-client/models/xml_add_attribute_with_x_path_result.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/xml_add_child_with_x_path_result.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/xml_filter_with_x_path_result.rb +208 -0
- data/lib/cloudmersive-convert-api-client/models/xml_query_with_x_query_multi_result.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/xml_query_with_x_query_result.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/xml_remove_all_children_with_x_path_result.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/xml_remove_with_x_path_result.rb +218 -0
- data/lib/cloudmersive-convert-api-client/models/xml_replace_with_x_path_result.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/xml_set_value_with_x_path_result.rb +206 -0
- data/lib/cloudmersive-convert-api-client/models/zip_directory.rb +210 -0
- data/lib/cloudmersive-convert-api-client/models/zip_encryption_advanced_request.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/zip_extract_response.rb +210 -0
- data/lib/cloudmersive-convert-api-client/models/zip_file.rb +211 -0
- data/lib/cloudmersive-convert-api-client/version.rb +15 -0
- data/spec/api/compare_document_api_spec.rb +48 -0
- data/spec/api/convert_data_api_spec.rb +240 -0
- data/spec/api/convert_document_api_spec.rb +998 -0
- data/spec/api/convert_image_api_spec.rb +88 -0
- data/spec/api/convert_template_api_spec.rb +60 -0
- data/spec/api/convert_web_api_spec.rb +131 -0
- data/spec/api/edit_document_api_spec.rb +695 -0
- data/spec/api/edit_html_api_spec.rb +114 -0
- data/spec/api/edit_pdf_api_spec.rb +295 -0
- data/spec/api/edit_text_api_spec.rb +192 -0
- data/spec/api/merge_document_api_spec.rb +239 -0
- data/spec/api/split_document_api_spec.rb +113 -0
- data/spec/api/transform_document_api_spec.rb +67 -0
- data/spec/api/validate_document_api_spec.rb +215 -0
- data/spec/api/viewer_tools_api_spec.rb +47 -0
- data/spec/api/zip_archive_api_spec.rb +105 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/add_pdf_annotation_request_spec.rb +47 -0
- data/spec/models/alternate_file_format_candidate_spec.rb +53 -0
- data/spec/models/append_xlsx_row_request_spec.rb +59 -0
- data/spec/models/append_xlsx_row_response_spec.rb +47 -0
- data/spec/models/autodetect_document_validation_result_spec.rb +65 -0
- data/spec/models/autodetect_get_info_result_spec.rb +77 -0
- data/spec/models/autodetect_to_jpg_result_spec.rb +47 -0
- data/spec/models/autodetect_to_png_result_spec.rb +47 -0
- data/spec/models/autodetect_to_thumbnails_result_spec.rb +47 -0
- data/spec/models/base64_decode_request_spec.rb +41 -0
- data/spec/models/base64_decode_response_spec.rb +47 -0
- data/spec/models/base64_detect_request_spec.rb +41 -0
- data/spec/models/base64_detect_response_spec.rb +47 -0
- data/spec/models/base64_encode_request_spec.rb +41 -0
- data/spec/models/base64_encode_response_spec.rb +47 -0
- data/spec/models/change_line_ending_response_spec.rb +47 -0
- data/spec/models/clear_xlsx_cell_request_spec.rb +65 -0
- data/spec/models/clear_xlsx_cell_response_spec.rb +47 -0
- data/spec/models/clear_xlsx_row_request_spec.rb +59 -0
- data/spec/models/clear_xlsx_row_response_spec.rb +47 -0
- data/spec/models/converted_jpg_page_spec.rb +47 -0
- data/spec/models/converted_png_page_spec.rb +47 -0
- data/spec/models/create_blank_docx_request_spec.rb +41 -0
- data/spec/models/create_blank_docx_response_spec.rb +47 -0
- data/spec/models/create_blank_spreadsheet_request_spec.rb +41 -0
- data/spec/models/create_blank_spreadsheet_response_spec.rb +47 -0
- data/spec/models/create_spreadsheet_from_data_request_spec.rb +47 -0
- data/spec/models/create_spreadsheet_from_data_response_spec.rb +47 -0
- data/spec/models/create_zip_archive_request_spec.rb +47 -0
- data/spec/models/csv_collection_spec.rb +53 -0
- data/spec/models/csv_file_result_spec.rb +47 -0
- data/spec/models/delete_docx_table_row_range_request_spec.rb +65 -0
- data/spec/models/delete_docx_table_row_range_response_spec.rb +47 -0
- data/spec/models/delete_docx_table_row_request_spec.rb +59 -0
- data/spec/models/delete_docx_table_row_response_spec.rb +47 -0
- data/spec/models/detect_line_endings_response_spec.rb +59 -0
- data/spec/models/disable_shared_workbook_request_spec.rb +47 -0
- data/spec/models/disable_shared_workbook_response_spec.rb +47 -0
- data/spec/models/document_validation_error_spec.rb +59 -0
- data/spec/models/document_validation_result_spec.rb +65 -0
- data/spec/models/docx_body_spec.rb +53 -0
- data/spec/models/docx_cell_style_spec.rb +59 -0
- data/spec/models/docx_comment_spec.rb +89 -0
- data/spec/models/docx_footer_spec.rb +53 -0
- data/spec/models/docx_header_spec.rb +53 -0
- data/spec/models/docx_image_spec.rb +113 -0
- data/spec/models/docx_insert_comment_on_paragraph_request_spec.rb +59 -0
- data/spec/models/docx_insert_image_request_spec.rb +89 -0
- data/spec/models/docx_insert_image_response_spec.rb +47 -0
- data/spec/models/docx_page_spec.rb +47 -0
- data/spec/models/docx_paragraph_spec.rb +59 -0
- data/spec/models/docx_remove_object_request_spec.rb +53 -0
- data/spec/models/docx_remove_object_response_spec.rb +47 -0
- data/spec/models/docx_run_spec.rb +83 -0
- data/spec/models/docx_section_spec.rb +47 -0
- data/spec/models/docx_set_footer_add_page_number_request_spec.rb +53 -0
- data/spec/models/docx_set_footer_request_spec.rb +53 -0
- data/spec/models/docx_set_footer_response_spec.rb +47 -0
- data/spec/models/docx_set_header_request_spec.rb +53 -0
- data/spec/models/docx_set_header_response_spec.rb +47 -0
- data/spec/models/docx_style_spec.rb +77 -0
- data/spec/models/docx_table_cell_spec.rb +83 -0
- data/spec/models/docx_table_row_spec.rb +53 -0
- data/spec/models/docx_table_spec.rb +269 -0
- data/spec/models/docx_template_application_request_spec.rb +41 -0
- data/spec/models/docx_template_operation_spec.rb +57 -0
- data/spec/models/docx_text_spec.rb +53 -0
- data/spec/models/docx_to_jpg_result_spec.rb +47 -0
- data/spec/models/docx_to_png_result_spec.rb +47 -0
- data/spec/models/docx_top_level_comment_spec.rb +77 -0
- data/spec/models/eml_attachment_spec.rb +47 -0
- data/spec/models/eml_to_html_result_spec.rb +89 -0
- data/spec/models/eml_to_jpg_result_spec.rb +47 -0
- data/spec/models/eml_to_png_result_spec.rb +47 -0
- data/spec/models/enable_shared_workbook_request_spec.rb +47 -0
- data/spec/models/enable_shared_workbook_response_spec.rb +47 -0
- data/spec/models/exif_value_spec.rb +53 -0
- data/spec/models/find_docx_paragraph_request_spec.rb +59 -0
- data/spec/models/find_docx_paragraph_response_spec.rb +53 -0
- data/spec/models/find_regex_match_spec.rb +65 -0
- data/spec/models/find_string_match_spec.rb +53 -0
- data/spec/models/find_string_regex_request_spec.rb +53 -0
- data/spec/models/find_string_regex_response_spec.rb +53 -0
- data/spec/models/find_string_simple_request_spec.rb +47 -0
- data/spec/models/find_string_simple_response_spec.rb +53 -0
- data/spec/models/finish_editing_request_spec.rb +41 -0
- data/spec/models/get_docx_body_request_spec.rb +47 -0
- data/spec/models/get_docx_body_response_spec.rb +47 -0
- data/spec/models/get_docx_comments_hierarchical_response_spec.rb +53 -0
- data/spec/models/get_docx_comments_response_spec.rb +53 -0
- data/spec/models/get_docx_get_comments_hierarchical_request_spec.rb +47 -0
- data/spec/models/get_docx_get_comments_request_spec.rb +47 -0
- data/spec/models/get_docx_headers_and_footers_request_spec.rb +47 -0
- data/spec/models/get_docx_headers_and_footers_response_spec.rb +53 -0
- data/spec/models/get_docx_images_request_spec.rb +47 -0
- data/spec/models/get_docx_images_response_spec.rb +47 -0
- data/spec/models/get_docx_pages_request_spec.rb +53 -0
- data/spec/models/get_docx_pages_response_spec.rb +53 -0
- data/spec/models/get_docx_sections_request_spec.rb +47 -0
- data/spec/models/get_docx_sections_response_spec.rb +47 -0
- data/spec/models/get_docx_styles_request_spec.rb +47 -0
- data/spec/models/get_docx_styles_response_spec.rb +47 -0
- data/spec/models/get_docx_table_by_index_request_spec.rb +53 -0
- data/spec/models/get_docx_table_by_index_response_spec.rb +47 -0
- data/spec/models/get_docx_table_row_request_spec.rb +59 -0
- data/spec/models/get_docx_table_row_response_spec.rb +47 -0
- data/spec/models/get_docx_tables_request_spec.rb +47 -0
- data/spec/models/get_docx_tables_response_spec.rb +47 -0
- data/spec/models/get_file_type_icon_result_spec.rb +53 -0
- data/spec/models/get_image_info_result_spec.rb +137 -0
- data/spec/models/get_pdf_annotations_result_spec.rb +47 -0
- data/spec/models/get_xlsx_cell_by_identifier_request_spec.rb +59 -0
- data/spec/models/get_xlsx_cell_by_identifier_response_spec.rb +47 -0
- data/spec/models/get_xlsx_cell_request_spec.rb +65 -0
- data/spec/models/get_xlsx_cell_response_spec.rb +47 -0
- data/spec/models/get_xlsx_columns_request_spec.rb +53 -0
- data/spec/models/get_xlsx_columns_response_spec.rb +47 -0
- data/spec/models/get_xlsx_images_request_spec.rb +53 -0
- data/spec/models/get_xlsx_images_response_spec.rb +47 -0
- data/spec/models/get_xlsx_rows_and_cells_request_spec.rb +53 -0
- data/spec/models/get_xlsx_rows_and_cells_response_spec.rb +47 -0
- data/spec/models/get_xlsx_specific_row_request_spec.rb +59 -0
- data/spec/models/get_xlsx_specific_row_response_spec.rb +47 -0
- data/spec/models/get_xlsx_styles_request_spec.rb +47 -0
- data/spec/models/get_xlsx_styles_response_spec.rb +47 -0
- data/spec/models/get_xlsx_worksheets_request_spec.rb +47 -0
- data/spec/models/get_xlsx_worksheets_response_spec.rb +47 -0
- data/spec/models/html_md_result_spec.rb +47 -0
- data/spec/models/html_template_application_request_spec.rb +53 -0
- data/spec/models/html_template_application_response_spec.rb +47 -0
- data/spec/models/html_template_operation_spec.rb +57 -0
- data/spec/models/html_to_office_request_spec.rb +41 -0
- data/spec/models/html_to_pdf_request_spec.rb +59 -0
- data/spec/models/html_to_png_request_spec.rb +59 -0
- data/spec/models/html_to_text_request_spec.rb +41 -0
- data/spec/models/html_to_text_response_spec.rb +47 -0
- data/spec/models/insert_docx_comment_on_paragraph_response_spec.rb +47 -0
- data/spec/models/insert_docx_insert_paragraph_request_spec.rb +65 -0
- data/spec/models/insert_docx_insert_paragraph_response_spec.rb +47 -0
- data/spec/models/insert_docx_table_row_request_spec.rb +65 -0
- data/spec/models/insert_docx_table_row_response_spec.rb +47 -0
- data/spec/models/insert_docx_tables_request_spec.rb +65 -0
- data/spec/models/insert_docx_tables_response_spec.rb +47 -0
- data/spec/models/insert_xlsx_worksheet_request_spec.rb +53 -0
- data/spec/models/insert_xlsx_worksheet_response_spec.rb +47 -0
- data/spec/models/keynote_to_jpg_result_spec.rb +47 -0
- data/spec/models/keynote_to_png_result_spec.rb +47 -0
- data/spec/models/msg_attachment_spec.rb +47 -0
- data/spec/models/msg_to_html_result_spec.rb +89 -0
- data/spec/models/msg_to_jpg_result_spec.rb +47 -0
- data/spec/models/msg_to_png_result_spec.rb +47 -0
- data/spec/models/multi_replace_string_request_spec.rb +53 -0
- data/spec/models/multipage_image_format_conversion_result_spec.rb +53 -0
- data/spec/models/odp_to_jpg_result_spec.rb +47 -0
- data/spec/models/odp_to_png_result_spec.rb +47 -0
- data/spec/models/ods_to_jpg_result_spec.rb +47 -0
- data/spec/models/ods_to_png_result_spec.rb +47 -0
- data/spec/models/odt_to_jpg_result_spec.rb +47 -0
- data/spec/models/odt_to_png_result_spec.rb +47 -0
- data/spec/models/page_conversion_result_spec.rb +47 -0
- data/spec/models/pdf_annotation_spec.rb +107 -0
- data/spec/models/pdf_document_spec.rb +53 -0
- data/spec/models/pdf_form_field_spec.rb +59 -0
- data/spec/models/pdf_form_fields_spec.rb +47 -0
- data/spec/models/pdf_metadata_spec.rb +89 -0
- data/spec/models/pdf_page_text_spec.rb +47 -0
- data/spec/models/pdf_text_by_page_result_spec.rb +47 -0
- data/spec/models/pdf_to_jpg_result_spec.rb +47 -0
- data/spec/models/pdf_to_png_result_spec.rb +47 -0
- data/spec/models/pptx_to_png_result_spec.rb +47 -0
- data/spec/models/presentation_result_spec.rb +53 -0
- data/spec/models/remove_docx_headers_and_footers_request_spec.rb +59 -0
- data/spec/models/remove_docx_headers_and_footers_response_spec.rb +47 -0
- data/spec/models/remove_docx_pages_request_spec.rb +59 -0
- data/spec/models/remove_html_from_text_request_spec.rb +41 -0
- data/spec/models/remove_html_from_text_response_spec.rb +47 -0
- data/spec/models/remove_pptx_slides_request_spec.rb +59 -0
- data/spec/models/remove_whitespace_from_text_request_spec.rb +41 -0
- data/spec/models/remove_whitespace_from_text_response_spec.rb +47 -0
- data/spec/models/remove_xlsx_worksheet_request_spec.rb +53 -0
- data/spec/models/rename_xlsx_worksheet_request_spec.rb +59 -0
- data/spec/models/rename_xlsx_worksheet_response_spec.rb +47 -0
- data/spec/models/replace_docx_paragraph_request_spec.rb +65 -0
- data/spec/models/replace_docx_paragraph_response_spec.rb +47 -0
- data/spec/models/replace_string_regex_request_spec.rb +53 -0
- data/spec/models/replace_string_regex_response_spec.rb +47 -0
- data/spec/models/replace_string_request_spec.rb +65 -0
- data/spec/models/replace_string_simple_request_spec.rb +53 -0
- data/spec/models/replace_string_simple_response_spec.rb +47 -0
- data/spec/models/rtf_to_jpg_result_spec.rb +47 -0
- data/spec/models/rtf_to_png_result_spec.rb +47 -0
- data/spec/models/screenshot_request_spec.rb +59 -0
- data/spec/models/set_form_field_value_spec.rb +59 -0
- data/spec/models/set_pdf_form_fields_request_spec.rb +47 -0
- data/spec/models/set_pdf_metadata_request_spec.rb +47 -0
- data/spec/models/set_xlsx_cell_by_identifier_request_spec.rb +65 -0
- data/spec/models/set_xlsx_cell_by_identifier_response_spec.rb +47 -0
- data/spec/models/set_xlsx_cell_request_spec.rb +71 -0
- data/spec/models/set_xlsx_cell_response_spec.rb +47 -0
- data/spec/models/single_replace_string_spec.rb +53 -0
- data/spec/models/split_document_result_spec.rb +53 -0
- data/spec/models/split_docx_document_result_spec.rb +47 -0
- data/spec/models/split_pdf_result_spec.rb +47 -0
- data/spec/models/split_pptx_presentation_result_spec.rb +47 -0
- data/spec/models/split_text_document_by_lines_result_spec.rb +53 -0
- data/spec/models/split_text_document_by_string_result_spec.rb +53 -0
- data/spec/models/split_xlsx_worksheet_result_spec.rb +47 -0
- data/spec/models/text_conversion_result_spec.rb +47 -0
- data/spec/models/text_document_element_spec.rb +47 -0
- data/spec/models/text_document_line_spec.rb +47 -0
- data/spec/models/text_encoding_detect_response_spec.rb +47 -0
- data/spec/models/thumbnail_spec.rb +47 -0
- data/spec/models/update_docx_table_cell_request_spec.rb +71 -0
- data/spec/models/update_docx_table_cell_response_spec.rb +47 -0
- data/spec/models/update_docx_table_row_request_spec.rb +65 -0
- data/spec/models/update_docx_table_row_response_spec.rb +47 -0
- data/spec/models/url_to_pdf_request_spec.rb +59 -0
- data/spec/models/url_to_text_request_spec.rb +41 -0
- data/spec/models/url_to_text_response_spec.rb +47 -0
- data/spec/models/viewer_response_spec.rb +47 -0
- data/spec/models/worksheet_result_spec.rb +59 -0
- data/spec/models/xlsx_image_spec.rb +65 -0
- data/spec/models/xlsx_spreadsheet_cell_spec.rb +65 -0
- data/spec/models/xlsx_spreadsheet_column_spec.rb +47 -0
- data/spec/models/xlsx_spreadsheet_row_spec.rb +47 -0
- data/spec/models/xlsx_to_png_result_spec.rb +47 -0
- data/spec/models/xlsx_worksheet_spec.rb +47 -0
- data/spec/models/xml_add_attribute_with_x_path_result_spec.rb +53 -0
- data/spec/models/xml_add_child_with_x_path_result_spec.rb +53 -0
- data/spec/models/xml_filter_with_x_path_result_spec.rb +53 -0
- data/spec/models/xml_query_with_x_query_multi_result_spec.rb +53 -0
- data/spec/models/xml_query_with_x_query_result_spec.rb +53 -0
- data/spec/models/xml_remove_all_children_with_x_path_result_spec.rb +53 -0
- data/spec/models/xml_remove_with_x_path_result_spec.rb +59 -0
- data/spec/models/xml_replace_with_x_path_result_spec.rb +53 -0
- data/spec/models/xml_set_value_with_x_path_result_spec.rb +53 -0
- data/spec/models/zip_directory_spec.rb +53 -0
- data/spec/models/zip_encryption_advanced_request_spec.rb +53 -0
- data/spec/models/zip_extract_response_spec.rb +53 -0
- data/spec/models/zip_file_spec.rb +47 -0
- data/spec/spec_helper.rb +111 -0
- metadata +785 -4
@@ -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: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module CloudmersiveConvertApiClient
|
16
|
+
class ViewerToolsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a web-based viewer
|
23
|
+
# Creates an HTML embed code for a simple web-based viewer of a document; supports Office document types and PDF.
|
24
|
+
# @param input_file Input file to perform the operation on.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [ViewerResponse]
|
27
|
+
def viewer_tools_create_simple(input_file, opts = {})
|
28
|
+
data, _status_code, _headers = viewer_tools_create_simple_with_http_info(input_file, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create a web-based viewer
|
33
|
+
# Creates an HTML embed code for a simple web-based viewer of a document; supports Office document types and PDF.
|
34
|
+
# @param input_file Input file to perform the operation on.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(ViewerResponse, Fixnum, Hash)>] ViewerResponse data, response status code and response headers
|
37
|
+
def viewer_tools_create_simple_with_http_info(input_file, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: ViewerToolsApi.viewer_tools_create_simple ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'input_file' is set
|
42
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling ViewerToolsApi.viewer_tools_create_simple"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/convert/viewer/create/web/simple'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = {}
|
60
|
+
form_params['inputFile'] = input_file
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = nil
|
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 => 'ViewerResponse')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: ViewerToolsApi#viewer_tools_create_simple\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,330 @@
|
|
1
|
+
=begin
|
2
|
+
#convertapi
|
3
|
+
|
4
|
+
#Convert API lets you effortlessly convert file formats and types.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module CloudmersiveConvertApiClient
|
16
|
+
class ZipArchiveApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Compress files to create a new zip archive
|
23
|
+
# Create a new zip archive by compressing input files.
|
24
|
+
# @param input_file1 First input file to perform the operation on.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [File] :input_file2 Second input file to perform the operation on.
|
27
|
+
# @option opts [File] :input_file3 Third input file to perform the operation on.
|
28
|
+
# @option opts [File] :input_file4 Fourth input file to perform the operation on.
|
29
|
+
# @option opts [File] :input_file5 Fifth input file to perform the operation on.
|
30
|
+
# @option opts [File] :input_file6 Sixth input file to perform the operation on.
|
31
|
+
# @option opts [File] :input_file7 Seventh input file to perform the operation on.
|
32
|
+
# @option opts [File] :input_file8 Eighth input file to perform the operation on.
|
33
|
+
# @option opts [File] :input_file9 Ninth input file to perform the operation on.
|
34
|
+
# @option opts [File] :input_file10 Tenth input file to perform the operation on.
|
35
|
+
# @return [String]
|
36
|
+
def zip_archive_zip_create(input_file1, opts = {})
|
37
|
+
data, _status_code, _headers = zip_archive_zip_create_with_http_info(input_file1, opts)
|
38
|
+
data
|
39
|
+
end
|
40
|
+
|
41
|
+
# Compress files to create a new zip archive
|
42
|
+
# Create a new zip archive by compressing input files.
|
43
|
+
# @param input_file1 First input file to perform the operation on.
|
44
|
+
# @param [Hash] opts the optional parameters
|
45
|
+
# @option opts [File] :input_file2 Second input file to perform the operation on.
|
46
|
+
# @option opts [File] :input_file3 Third input file to perform the operation on.
|
47
|
+
# @option opts [File] :input_file4 Fourth input file to perform the operation on.
|
48
|
+
# @option opts [File] :input_file5 Fifth input file to perform the operation on.
|
49
|
+
# @option opts [File] :input_file6 Sixth input file to perform the operation on.
|
50
|
+
# @option opts [File] :input_file7 Seventh input file to perform the operation on.
|
51
|
+
# @option opts [File] :input_file8 Eighth input file to perform the operation on.
|
52
|
+
# @option opts [File] :input_file9 Ninth input file to perform the operation on.
|
53
|
+
# @option opts [File] :input_file10 Tenth input file to perform the operation on.
|
54
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
55
|
+
def zip_archive_zip_create_with_http_info(input_file1, opts = {})
|
56
|
+
if @api_client.config.debugging
|
57
|
+
@api_client.config.logger.debug 'Calling API: ZipArchiveApi.zip_archive_zip_create ...'
|
58
|
+
end
|
59
|
+
# verify the required parameter 'input_file1' is set
|
60
|
+
if @api_client.config.client_side_validation && input_file1.nil?
|
61
|
+
fail ArgumentError, "Missing the required parameter 'input_file1' when calling ZipArchiveApi.zip_archive_zip_create"
|
62
|
+
end
|
63
|
+
# resource path
|
64
|
+
local_var_path = '/convert/archive/zip/create'
|
65
|
+
|
66
|
+
# query parameters
|
67
|
+
query_params = {}
|
68
|
+
|
69
|
+
# header parameters
|
70
|
+
header_params = {}
|
71
|
+
# HTTP header 'Accept' (if needed)
|
72
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
73
|
+
# HTTP header 'Content-Type'
|
74
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
75
|
+
|
76
|
+
# form parameters
|
77
|
+
form_params = {}
|
78
|
+
form_params['inputFile1'] = input_file1
|
79
|
+
form_params['inputFile2'] = opts[:'input_file2'] if !opts[:'input_file2'].nil?
|
80
|
+
form_params['inputFile3'] = opts[:'input_file3'] if !opts[:'input_file3'].nil?
|
81
|
+
form_params['inputFile4'] = opts[:'input_file4'] if !opts[:'input_file4'].nil?
|
82
|
+
form_params['inputFile5'] = opts[:'input_file5'] if !opts[:'input_file5'].nil?
|
83
|
+
form_params['inputFile6'] = opts[:'input_file6'] if !opts[:'input_file6'].nil?
|
84
|
+
form_params['inputFile7'] = opts[:'input_file7'] if !opts[:'input_file7'].nil?
|
85
|
+
form_params['inputFile8'] = opts[:'input_file8'] if !opts[:'input_file8'].nil?
|
86
|
+
form_params['inputFile9'] = opts[:'input_file9'] if !opts[:'input_file9'].nil?
|
87
|
+
form_params['inputFile10'] = opts[:'input_file10'] if !opts[:'input_file10'].nil?
|
88
|
+
|
89
|
+
# http body (model)
|
90
|
+
post_body = nil
|
91
|
+
auth_names = ['Apikey']
|
92
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
93
|
+
:header_params => header_params,
|
94
|
+
:query_params => query_params,
|
95
|
+
:form_params => form_params,
|
96
|
+
:body => post_body,
|
97
|
+
:auth_names => auth_names,
|
98
|
+
:return_type => 'String')
|
99
|
+
if @api_client.config.debugging
|
100
|
+
@api_client.config.logger.debug "API called: ZipArchiveApi#zip_archive_zip_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
101
|
+
end
|
102
|
+
return data, status_code, headers
|
103
|
+
end
|
104
|
+
# Compress files and folders to create a new zip archive with advanced options
|
105
|
+
# Create a new zip archive by compressing input files, folders and leverage advanced options to control the structure of the resulting zip archive.
|
106
|
+
# @param request Input request
|
107
|
+
# @param [Hash] opts the optional parameters
|
108
|
+
# @return [Object]
|
109
|
+
def zip_archive_zip_create_advanced(request, opts = {})
|
110
|
+
data, _status_code, _headers = zip_archive_zip_create_advanced_with_http_info(request, opts)
|
111
|
+
data
|
112
|
+
end
|
113
|
+
|
114
|
+
# Compress files and folders to create a new zip archive with advanced options
|
115
|
+
# Create a new zip archive by compressing input files, folders and leverage advanced options to control the structure of the resulting zip archive.
|
116
|
+
# @param request Input request
|
117
|
+
# @param [Hash] opts the optional parameters
|
118
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
119
|
+
def zip_archive_zip_create_advanced_with_http_info(request, opts = {})
|
120
|
+
if @api_client.config.debugging
|
121
|
+
@api_client.config.logger.debug 'Calling API: ZipArchiveApi.zip_archive_zip_create_advanced ...'
|
122
|
+
end
|
123
|
+
# verify the required parameter 'request' is set
|
124
|
+
if @api_client.config.client_side_validation && request.nil?
|
125
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ZipArchiveApi.zip_archive_zip_create_advanced"
|
126
|
+
end
|
127
|
+
# resource path
|
128
|
+
local_var_path = '/convert/archive/zip/create/advanced'
|
129
|
+
|
130
|
+
# query parameters
|
131
|
+
query_params = {}
|
132
|
+
|
133
|
+
# header parameters
|
134
|
+
header_params = {}
|
135
|
+
# HTTP header 'Accept' (if needed)
|
136
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
137
|
+
# HTTP header 'Content-Type'
|
138
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
139
|
+
|
140
|
+
# form parameters
|
141
|
+
form_params = {}
|
142
|
+
|
143
|
+
# http body (model)
|
144
|
+
post_body = @api_client.object_to_http_body(request)
|
145
|
+
auth_names = ['Apikey']
|
146
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
147
|
+
:header_params => header_params,
|
148
|
+
:query_params => query_params,
|
149
|
+
:form_params => form_params,
|
150
|
+
:body => post_body,
|
151
|
+
:auth_names => auth_names,
|
152
|
+
:return_type => 'Object')
|
153
|
+
if @api_client.config.debugging
|
154
|
+
@api_client.config.logger.debug "API called: ZipArchiveApi#zip_archive_zip_create_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
155
|
+
end
|
156
|
+
return data, status_code, headers
|
157
|
+
end
|
158
|
+
# Decrypt and remove password protection on a zip file
|
159
|
+
# Decrypts and removes password protection from an encrypted zip file with the specified password
|
160
|
+
# @param input_file Input file to perform the operation on.
|
161
|
+
# @param zip_password Required; Password for the input archive
|
162
|
+
# @param [Hash] opts the optional parameters
|
163
|
+
# @return [Object]
|
164
|
+
def zip_archive_zip_decrypt(input_file, zip_password, opts = {})
|
165
|
+
data, _status_code, _headers = zip_archive_zip_decrypt_with_http_info(input_file, zip_password, opts)
|
166
|
+
data
|
167
|
+
end
|
168
|
+
|
169
|
+
# Decrypt and remove password protection on a zip file
|
170
|
+
# Decrypts and removes password protection from an encrypted zip file with the specified password
|
171
|
+
# @param input_file Input file to perform the operation on.
|
172
|
+
# @param zip_password Required; Password for the input archive
|
173
|
+
# @param [Hash] opts the optional parameters
|
174
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
175
|
+
def zip_archive_zip_decrypt_with_http_info(input_file, zip_password, opts = {})
|
176
|
+
if @api_client.config.debugging
|
177
|
+
@api_client.config.logger.debug 'Calling API: ZipArchiveApi.zip_archive_zip_decrypt ...'
|
178
|
+
end
|
179
|
+
# verify the required parameter 'input_file' is set
|
180
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
181
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling ZipArchiveApi.zip_archive_zip_decrypt"
|
182
|
+
end
|
183
|
+
# verify the required parameter 'zip_password' is set
|
184
|
+
if @api_client.config.client_side_validation && zip_password.nil?
|
185
|
+
fail ArgumentError, "Missing the required parameter 'zip_password' when calling ZipArchiveApi.zip_archive_zip_decrypt"
|
186
|
+
end
|
187
|
+
# resource path
|
188
|
+
local_var_path = '/convert/archive/zip/decrypt'
|
189
|
+
|
190
|
+
# query parameters
|
191
|
+
query_params = {}
|
192
|
+
|
193
|
+
# header parameters
|
194
|
+
header_params = {}
|
195
|
+
# HTTP header 'Accept' (if needed)
|
196
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
197
|
+
# HTTP header 'Content-Type'
|
198
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
199
|
+
header_params[:'zipPassword'] = zip_password
|
200
|
+
|
201
|
+
# form parameters
|
202
|
+
form_params = {}
|
203
|
+
form_params['inputFile'] = input_file
|
204
|
+
|
205
|
+
# http body (model)
|
206
|
+
post_body = nil
|
207
|
+
auth_names = ['Apikey']
|
208
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
209
|
+
:header_params => header_params,
|
210
|
+
:query_params => query_params,
|
211
|
+
:form_params => form_params,
|
212
|
+
:body => post_body,
|
213
|
+
:auth_names => auth_names,
|
214
|
+
:return_type => 'Object')
|
215
|
+
if @api_client.config.debugging
|
216
|
+
@api_client.config.logger.debug "API called: ZipArchiveApi#zip_archive_zip_decrypt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
217
|
+
end
|
218
|
+
return data, status_code, headers
|
219
|
+
end
|
220
|
+
# Encrypt and password protect a zip file
|
221
|
+
# Encrypts and password protects an existing zip file with the specified password and encryption algorithm
|
222
|
+
# @param encryption_request Encryption request
|
223
|
+
# @param [Hash] opts the optional parameters
|
224
|
+
# @return [Object]
|
225
|
+
def zip_archive_zip_encrypt_advanced(encryption_request, opts = {})
|
226
|
+
data, _status_code, _headers = zip_archive_zip_encrypt_advanced_with_http_info(encryption_request, opts)
|
227
|
+
data
|
228
|
+
end
|
229
|
+
|
230
|
+
# Encrypt and password protect a zip file
|
231
|
+
# Encrypts and password protects an existing zip file with the specified password and encryption algorithm
|
232
|
+
# @param encryption_request Encryption request
|
233
|
+
# @param [Hash] opts the optional parameters
|
234
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
235
|
+
def zip_archive_zip_encrypt_advanced_with_http_info(encryption_request, opts = {})
|
236
|
+
if @api_client.config.debugging
|
237
|
+
@api_client.config.logger.debug 'Calling API: ZipArchiveApi.zip_archive_zip_encrypt_advanced ...'
|
238
|
+
end
|
239
|
+
# verify the required parameter 'encryption_request' is set
|
240
|
+
if @api_client.config.client_side_validation && encryption_request.nil?
|
241
|
+
fail ArgumentError, "Missing the required parameter 'encryption_request' when calling ZipArchiveApi.zip_archive_zip_encrypt_advanced"
|
242
|
+
end
|
243
|
+
# resource path
|
244
|
+
local_var_path = '/convert/archive/zip/encrypt/advanced'
|
245
|
+
|
246
|
+
# query parameters
|
247
|
+
query_params = {}
|
248
|
+
|
249
|
+
# header parameters
|
250
|
+
header_params = {}
|
251
|
+
# HTTP header 'Accept' (if needed)
|
252
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
253
|
+
# HTTP header 'Content-Type'
|
254
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
255
|
+
|
256
|
+
# form parameters
|
257
|
+
form_params = {}
|
258
|
+
|
259
|
+
# http body (model)
|
260
|
+
post_body = @api_client.object_to_http_body(encryption_request)
|
261
|
+
auth_names = ['Apikey']
|
262
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
263
|
+
:header_params => header_params,
|
264
|
+
:query_params => query_params,
|
265
|
+
:form_params => form_params,
|
266
|
+
:body => post_body,
|
267
|
+
:auth_names => auth_names,
|
268
|
+
:return_type => 'Object')
|
269
|
+
if @api_client.config.debugging
|
270
|
+
@api_client.config.logger.debug "API called: ZipArchiveApi#zip_archive_zip_encrypt_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
271
|
+
end
|
272
|
+
return data, status_code, headers
|
273
|
+
end
|
274
|
+
# Extract, decompress files and folders from a zip archive
|
275
|
+
# Extracts a zip archive by decompressing files, and folders.
|
276
|
+
# @param input_file Input file to perform the operation on.
|
277
|
+
# @param [Hash] opts the optional parameters
|
278
|
+
# @return [ZipExtractResponse]
|
279
|
+
def zip_archive_zip_extract(input_file, opts = {})
|
280
|
+
data, _status_code, _headers = zip_archive_zip_extract_with_http_info(input_file, opts)
|
281
|
+
data
|
282
|
+
end
|
283
|
+
|
284
|
+
# Extract, decompress files and folders from a zip archive
|
285
|
+
# Extracts a zip archive by decompressing files, and folders.
|
286
|
+
# @param input_file Input file to perform the operation on.
|
287
|
+
# @param [Hash] opts the optional parameters
|
288
|
+
# @return [Array<(ZipExtractResponse, Fixnum, Hash)>] ZipExtractResponse data, response status code and response headers
|
289
|
+
def zip_archive_zip_extract_with_http_info(input_file, opts = {})
|
290
|
+
if @api_client.config.debugging
|
291
|
+
@api_client.config.logger.debug 'Calling API: ZipArchiveApi.zip_archive_zip_extract ...'
|
292
|
+
end
|
293
|
+
# verify the required parameter 'input_file' is set
|
294
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
295
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling ZipArchiveApi.zip_archive_zip_extract"
|
296
|
+
end
|
297
|
+
# resource path
|
298
|
+
local_var_path = '/convert/archive/zip/extract'
|
299
|
+
|
300
|
+
# query parameters
|
301
|
+
query_params = {}
|
302
|
+
|
303
|
+
# header parameters
|
304
|
+
header_params = {}
|
305
|
+
# HTTP header 'Accept' (if needed)
|
306
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
307
|
+
# HTTP header 'Content-Type'
|
308
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
309
|
+
|
310
|
+
# form parameters
|
311
|
+
form_params = {}
|
312
|
+
form_params['inputFile'] = input_file
|
313
|
+
|
314
|
+
# http body (model)
|
315
|
+
post_body = nil
|
316
|
+
auth_names = ['Apikey']
|
317
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
318
|
+
:header_params => header_params,
|
319
|
+
:query_params => query_params,
|
320
|
+
:form_params => form_params,
|
321
|
+
:body => post_body,
|
322
|
+
:auth_names => auth_names,
|
323
|
+
:return_type => 'ZipExtractResponse')
|
324
|
+
if @api_client.config.debugging
|
325
|
+
@api_client.config.logger.debug "API called: ZipArchiveApi#zip_archive_zip_extract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
326
|
+
end
|
327
|
+
return data, status_code, headers
|
328
|
+
end
|
329
|
+
end
|
330
|
+
end
|
@@ -0,0 +1,391 @@
|
|
1
|
+
=begin
|
2
|
+
#convertapi
|
3
|
+
|
4
|
+
#Convert API lets you effortlessly convert file formats and types.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'json'
|
15
|
+
require 'logger'
|
16
|
+
require 'tempfile'
|
17
|
+
require 'typhoeus'
|
18
|
+
require 'uri'
|
19
|
+
|
20
|
+
module CloudmersiveConvertApiClient
|
21
|
+
class ApiClient
|
22
|
+
# The Configuration object holding settings to be used in the API client.
|
23
|
+
attr_accessor :config
|
24
|
+
|
25
|
+
# Defines the headers to be used in HTTP requests of all API calls by default.
|
26
|
+
#
|
27
|
+
# @return [Hash]
|
28
|
+
attr_accessor :default_headers
|
29
|
+
|
30
|
+
# Initializes the ApiClient
|
31
|
+
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
32
|
+
def initialize(config = Configuration.default)
|
33
|
+
@config = config
|
34
|
+
@user_agent = "Swagger-Codegen/#{VERSION}/ruby"
|
35
|
+
@default_headers = {
|
36
|
+
'Content-Type' => 'application/json',
|
37
|
+
'User-Agent' => @user_agent
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.default
|
42
|
+
@@default ||= ApiClient.new
|
43
|
+
end
|
44
|
+
|
45
|
+
# Call an API with given options.
|
46
|
+
#
|
47
|
+
# @return [Array<(Object, Fixnum, Hash)>] an array of 3 elements:
|
48
|
+
# the data deserialized from response body (could be nil), response status code and response headers.
|
49
|
+
def call_api(http_method, path, opts = {})
|
50
|
+
request = build_request(http_method, path, opts)
|
51
|
+
response = request.run
|
52
|
+
|
53
|
+
if @config.debugging
|
54
|
+
@config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
55
|
+
end
|
56
|
+
|
57
|
+
unless response.success?
|
58
|
+
if response.timed_out?
|
59
|
+
fail ApiError.new('Connection timed out')
|
60
|
+
elsif response.code == 0
|
61
|
+
# Errors from libcurl will be made visible here
|
62
|
+
fail ApiError.new(:code => 0,
|
63
|
+
:message => response.return_message)
|
64
|
+
else
|
65
|
+
fail ApiError.new(:code => response.code,
|
66
|
+
:response_headers => response.headers,
|
67
|
+
:response_body => response.body),
|
68
|
+
response.status_message
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
if opts[:return_type]
|
73
|
+
data = deserialize(response, opts[:return_type])
|
74
|
+
else
|
75
|
+
data = nil
|
76
|
+
end
|
77
|
+
return data, response.code, response.headers
|
78
|
+
end
|
79
|
+
|
80
|
+
# Builds the HTTP request
|
81
|
+
#
|
82
|
+
# @param [String] http_method HTTP method/verb (e.g. POST)
|
83
|
+
# @param [String] path URL path (e.g. /account/new)
|
84
|
+
# @option opts [Hash] :header_params Header parameters
|
85
|
+
# @option opts [Hash] :query_params Query parameters
|
86
|
+
# @option opts [Hash] :form_params Query parameters
|
87
|
+
# @option opts [Object] :body HTTP body (JSON/XML)
|
88
|
+
# @return [Typhoeus::Request] A Typhoeus Request
|
89
|
+
def build_request(http_method, path, opts = {})
|
90
|
+
url = build_request_url(path)
|
91
|
+
http_method = http_method.to_sym.downcase
|
92
|
+
|
93
|
+
header_params = @default_headers.merge(opts[:header_params] || {})
|
94
|
+
query_params = opts[:query_params] || {}
|
95
|
+
form_params = opts[:form_params] || {}
|
96
|
+
|
97
|
+
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
98
|
+
|
99
|
+
# set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
|
100
|
+
_verify_ssl_host = @config.verify_ssl_host ? 2 : 0
|
101
|
+
|
102
|
+
req_opts = {
|
103
|
+
:method => http_method,
|
104
|
+
:headers => header_params,
|
105
|
+
:params => query_params,
|
106
|
+
:params_encoding => @config.params_encoding,
|
107
|
+
:timeout => @config.timeout,
|
108
|
+
:ssl_verifypeer => @config.verify_ssl,
|
109
|
+
:ssl_verifyhost => _verify_ssl_host,
|
110
|
+
:sslcert => @config.cert_file,
|
111
|
+
:sslkey => @config.key_file,
|
112
|
+
:verbose => @config.debugging
|
113
|
+
}
|
114
|
+
|
115
|
+
req_opts.merge!(multipart: true) if header_params['Content-Type'].start_with? "multipart/"
|
116
|
+
|
117
|
+
# set custom cert, if provided
|
118
|
+
req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
|
119
|
+
|
120
|
+
if [:post, :patch, :put, :delete].include?(http_method)
|
121
|
+
req_body = build_request_body(header_params, form_params, opts[:body])
|
122
|
+
req_opts.update :body => req_body
|
123
|
+
if @config.debugging
|
124
|
+
@config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
request = Typhoeus::Request.new(url, req_opts)
|
129
|
+
download_file(request) if opts[:return_type] == 'File'
|
130
|
+
request
|
131
|
+
end
|
132
|
+
|
133
|
+
# Check if the given MIME is a JSON MIME.
|
134
|
+
# JSON MIME examples:
|
135
|
+
# application/json
|
136
|
+
# application/json; charset=UTF8
|
137
|
+
# APPLICATION/JSON
|
138
|
+
# */*
|
139
|
+
# @param [String] mime MIME
|
140
|
+
# @return [Boolean] True if the MIME is application/json
|
141
|
+
def json_mime?(mime)
|
142
|
+
(mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
|
143
|
+
end
|
144
|
+
|
145
|
+
# Deserialize the response to the given return type.
|
146
|
+
#
|
147
|
+
# @param [Response] response HTTP response
|
148
|
+
# @param [String] return_type some examples: "User", "Array[User]", "Hash[String,Integer]"
|
149
|
+
def deserialize(response, return_type)
|
150
|
+
body = response.body
|
151
|
+
|
152
|
+
# handle file downloading - return the File instance processed in request callbacks
|
153
|
+
# note that response body is empty when the file is written in chunks in request on_body callback
|
154
|
+
return @tempfile if return_type == 'File'
|
155
|
+
|
156
|
+
return nil if body.nil? || body.empty?
|
157
|
+
|
158
|
+
# return response body directly for String return type
|
159
|
+
return body if return_type == 'String'
|
160
|
+
|
161
|
+
# ensuring a default content type
|
162
|
+
content_type = response.headers['Content-Type'] || 'application/json'
|
163
|
+
|
164
|
+
fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type)
|
165
|
+
|
166
|
+
begin
|
167
|
+
data = JSON.parse("[#{body}]", :symbolize_names => true)[0]
|
168
|
+
rescue JSON::ParserError => e
|
169
|
+
if %w(String Date DateTime).include?(return_type)
|
170
|
+
data = body
|
171
|
+
else
|
172
|
+
raise e
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
convert_to_type data, return_type
|
177
|
+
end
|
178
|
+
|
179
|
+
# Convert data to the given return type.
|
180
|
+
# @param [Object] data Data to be converted
|
181
|
+
# @param [String] return_type Return type
|
182
|
+
# @return [Mixed] Data in a particular type
|
183
|
+
def convert_to_type(data, return_type)
|
184
|
+
return nil if data.nil?
|
185
|
+
case return_type
|
186
|
+
when 'String'
|
187
|
+
data.to_s
|
188
|
+
when 'Integer'
|
189
|
+
data.to_i
|
190
|
+
when 'Float'
|
191
|
+
data.to_f
|
192
|
+
when 'BOOLEAN'
|
193
|
+
data == true
|
194
|
+
when 'DateTime'
|
195
|
+
# parse date time (expecting ISO 8601 format)
|
196
|
+
DateTime.parse data
|
197
|
+
when 'Date'
|
198
|
+
# parse date time (expecting ISO 8601 format)
|
199
|
+
Date.parse data
|
200
|
+
when 'Object'
|
201
|
+
# generic object (usually a Hash), return directly
|
202
|
+
data
|
203
|
+
when /\AArray<(.+)>\z/
|
204
|
+
# e.g. Array<Pet>
|
205
|
+
sub_type = $1
|
206
|
+
data.map { |item| convert_to_type(item, sub_type) }
|
207
|
+
when /\AHash\<String, (.+)\>\z/
|
208
|
+
# e.g. Hash<String, Integer>
|
209
|
+
sub_type = $1
|
210
|
+
{}.tap do |hash|
|
211
|
+
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
|
212
|
+
end
|
213
|
+
else
|
214
|
+
# models, e.g. Pet
|
215
|
+
CloudmersiveConvertApiClient.const_get(return_type).new.tap do |model|
|
216
|
+
model.build_from_hash data
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
# Save response body into a file in (the defined) temporary folder, using the filename
|
222
|
+
# from the "Content-Disposition" header if provided, otherwise a random filename.
|
223
|
+
# The response body is written to the file in chunks in order to handle files which
|
224
|
+
# size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
|
225
|
+
# process can use.
|
226
|
+
#
|
227
|
+
# @see Configuration#temp_folder_path
|
228
|
+
def download_file(request)
|
229
|
+
tempfile = nil
|
230
|
+
encoding = nil
|
231
|
+
request.on_headers do |response|
|
232
|
+
content_disposition = response.headers['Content-Disposition']
|
233
|
+
if content_disposition && content_disposition =~ /filename=/i
|
234
|
+
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
235
|
+
prefix = sanitize_filename(filename)
|
236
|
+
else
|
237
|
+
prefix = 'download-'
|
238
|
+
end
|
239
|
+
prefix = prefix + '-' unless prefix.end_with?('-')
|
240
|
+
encoding = response.body.encoding
|
241
|
+
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
242
|
+
@tempfile = tempfile
|
243
|
+
end
|
244
|
+
request.on_body do |chunk|
|
245
|
+
chunk.force_encoding(encoding)
|
246
|
+
tempfile.write(chunk)
|
247
|
+
end
|
248
|
+
request.on_complete do |response|
|
249
|
+
tempfile.close
|
250
|
+
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
251
|
+
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
252
|
+
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
253
|
+
"explicitly with `tempfile.delete`"
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
# Sanitize filename by removing path.
|
258
|
+
# e.g. ../../sun.gif becomes sun.gif
|
259
|
+
#
|
260
|
+
# @param [String] filename the filename to be sanitized
|
261
|
+
# @return [String] the sanitized filename
|
262
|
+
def sanitize_filename(filename)
|
263
|
+
filename.gsub(/.*[\/\\]/, '')
|
264
|
+
end
|
265
|
+
|
266
|
+
def build_request_url(path)
|
267
|
+
# Add leading and trailing slashes to path
|
268
|
+
path = "/#{path}".gsub(/\/+/, '/')
|
269
|
+
URI.encode(@config.base_url + path)
|
270
|
+
end
|
271
|
+
|
272
|
+
# Builds the HTTP request body
|
273
|
+
#
|
274
|
+
# @param [Hash] header_params Header parameters
|
275
|
+
# @param [Hash] form_params Query parameters
|
276
|
+
# @param [Object] body HTTP body (JSON/XML)
|
277
|
+
# @return [String] HTTP body data in the form of string
|
278
|
+
def build_request_body(header_params, form_params, body)
|
279
|
+
# http form
|
280
|
+
if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
|
281
|
+
header_params['Content-Type'] == 'multipart/form-data'
|
282
|
+
data = {}
|
283
|
+
form_params.each do |key, value|
|
284
|
+
case value
|
285
|
+
when ::File, ::Array, nil
|
286
|
+
# let typhoeus handle File, Array and nil parameters
|
287
|
+
data[key] = value
|
288
|
+
else
|
289
|
+
data[key] = value.to_s
|
290
|
+
end
|
291
|
+
end
|
292
|
+
elsif body
|
293
|
+
data = body.is_a?(String) ? body : body.to_json
|
294
|
+
else
|
295
|
+
data = nil
|
296
|
+
end
|
297
|
+
data
|
298
|
+
end
|
299
|
+
|
300
|
+
# Update hearder and query params based on authentication settings.
|
301
|
+
#
|
302
|
+
# @param [Hash] header_params Header parameters
|
303
|
+
# @param [Hash] query_params Query parameters
|
304
|
+
# @param [String] auth_names Authentication scheme name
|
305
|
+
def update_params_for_auth!(header_params, query_params, auth_names)
|
306
|
+
Array(auth_names).each do |auth_name|
|
307
|
+
auth_setting = @config.auth_settings[auth_name]
|
308
|
+
next unless auth_setting
|
309
|
+
case auth_setting[:in]
|
310
|
+
when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
|
311
|
+
when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
|
312
|
+
else fail ArgumentError, 'Authentication token must be in `query` of `header`'
|
313
|
+
end
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
317
|
+
# Sets user agent in HTTP header
|
318
|
+
#
|
319
|
+
# @param [String] user_agent User agent (e.g. swagger-codegen/ruby/1.0.0)
|
320
|
+
def user_agent=(user_agent)
|
321
|
+
@user_agent = user_agent
|
322
|
+
@default_headers['User-Agent'] = @user_agent
|
323
|
+
end
|
324
|
+
|
325
|
+
# Return Accept header based on an array of accepts provided.
|
326
|
+
# @param [Array] accepts array for Accept
|
327
|
+
# @return [String] the Accept header (e.g. application/json)
|
328
|
+
def select_header_accept(accepts)
|
329
|
+
return nil if accepts.nil? || accepts.empty?
|
330
|
+
# use JSON when present, otherwise use all of the provided
|
331
|
+
json_accept = accepts.find { |s| json_mime?(s) }
|
332
|
+
json_accept || accepts.join(',')
|
333
|
+
end
|
334
|
+
|
335
|
+
# Return Content-Type header based on an array of content types provided.
|
336
|
+
# @param [Array] content_types array for Content-Type
|
337
|
+
# @return [String] the Content-Type header (e.g. application/json)
|
338
|
+
def select_header_content_type(content_types)
|
339
|
+
# use application/json by default
|
340
|
+
return 'application/json' if content_types.nil? || content_types.empty?
|
341
|
+
# use JSON when present, otherwise use the first one
|
342
|
+
json_content_type = content_types.find { |s| json_mime?(s) }
|
343
|
+
json_content_type || content_types.first
|
344
|
+
end
|
345
|
+
|
346
|
+
# Convert object (array, hash, object, etc) to JSON string.
|
347
|
+
# @param [Object] model object to be converted into JSON string
|
348
|
+
# @return [String] JSON string representation of the object
|
349
|
+
def object_to_http_body(model)
|
350
|
+
return model if model.nil? || model.is_a?(String)
|
351
|
+
local_body = nil
|
352
|
+
if model.is_a?(Array)
|
353
|
+
local_body = model.map { |m| object_to_hash(m) }
|
354
|
+
else
|
355
|
+
local_body = object_to_hash(model)
|
356
|
+
end
|
357
|
+
local_body.to_json
|
358
|
+
end
|
359
|
+
|
360
|
+
# Convert object(non-array) to hash.
|
361
|
+
# @param [Object] obj object to be converted into JSON string
|
362
|
+
# @return [String] JSON string representation of the object
|
363
|
+
def object_to_hash(obj)
|
364
|
+
if obj.respond_to?(:to_hash)
|
365
|
+
obj.to_hash
|
366
|
+
else
|
367
|
+
obj
|
368
|
+
end
|
369
|
+
end
|
370
|
+
|
371
|
+
# Build parameter value according to the given collection format.
|
372
|
+
# @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi
|
373
|
+
def build_collection_param(param, collection_format)
|
374
|
+
case collection_format
|
375
|
+
when :csv
|
376
|
+
param.join(',')
|
377
|
+
when :ssv
|
378
|
+
param.join(' ')
|
379
|
+
when :tsv
|
380
|
+
param.join("\t")
|
381
|
+
when :pipes
|
382
|
+
param.join('|')
|
383
|
+
when :multi
|
384
|
+
# return the array directly as typhoeus will handle it as expected
|
385
|
+
param
|
386
|
+
else
|
387
|
+
fail "unknown collection format: #{collection_format.inspect}"
|
388
|
+
end
|
389
|
+
end
|
390
|
+
end
|
391
|
+
end
|