Class: CloudmersiveConvertApiClient::ConvertDataApi
- Inherits:
-
Object
- Object
- CloudmersiveConvertApiClient::ConvertDataApi
- Defined in:
- lib/cloudmersive-convert-api-client/api/convert_data_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#convert_data_csv_to_json(input_file, opts = {}) ⇒ Object
Convert CSV to JSON conversion Convert a CSV file to a JSON object array.
-
#convert_data_csv_to_json_with_http_info(input_file, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Convert CSV to JSON conversion Convert a CSV file to a JSON object array.
-
#convert_data_json_to_xml(json_object, opts = {}) ⇒ String
Convert JSON to XML conversion Convert a JSON object into XML.
-
#convert_data_json_to_xml_with_http_info(json_object, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert JSON to XML conversion Convert a JSON object into XML.
-
#convert_data_xls_to_json(input_file, opts = {}) ⇒ Object
Convert Excel (97-2003) XLS to JSON conversion Convert an Excel (97-2003) XLS file to a JSON object array.
-
#convert_data_xls_to_json_with_http_info(input_file, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Convert Excel (97-2003) XLS to JSON conversion Convert an Excel (97-2003) XLS file to a JSON object array.
-
#convert_data_xlsx_to_json(input_file, opts = {}) ⇒ Object
Convert Excel XLSX to JSON conversion Convert an Excel XLSX file to a JSON object array.
-
#convert_data_xlsx_to_json_with_http_info(input_file, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Convert Excel XLSX to JSON conversion Convert an Excel XLSX file to a JSON object array.
-
#convert_data_xml_edit_add_attribute_with_x_path(input_file, x_path_expression, xml_attribute_name, xml_attribute_value, opts = {}) ⇒ XmlAddAttributeWithXPathResult
Adds an attribute to all XML nodes matching XPath expression Return the reuslts of editing an XML document by adding an attribute to all of the nodes that match an input XPath expression.
-
#convert_data_xml_edit_add_attribute_with_x_path_with_http_info(input_file, x_path_expression, xml_attribute_name, xml_attribute_value, opts = {}) ⇒ Array<(XmlAddAttributeWithXPathResult, Fixnum, Hash)>
Adds an attribute to all XML nodes matching XPath expression Return the reuslts of editing an XML document by adding an attribute to all of the nodes that match an input XPath expression.
-
#convert_data_xml_edit_add_child_with_x_path(input_file, x_path_expression, xml_node_to_add, opts = {}) ⇒ XmlAddChildWithXPathResult
Adds an XML node as a child to XML nodes matching XPath expression Return the reuslts of editing an XML document by adding an XML node as a child to all of the nodes that match an input XPath expression.
-
#convert_data_xml_edit_add_child_with_x_path_with_http_info(input_file, x_path_expression, xml_node_to_add, opts = {}) ⇒ Array<(XmlAddChildWithXPathResult, Fixnum, Hash)>
Adds an XML node as a child to XML nodes matching XPath expression Return the reuslts of editing an XML document by adding an XML node as a child to all of the nodes that match an input XPath expression.
-
#convert_data_xml_edit_remove_all_child_nodes_with_x_path(input_file, x_path_expression, opts = {}) ⇒ XmlRemoveAllChildrenWithXPathResult
Removes, deletes all children of nodes matching XPath expression, but does not remove the nodes Return the reuslts of editing an XML document by removing all child nodes of the nodes that match an input XPath expression.
-
#convert_data_xml_edit_remove_all_child_nodes_with_x_path_with_http_info(input_file, x_path_expression, opts = {}) ⇒ Array<(XmlRemoveAllChildrenWithXPathResult, Fixnum, Hash)>
Removes, deletes all children of nodes matching XPath expression, but does not remove the nodes Return the reuslts of editing an XML document by removing all child nodes of the nodes that match an input XPath expression.
-
#convert_data_xml_edit_replace_with_x_path(input_file, x_path_expression, xml_node_replacement, opts = {}) ⇒ XmlReplaceWithXPathResult
Replaces XML nodes matching XPath expression with new node Return the reuslts of editing an XML document by replacing all of the nodes that match an input XPath expression with a new XML node expression.
-
#convert_data_xml_edit_replace_with_x_path_with_http_info(input_file, x_path_expression, xml_node_replacement, opts = {}) ⇒ Array<(XmlReplaceWithXPathResult, Fixnum, Hash)>
Replaces XML nodes matching XPath expression with new node Return the reuslts of editing an XML document by replacing all of the nodes that match an input XPath expression with a new XML node expression.
-
#convert_data_xml_edit_set_value_with_x_path(input_file, x_path_expression, xml_value, opts = {}) ⇒ XmlSetValueWithXPathResult
Sets the value contents of XML nodes matching XPath expression Return the reuslts of editing an XML document by setting the contents of all of the nodes that match an input XPath expression.
-
#convert_data_xml_edit_set_value_with_x_path_with_http_info(input_file, x_path_expression, xml_value, opts = {}) ⇒ Array<(XmlSetValueWithXPathResult, Fixnum, Hash)>
Sets the value contents of XML nodes matching XPath expression Return the reuslts of editing an XML document by setting the contents of all of the nodes that match an input XPath expression.
-
#convert_data_xml_filter_with_x_path(x_path_expression, input_file, opts = {}) ⇒ XmlFilterWithXPathResult
Filter, select XML nodes using XPath expression, get results Return the reuslts of filtering, selecting an XML document with an XPath expression.
-
#convert_data_xml_filter_with_x_path_with_http_info(x_path_expression, input_file, opts = {}) ⇒ Array<(XmlFilterWithXPathResult, Fixnum, Hash)>
Filter, select XML nodes using XPath expression, get results Return the reuslts of filtering, selecting an XML document with an XPath expression.
-
#convert_data_xml_query_with_x_query(input_file, x_query, opts = {}) ⇒ XmlQueryWithXQueryResult
Query an XML file using XQuery query, get results Return the reuslts of querying a single XML document with an XQuery expression.
-
#convert_data_xml_query_with_x_query_multi(input_file1, x_query, opts = {}) ⇒ XmlQueryWithXQueryMultiResult
Query multiple XML files using XQuery query, get results Return the reuslts of querying an XML document with an XQuery expression.
-
#convert_data_xml_query_with_x_query_multi_with_http_info(input_file1, x_query, opts = {}) ⇒ Array<(XmlQueryWithXQueryMultiResult, Fixnum, Hash)>
Query multiple XML files using XQuery query, get results Return the reuslts of querying an XML document with an XQuery expression.
-
#convert_data_xml_query_with_x_query_with_http_info(input_file, x_query, opts = {}) ⇒ Array<(XmlQueryWithXQueryResult, Fixnum, Hash)>
Query an XML file using XQuery query, get results Return the reuslts of querying a single XML document with an XQuery expression.
-
#convert_data_xml_remove_with_x_path(x_path_expression, input_file, opts = {}) ⇒ XmlRemoveWithXPathResult
Remove, delete XML nodes and items matching XPath expression Return the reuslts of editing an XML document by removing all of the nodes that match an input XPath expression.
-
#convert_data_xml_remove_with_x_path_with_http_info(x_path_expression, input_file, opts = {}) ⇒ Array<(XmlRemoveWithXPathResult, Fixnum, Hash)>
Remove, delete XML nodes and items matching XPath expression Return the reuslts of editing an XML document by removing all of the nodes that match an input XPath expression.
-
#convert_data_xml_to_json(input_file, opts = {}) ⇒ Object
Convert XML to JSON conversion Convert an XML string or file into JSON.
-
#convert_data_xml_to_json_with_http_info(input_file, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Convert XML to JSON conversion Convert an XML string or file into JSON.
-
#convert_data_xml_transform_with_xslt_to_xml(input_file, transform_file, opts = {}) ⇒ String
Transform XML document file with XSLT into a new XML document Convert an XML string or file into JSON.
-
#convert_data_xml_transform_with_xslt_to_xml_with_http_info(input_file, transform_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Transform XML document file with XSLT into a new XML document Convert an XML string or file into JSON.
-
#initialize(api_client = ApiClient.default) ⇒ ConvertDataApi
constructor
A new instance of ConvertDataApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ConvertDataApi
Returns a new instance of ConvertDataApi.
19 20 21 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#convert_data_csv_to_json(input_file, opts = {}) ⇒ Object
Convert CSV to JSON conversion Convert a CSV file to a JSON object array
29 30 31 32 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 29 def convert_data_csv_to_json(input_file, opts = {}) data, _status_code, _headers = convert_data_csv_to_json_with_http_info(input_file, opts) return data end |
#convert_data_csv_to_json_with_http_info(input_file, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Convert CSV to JSON conversion Convert a CSV file to a JSON object array
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 40 def convert_data_csv_to_json_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_csv_to_json ..." end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_csv_to_json" end # resource path local_var_path = "/convert/csv/to/json" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'columnNamesFromFirstRow'] = opts[:'column_names_from_first_row'] if !opts[:'column_names_from_first_row'].nil? # form parameters form_params = {} form_params["inputFile"] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_csv_to_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_data_json_to_xml(json_object, opts = {}) ⇒ String
Convert JSON to XML conversion Convert a JSON object into XML
87 88 89 90 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 87 def convert_data_json_to_xml(json_object, opts = {}) data, _status_code, _headers = convert_data_json_to_xml_with_http_info(json_object, opts) return data end |
#convert_data_json_to_xml_with_http_info(json_object, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert JSON to XML conversion Convert a JSON object into XML
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 97 def convert_data_json_to_xml_with_http_info(json_object, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_json_to_xml ..." end # verify the required parameter 'json_object' is set if @api_client.config.client_side_validation && json_object.nil? fail ArgumentError, "Missing the required parameter 'json_object' when calling ConvertDataApi.convert_data_json_to_xml" end # resource path local_var_path = "/convert/json/to/xml" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(json_object) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_json_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_data_xls_to_json(input_file, opts = {}) ⇒ Object
Convert Excel (97-2003) XLS to JSON conversion Convert an Excel (97-2003) XLS file to a JSON object array
142 143 144 145 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 142 def convert_data_xls_to_json(input_file, opts = {}) data, _status_code, _headers = convert_data_xls_to_json_with_http_info(input_file, opts) return data end |
#convert_data_xls_to_json_with_http_info(input_file, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Convert Excel (97-2003) XLS to JSON conversion Convert an Excel (97-2003) XLS file to a JSON object array
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 152 def convert_data_xls_to_json_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xls_to_json ..." end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xls_to_json" end # resource path local_var_path = "/convert/xls/to/json" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params["inputFile"] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xls_to_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_data_xlsx_to_json(input_file, opts = {}) ⇒ Object
Convert Excel XLSX to JSON conversion Convert an Excel XLSX file to a JSON object array
198 199 200 201 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 198 def convert_data_xlsx_to_json(input_file, opts = {}) data, _status_code, _headers = convert_data_xlsx_to_json_with_http_info(input_file, opts) return data end |
#convert_data_xlsx_to_json_with_http_info(input_file, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Convert Excel XLSX to JSON conversion Convert an Excel XLSX file to a JSON object array
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 208 def convert_data_xlsx_to_json_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xlsx_to_json ..." end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xlsx_to_json" end # resource path local_var_path = "/convert/xlsx/to/json" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params["inputFile"] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xlsx_to_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_data_xml_edit_add_attribute_with_x_path(input_file, x_path_expression, xml_attribute_name, xml_attribute_value, opts = {}) ⇒ XmlAddAttributeWithXPathResult
Adds an attribute to all XML nodes matching XPath expression Return the reuslts of editing an XML document by adding an attribute to all of the nodes that match an input XPath expression.
257 258 259 260 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 257 def convert_data_xml_edit_add_attribute_with_x_path(input_file, x_path_expression, xml_attribute_name, xml_attribute_value, opts = {}) data, _status_code, _headers = convert_data_xml_edit_add_attribute_with_x_path_with_http_info(input_file, x_path_expression, xml_attribute_name, xml_attribute_value, opts) return data end |
#convert_data_xml_edit_add_attribute_with_x_path_with_http_info(input_file, x_path_expression, xml_attribute_name, xml_attribute_value, opts = {}) ⇒ Array<(XmlAddAttributeWithXPathResult, Fixnum, Hash)>
Adds an attribute to all XML nodes matching XPath expression Return the reuslts of editing an XML document by adding an attribute to all of the nodes that match an input XPath expression.
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 270 def convert_data_xml_edit_add_attribute_with_x_path_with_http_info(input_file, x_path_expression, xml_attribute_name, xml_attribute_value, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path ..." end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path" end # verify the required parameter 'x_path_expression' is set if @api_client.config.client_side_validation && x_path_expression.nil? fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path" end # verify the required parameter 'xml_attribute_name' is set if @api_client.config.client_side_validation && xml_attribute_name.nil? fail ArgumentError, "Missing the required parameter 'xml_attribute_name' when calling ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path" end # verify the required parameter 'xml_attribute_value' is set if @api_client.config.client_side_validation && xml_attribute_value.nil? fail ArgumentError, "Missing the required parameter 'xml_attribute_value' when calling ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path" end # resource path local_var_path = "/convert/xml/edit/xpath/add-attribute" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) header_params[:'XPathExpression'] = x_path_expression header_params[:'XmlAttributeName'] = xml_attribute_name header_params[:'XmlAttributeValue'] = xml_attribute_value # form parameters form_params = {} form_params["inputFile"] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'XmlAddAttributeWithXPathResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_edit_add_attribute_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_data_xml_edit_add_child_with_x_path(input_file, x_path_expression, xml_node_to_add, opts = {}) ⇒ XmlAddChildWithXPathResult
Adds an XML node as a child to XML nodes matching XPath expression Return the reuslts of editing an XML document by adding an XML node as a child to all of the nodes that match an input XPath expression.
331 332 333 334 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 331 def convert_data_xml_edit_add_child_with_x_path(input_file, x_path_expression, xml_node_to_add, opts = {}) data, _status_code, _headers = convert_data_xml_edit_add_child_with_x_path_with_http_info(input_file, x_path_expression, xml_node_to_add, opts) return data end |
#convert_data_xml_edit_add_child_with_x_path_with_http_info(input_file, x_path_expression, xml_node_to_add, opts = {}) ⇒ Array<(XmlAddChildWithXPathResult, Fixnum, Hash)>
Adds an XML node as a child to XML nodes matching XPath expression Return the reuslts of editing an XML document by adding an XML node as a child to all of the nodes that match an input XPath expression.
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 343 def convert_data_xml_edit_add_child_with_x_path_with_http_info(input_file, x_path_expression, xml_node_to_add, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_edit_add_child_with_x_path ..." end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_add_child_with_x_path" end # verify the required parameter 'x_path_expression' is set if @api_client.config.client_side_validation && x_path_expression.nil? fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_add_child_with_x_path" end # verify the required parameter 'xml_node_to_add' is set if @api_client.config.client_side_validation && xml_node_to_add.nil? fail ArgumentError, "Missing the required parameter 'xml_node_to_add' when calling ConvertDataApi.convert_data_xml_edit_add_child_with_x_path" end # resource path local_var_path = "/convert/xml/edit/xpath/add-child" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) header_params[:'XPathExpression'] = x_path_expression header_params[:'XmlNodeToAdd'] = xml_node_to_add # form parameters form_params = {} form_params["inputFile"] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'XmlAddChildWithXPathResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_edit_add_child_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_data_xml_edit_remove_all_child_nodes_with_x_path(input_file, x_path_expression, opts = {}) ⇒ XmlRemoveAllChildrenWithXPathResult
Removes, deletes all children of nodes matching XPath expression, but does not remove the nodes Return the reuslts of editing an XML document by removing all child nodes of the nodes that match an input XPath expression.
398 399 400 401 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 398 def convert_data_xml_edit_remove_all_child_nodes_with_x_path(input_file, x_path_expression, opts = {}) data, _status_code, _headers = convert_data_xml_edit_remove_all_child_nodes_with_x_path_with_http_info(input_file, x_path_expression, opts) return data end |
#convert_data_xml_edit_remove_all_child_nodes_with_x_path_with_http_info(input_file, x_path_expression, opts = {}) ⇒ Array<(XmlRemoveAllChildrenWithXPathResult, Fixnum, Hash)>
Removes, deletes all children of nodes matching XPath expression, but does not remove the nodes Return the reuslts of editing an XML document by removing all child nodes of the nodes that match an input XPath expression.
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 409 def convert_data_xml_edit_remove_all_child_nodes_with_x_path_with_http_info(input_file, x_path_expression, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_edit_remove_all_child_nodes_with_x_path ..." end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_remove_all_child_nodes_with_x_path" end # verify the required parameter 'x_path_expression' is set if @api_client.config.client_side_validation && x_path_expression.nil? fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_remove_all_child_nodes_with_x_path" end # resource path local_var_path = "/convert/xml/edit/xpath/remove-all-children" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) header_params[:'XPathExpression'] = x_path_expression # form parameters form_params = {} form_params["inputFile"] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'XmlRemoveAllChildrenWithXPathResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_edit_remove_all_child_nodes_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_data_xml_edit_replace_with_x_path(input_file, x_path_expression, xml_node_replacement, opts = {}) ⇒ XmlReplaceWithXPathResult
Replaces XML nodes matching XPath expression with new node Return the reuslts of editing an XML document by replacing all of the nodes that match an input XPath expression with a new XML node expression.
460 461 462 463 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 460 def convert_data_xml_edit_replace_with_x_path(input_file, x_path_expression, xml_node_replacement, opts = {}) data, _status_code, _headers = convert_data_xml_edit_replace_with_x_path_with_http_info(input_file, x_path_expression, xml_node_replacement, opts) return data end |
#convert_data_xml_edit_replace_with_x_path_with_http_info(input_file, x_path_expression, xml_node_replacement, opts = {}) ⇒ Array<(XmlReplaceWithXPathResult, Fixnum, Hash)>
Replaces XML nodes matching XPath expression with new node Return the reuslts of editing an XML document by replacing all of the nodes that match an input XPath expression with a new XML node expression.
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 472 def convert_data_xml_edit_replace_with_x_path_with_http_info(input_file, x_path_expression, xml_node_replacement, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_edit_replace_with_x_path ..." end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_replace_with_x_path" end # verify the required parameter 'x_path_expression' is set if @api_client.config.client_side_validation && x_path_expression.nil? fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_replace_with_x_path" end # verify the required parameter 'xml_node_replacement' is set if @api_client.config.client_side_validation && xml_node_replacement.nil? fail ArgumentError, "Missing the required parameter 'xml_node_replacement' when calling ConvertDataApi.convert_data_xml_edit_replace_with_x_path" end # resource path local_var_path = "/convert/xml/edit/xpath/replace" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) header_params[:'XPathExpression'] = x_path_expression header_params[:'XmlNodeReplacement'] = xml_node_replacement # form parameters form_params = {} form_params["inputFile"] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'XmlReplaceWithXPathResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_edit_replace_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_data_xml_edit_set_value_with_x_path(input_file, x_path_expression, xml_value, opts = {}) ⇒ XmlSetValueWithXPathResult
Sets the value contents of XML nodes matching XPath expression Return the reuslts of editing an XML document by setting the contents of all of the nodes that match an input XPath expression. Supports elements and attributes.
528 529 530 531 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 528 def convert_data_xml_edit_set_value_with_x_path(input_file, x_path_expression, xml_value, opts = {}) data, _status_code, _headers = convert_data_xml_edit_set_value_with_x_path_with_http_info(input_file, x_path_expression, xml_value, opts) return data end |
#convert_data_xml_edit_set_value_with_x_path_with_http_info(input_file, x_path_expression, xml_value, opts = {}) ⇒ Array<(XmlSetValueWithXPathResult, Fixnum, Hash)>
Sets the value contents of XML nodes matching XPath expression Return the reuslts of editing an XML document by setting the contents of all of the nodes that match an input XPath expression. Supports elements and attributes.
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 540 def convert_data_xml_edit_set_value_with_x_path_with_http_info(input_file, x_path_expression, xml_value, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_edit_set_value_with_x_path ..." end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_set_value_with_x_path" end # verify the required parameter 'x_path_expression' is set if @api_client.config.client_side_validation && x_path_expression.nil? fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_set_value_with_x_path" end # verify the required parameter 'xml_value' is set if @api_client.config.client_side_validation && xml_value.nil? fail ArgumentError, "Missing the required parameter 'xml_value' when calling ConvertDataApi.convert_data_xml_edit_set_value_with_x_path" end # resource path local_var_path = "/convert/xml/edit/xpath/set-value" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) header_params[:'XPathExpression'] = x_path_expression header_params[:'XmlValue'] = xml_value # form parameters form_params = {} form_params["inputFile"] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'XmlSetValueWithXPathResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_edit_set_value_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_data_xml_filter_with_x_path(x_path_expression, input_file, opts = {}) ⇒ XmlFilterWithXPathResult
Filter, select XML nodes using XPath expression, get results Return the reuslts of filtering, selecting an XML document with an XPath expression
595 596 597 598 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 595 def convert_data_xml_filter_with_x_path(x_path_expression, input_file, opts = {}) data, _status_code, _headers = convert_data_xml_filter_with_x_path_with_http_info(x_path_expression, input_file, opts) return data end |
#convert_data_xml_filter_with_x_path_with_http_info(x_path_expression, input_file, opts = {}) ⇒ Array<(XmlFilterWithXPathResult, Fixnum, Hash)>
Filter, select XML nodes using XPath expression, get results Return the reuslts of filtering, selecting an XML document with an XPath expression
606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 606 def convert_data_xml_filter_with_x_path_with_http_info(x_path_expression, input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_filter_with_x_path ..." end # verify the required parameter 'x_path_expression' is set if @api_client.config.client_side_validation && x_path_expression.nil? fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_filter_with_x_path" end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_filter_with_x_path" end # resource path local_var_path = "/convert/xml/select/xpath" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'XPathExpression'] = x_path_expression # form parameters form_params = {} form_params["inputFile"] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'XmlFilterWithXPathResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_filter_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_data_xml_query_with_x_query(input_file, x_query, opts = {}) ⇒ XmlQueryWithXQueryResult
Query an XML file using XQuery query, get results Return the reuslts of querying a single XML document with an XQuery expression. Supports XQuery 3.1 and earlier. This API is optimized for a single XML document as input. Provided XML document is automatically loaded as the default context; to access elements in the document, simply refer to them without a document reference, such as bookstore/book
658 659 660 661 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 658 def convert_data_xml_query_with_x_query(input_file, x_query, opts = {}) data, _status_code, _headers = convert_data_xml_query_with_x_query_with_http_info(input_file, x_query, opts) return data end |
#convert_data_xml_query_with_x_query_multi(input_file1, x_query, opts = {}) ⇒ XmlQueryWithXQueryMultiResult
Query multiple XML files using XQuery query, get results Return the reuslts of querying an XML document with an XQuery expression. Supports XQuery 3.1 and earlier. This API is optimized for multiple XML documents as input. You can refer to the contents of a given document by name, for example doc("books.xml") or doc("restaurants.xml") if you included two input files named books.xml and restaurants.xml. If input files contain no file name, they will default to file names input1.xml, input2.xml and so on.
728 729 730 731 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 728 def convert_data_xml_query_with_x_query_multi(input_file1, x_query, opts = {}) data, _status_code, _headers = convert_data_xml_query_with_x_query_multi_with_http_info(input_file1, x_query, opts) return data end |
#convert_data_xml_query_with_x_query_multi_with_http_info(input_file1, x_query, opts = {}) ⇒ Array<(XmlQueryWithXQueryMultiResult, Fixnum, Hash)>
Query multiple XML files using XQuery query, get results Return the reuslts of querying an XML document with an XQuery expression. Supports XQuery 3.1 and earlier. This API is optimized for multiple XML documents as input. You can refer to the contents of a given document by name, for example doc("books.xml") or doc("restaurants.xml") if you included two input files named books.xml and restaurants.xml. If input files contain no file name, they will default to file names input1.xml, input2.xml and so on.
748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 748 def convert_data_xml_query_with_x_query_multi_with_http_info(input_file1, x_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_query_with_x_query_multi ..." end # verify the required parameter 'input_file1' is set if @api_client.config.client_side_validation && input_file1.nil? fail ArgumentError, "Missing the required parameter 'input_file1' when calling ConvertDataApi.convert_data_xml_query_with_x_query_multi" end # verify the required parameter 'x_query' is set if @api_client.config.client_side_validation && x_query.nil? fail ArgumentError, "Missing the required parameter 'x_query' when calling ConvertDataApi.convert_data_xml_query_with_x_query_multi" end # resource path local_var_path = "/convert/xml/query/xquery/multi" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) header_params[:'XQuery'] = x_query # form parameters form_params = {} form_params["inputFile1"] = input_file1 form_params["inputFile2"] = opts[:'input_file2'] if !opts[:'input_file2'].nil? form_params["inputFile3"] = opts[:'input_file3'] if !opts[:'input_file3'].nil? form_params["inputFile4"] = opts[:'input_file4'] if !opts[:'input_file4'].nil? form_params["inputFile5"] = opts[:'input_file5'] if !opts[:'input_file5'].nil? form_params["inputFile6"] = opts[:'input_file6'] if !opts[:'input_file6'].nil? form_params["inputFile7"] = opts[:'input_file7'] if !opts[:'input_file7'].nil? form_params["inputFile8"] = opts[:'input_file8'] if !opts[:'input_file8'].nil? form_params["inputFile9"] = opts[:'input_file9'] if !opts[:'input_file9'].nil? form_params["inputFile10"] = opts[:'input_file10'] if !opts[:'input_file10'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'XmlQueryWithXQueryMultiResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_query_with_x_query_multi\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_data_xml_query_with_x_query_with_http_info(input_file, x_query, opts = {}) ⇒ Array<(XmlQueryWithXQueryResult, Fixnum, Hash)>
Query an XML file using XQuery query, get results Return the reuslts of querying a single XML document with an XQuery expression. Supports XQuery 3.1 and earlier. This API is optimized for a single XML document as input. Provided XML document is automatically loaded as the default context; to access elements in the document, simply refer to them without a document reference, such as bookstore/book
669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 669 def convert_data_xml_query_with_x_query_with_http_info(input_file, x_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_query_with_x_query ..." end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_query_with_x_query" end # verify the required parameter 'x_query' is set if @api_client.config.client_side_validation && x_query.nil? fail ArgumentError, "Missing the required parameter 'x_query' when calling ConvertDataApi.convert_data_xml_query_with_x_query" end # resource path local_var_path = "/convert/xml/query/xquery" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) header_params[:'XQuery'] = x_query # form parameters form_params = {} form_params["inputFile"] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'XmlQueryWithXQueryResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_query_with_x_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_data_xml_remove_with_x_path(x_path_expression, input_file, opts = {}) ⇒ XmlRemoveWithXPathResult
Remove, delete XML nodes and items matching XPath expression Return the reuslts of editing an XML document by removing all of the nodes that match an input XPath expression
807 808 809 810 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 807 def convert_data_xml_remove_with_x_path(x_path_expression, input_file, opts = {}) data, _status_code, _headers = convert_data_xml_remove_with_x_path_with_http_info(x_path_expression, input_file, opts) return data end |
#convert_data_xml_remove_with_x_path_with_http_info(x_path_expression, input_file, opts = {}) ⇒ Array<(XmlRemoveWithXPathResult, Fixnum, Hash)>
Remove, delete XML nodes and items matching XPath expression Return the reuslts of editing an XML document by removing all of the nodes that match an input XPath expression
818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 818 def convert_data_xml_remove_with_x_path_with_http_info(x_path_expression, input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_remove_with_x_path ..." end # verify the required parameter 'x_path_expression' is set if @api_client.config.client_side_validation && x_path_expression.nil? fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_remove_with_x_path" end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_remove_with_x_path" end # resource path local_var_path = "/convert/xml/edit/xpath/remove" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'XPathExpression'] = x_path_expression # form parameters form_params = {} form_params["inputFile"] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'XmlRemoveWithXPathResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_remove_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_data_xml_to_json(input_file, opts = {}) ⇒ Object
Convert XML to JSON conversion Convert an XML string or file into JSON
869 870 871 872 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 869 def convert_data_xml_to_json(input_file, opts = {}) data, _status_code, _headers = convert_data_xml_to_json_with_http_info(input_file, opts) return data end |
#convert_data_xml_to_json_with_http_info(input_file, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Convert XML to JSON conversion Convert an XML string or file into JSON
879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 879 def convert_data_xml_to_json_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_to_json ..." end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_to_json" end # resource path local_var_path = "/convert/xml/to/json" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params["inputFile"] = input_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_to_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_data_xml_transform_with_xslt_to_xml(input_file, transform_file, opts = {}) ⇒ String
Transform XML document file with XSLT into a new XML document Convert an XML string or file into JSON
926 927 928 929 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 926 def convert_data_xml_transform_with_xslt_to_xml(input_file, transform_file, opts = {}) data, _status_code, _headers = convert_data_xml_transform_with_xslt_to_xml_with_http_info(input_file, transform_file, opts) return data end |
#convert_data_xml_transform_with_xslt_to_xml_with_http_info(input_file, transform_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Transform XML document file with XSLT into a new XML document Convert an XML string or file into JSON
937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 937 def convert_data_xml_transform_with_xslt_to_xml_with_http_info(input_file, transform_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_transform_with_xslt_to_xml ..." end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_transform_with_xslt_to_xml" end # verify the required parameter 'transform_file' is set if @api_client.config.client_side_validation && transform_file.nil? fail ArgumentError, "Missing the required parameter 'transform_file' when calling ConvertDataApi.convert_data_xml_transform_with_xslt_to_xml" end # resource path local_var_path = "/convert/xml/transform/xslt/to/xml" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/xml']) # form parameters form_params = {} form_params["inputFile"] = input_file form_params["transformFile"] = transform_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_transform_with_xslt_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |