|
| 1 | +# Asposehtmlcloud.ImportApi |
| 2 | + |
| 3 | +All URIs are relative to *https://api.aspose.cloud/v3.0* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**GetConvertMarkdownToHtml**](ImportApi.md#GetConvertMarkdownToHtml) | **GET** /html/{name}/import/md | Converts the Markdown document (located on storage) to HTML and returns resulting file in response content. |
| 8 | +[**PostConvertMarkdownInRequestToHtml**](ImportApi.md#PostConvertMarkdownInRequestToHtml) | **POST** /html/import/md | Converts the Markdown document (in request content) to HTML and uploads resulting file to storage by specified path. |
| 9 | +[**PutConvertMarkdownToHtml**](ImportApi.md#PutConvertMarkdownToHtml) | **PUT** /html/{name}/import/md | Converts the Markdown document (located on storage) to HTML and uploads resulting file to storage by specified path. |
| 10 | + |
| 11 | +<a name="GetConvertMarkdownToHtml"></a> |
| 12 | +# **GetConvertMarkdownToHtml** |
| 13 | +> File GetConvertMarkdownToHtml(name, opts) |
| 14 | +
|
| 15 | +Converts the Markdown document (located on storage) to HTML and returns resulting file in response content. |
| 16 | + |
| 17 | +### Example |
| 18 | +```javascript |
| 19 | +var Asposehtmlcloud = require('asposehtmlcloud'); |
| 20 | + |
| 21 | +var conf = { |
| 22 | + "basePath":"https://api.aspose.cloud/v3.0", |
| 23 | + "authPath":"https://api.aspose.cloud/connect/token", |
| 24 | + "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", |
| 25 | + "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", |
| 26 | + "testResult":"/testresult/", |
| 27 | + "testData":"/testdata/", |
| 28 | + "remoteFolder":"HtmlTestDoc/", |
| 29 | + "defaultUserAgent":"Webkit" |
| 30 | +}; |
| 31 | + |
| 32 | +var apiInstance = new Asposehtmlcloud.ConversionApi(conf); |
| 33 | + |
| 34 | +var name = "name_example"; // String | Document name. |
| 35 | + |
| 36 | +var opts = { |
| 37 | + 'folder': "folder_example", // String | Source document folder. |
| 38 | + 'storage': "storage_example" // String | Source document storage. |
| 39 | +}; |
| 40 | + |
| 41 | +var callback = function(error, data, response) { |
| 42 | + if (error) { |
| 43 | + console.error(error); |
| 44 | + } else { |
| 45 | + console.log('API called successfully. Returned data: ' + data); |
| 46 | + } |
| 47 | +}; |
| 48 | +apiInstance.GetConvertMarkdownToHtml(name, opts, callback); |
| 49 | +``` |
| 50 | + |
| 51 | +### Parameters |
| 52 | + |
| 53 | +Name | Type | Description | Notes |
| 54 | +------------- | ------------- | ------------- | ------------- |
| 55 | + **name** | **String**| Document name. | |
| 56 | + **folder** | **String**| Source document folder. | [optional] |
| 57 | + **storage** | **String**| Source document storage. | [optional] |
| 58 | + |
| 59 | +### Return type |
| 60 | + |
| 61 | +**Blob** |
| 62 | + |
| 63 | +### HTTP request headers |
| 64 | + |
| 65 | + - **Content-Type**: application/json |
| 66 | + - **Accept**: multipart/form-data |
| 67 | + |
| 68 | + |
| 69 | +<a name="PostConvertMarkdownInRequestToHtml"></a> |
| 70 | +# **PostConvertMarkdownInRequestToHtml** |
| 71 | +> File PostConvertMarkdownInRequestToHtml(outPath, file, opts) |
| 72 | +
|
| 73 | +Converts the Markdown document (in request content) to HTML and uploads resulting file to storage by specified path. |
| 74 | + |
| 75 | +### Example |
| 76 | +```javascript |
| 77 | +var Asposehtmlcloud = require('asposehtmlcloud'); |
| 78 | +var path = require('path'); |
| 79 | + |
| 80 | +var conf = { |
| 81 | + "basePath":"https://api.aspose.cloud/v3.0", |
| 82 | + "authPath":"https://api.aspose.cloud/connect/token", |
| 83 | + "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", |
| 84 | + "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", |
| 85 | + "testResult":"/testresult/", |
| 86 | + "testData":"/testdata/", |
| 87 | + "remoteFolder":"HtmlTestDoc/", |
| 88 | + "defaultUserAgent":"Webkit" |
| 89 | +}; |
| 90 | + |
| 91 | +var apiInstance = new Asposehtmlcloud.ConversionApi(conf); |
| 92 | + |
| 93 | +var outPath = "outPath_example"; // String | Full resulting filename in the storage (ex. /folder1/folder2/result.html) |
| 94 | + |
| 95 | +var file = fs.createReadStream(path.normalize(/path/to/file.md)); // File | A file to be converted. |
| 96 | + |
| 97 | +var opts = { |
| 98 | + 'folder': "folder_example", // String | Source document folder. |
| 99 | + 'storage': "storage_example" // String | Source document storage. |
| 100 | +}; |
| 101 | + |
| 102 | +var callback = function(error, data, response) { |
| 103 | + if (error) { |
| 104 | + console.error(error); |
| 105 | + } else { |
| 106 | + console.log('API called successfully. Returned data: ' + data); |
| 107 | + } |
| 108 | +}; |
| 109 | +apiInstance.PostConvertMarkdownInRequestToHtml(outPath, file, opts, callback); |
| 110 | +``` |
| 111 | + |
| 112 | +### Parameters |
| 113 | + |
| 114 | +Name | Type | Description | Notes |
| 115 | +------------- | ------------- | ------------- | ------------- |
| 116 | + **outPath** | **String**| Full resulting file path in the storage (ex. /folder1/folder2/result.md) | |
| 117 | + **file** | **File**| A file to be converted. | |
| 118 | + **folder** | **String**| Source document folder. | [optional] |
| 119 | + **storage** | **String**| Source document storage. | [optional] |
| 120 | + |
| 121 | +### Return type |
| 122 | + |
| 123 | +**Empty** |
| 124 | + |
| 125 | +### HTTP request headers |
| 126 | + |
| 127 | + - **Content-Type**: multipart/form-data |
| 128 | + - **Accept**: application/json |
| 129 | + |
| 130 | +<a name="PutConvertMarkdownToHtml"></a> |
| 131 | +# **PutConvertMarkdownToHtml** |
| 132 | +> File PutConvertMarkdownToHtml(name, outPath, opts) |
| 133 | +
|
| 134 | +Converts the Markdown document (located on storage) to HTML and uploads resulting file to storage by specified path. |
| 135 | + |
| 136 | +### Example |
| 137 | +```javascript |
| 138 | +var Asposehtmlcloud = require('asposehtmlcloud'); |
| 139 | + |
| 140 | +var conf = { |
| 141 | + "basePath":"https://api.aspose.cloud/v3.0", |
| 142 | + "authPath":"https://api.aspose.cloud/connect/token", |
| 143 | + "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", |
| 144 | + "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", |
| 145 | + "testResult":"/testresult/", |
| 146 | + "testData":"/testdata/", |
| 147 | + "remoteFolder":"HtmlTestDoc/", |
| 148 | + "defaultUserAgent":"Webkit" |
| 149 | +}; |
| 150 | + |
| 151 | +var apiInstance = new Asposehtmlcloud.ConversionApi(conf); |
| 152 | + |
| 153 | +var name = "name_example"; // String | Document name. |
| 154 | + |
| 155 | +var outPath = "outPath_example"; // String | Full resulting file path in the storage (ex. /folder1/folder2/result.html) |
| 156 | + |
| 157 | +var opts = { |
| 158 | + 'folder': "folder_example", // String | The source document folder. |
| 159 | + 'storage': "storage_example" // String | The source and resulting document storage. |
| 160 | +}; |
| 161 | + |
| 162 | +var callback = function(error, data, response) { |
| 163 | + if (error) { |
| 164 | + console.error(error); |
| 165 | + } else { |
| 166 | + console.log('API called successfully. Returned data: ' + data); |
| 167 | + } |
| 168 | +}; |
| 169 | +apiInstance.PutConvertMarkdownToHtml(name, outPath, opts, callback); |
| 170 | +``` |
| 171 | + |
| 172 | +### Parameters |
| 173 | + |
| 174 | +Name | Type | Description | Notes |
| 175 | +------------- | ------------- | ------------- | ------------- |
| 176 | + **name** | **String**| Document name. | |
| 177 | + **outPath** | **String**| Full resulting file path in the storage (ex. /folder1/folder2/result.md) | |
| 178 | + **folder** | **String**| The source document folder. | [optional] |
| 179 | + **storage** | **String**| The source and resulting document storage. | [optional] |
| 180 | + |
| 181 | +### Return type |
| 182 | + |
| 183 | +**Empty** |
| 184 | + |
| 185 | +### HTTP request headers |
| 186 | + |
| 187 | + - **Content-Type**: application/json |
| 188 | + - **Accept**: application/json |
0 commit comments