UNPKG

asposehtmlcloud

Version:
237 lines (176 loc) 6.37 kB
# Asposehtmlcloud.StorageApi All URIs are relative to *https://localhost:5000/v3.0* Method | HTTP request | Description ------------- | ------------- | ------------- [**getDiscUsage**](StorageApi.md#getDiscUsage) | **GET** /html/storage/disc | Get disc usage [**getFileVersions**](StorageApi.md#getFileVersions) | **GET** /html/storage/version/{path} | Get file versions [**objectExists**](StorageApi.md#objectExists) | **GET** /html/storage/exist/{path} | Check if file or folder exists [**storageExists**](StorageApi.md#storageExists) | **GET** /html/storage/{storageName}/exist | Check if storage exists <a name="getDiscUsage"></a> # **getDiscUsage** > DiscUsage getDiscUsage(opts) Get disc usage ### Example ```javascript var Asposehtmlcloud = require('asposehtmlcloud'); var conf = { "basePath":"https://api.aspose.cloud/v3.0", "authPath":"https://api.aspose.cloud/connect/token", "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "testResult":"/testresult/", "testData":"/testdata/", "remoteFolder":"HtmlTestDoc/", "defaultUserAgent":"Webkit" }; var apiInstance = new Asposehtmlcloud.StorageApi(conf); var opts = { 'storageName': "storageName_example" // String | Storage name }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.getDiscUsage(opts, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **storageName** | **String**| Storage name | [optional] ### Return type [**DiscUsage**](DiscUsage.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json <a name="getFileVersions"></a> # **getFileVersions** > FileVersions getFileVersions(path, opts) Get file versions ### Example ```javascript var Asposehtmlcloud = require('asposehtmlcloud'); var conf = { "basePath":"https://api.aspose.cloud/v3.0", "authPath":"https://api.aspose.cloud/connect/token", "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "testResult":"/testresult/", "testData":"/testdata/", "remoteFolder":"HtmlTestDoc/", "defaultUserAgent":"Webkit" }; var apiInstance = new Asposehtmlcloud.StorageApi(conf); var path = "path_example"; // String | File path e.g. '/file.ext' var opts = { 'storageName': "storageName_example" // String | Storage name }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.getFileVersions(path, opts, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **path** | **String**| File path e.g. &#39;/file.ext&#39; | **storageName** | **String**| Storage name | [optional] ### Return type [**FileVersions**](FileVersions.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json <a name="objectExists"></a> # **objectExists** > ObjectExist objectExists(path, opts) Check if file or folder exists ### Example ```javascript var Asposehtmlcloud = require('asposehtmlcloud'); var conf = { "basePath":"https://api.aspose.cloud/v3.0", "authPath":"https://api.aspose.cloud/connect/token", "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "testResult":"/testresult/", "testData":"/testdata/", "remoteFolder":"HtmlTestDoc/", "defaultUserAgent":"Webkit" }; <<<<<<< HEAD var apiInstance = new Asposehtmlcloud.StorageApi(conf); ======= >>>>>>> multipart var apiInstance = new Asposehtmlcloud.StorageApi(conf); var path = "path_example"; // String | File or folder path e.g. '/file.ext' or '/folder' var opts = { 'storageName': "storageName_example", // String | Storage name 'versionId': "versionId_example" // String | File version ID }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.objectExists(path, opts, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **path** | **String**| File or folder path e.g. &#39;/file.ext&#39; or &#39;/folder&#39; | **storageName** | **String**| Storage name | [optional] **versionId** | **String**| File version ID | [optional] ### Return type [**ObjectExist**](ObjectExist.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json <a name="storageExists"></a> # **storageExists** > StorageExist storageExists(storageName) Check if storage exists ### Example ```javascript var Asposehtmlcloud = require('asposehtmlcloud'); var conf = { "basePath":"https://api.aspose.cloud/v3.0", "authPath":"https://api.aspose.cloud/connect/token", "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "testResult":"/testresult/", "testData":"/testdata/", "remoteFolder":"HtmlTestDoc/", "defaultUserAgent":"Webkit" }; <<<<<<< HEAD var apiInstance = new Asposehtmlcloud.StorageApi(conf); ======= >>>>>>> multipart var apiInstance = new Asposehtmlcloud.StorageApi(conf); var storageName = "storageName_example"; // String | Storage name var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.storageExists(storageName, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **storageName** | **String**| Storage name | ### Return type [**StorageExist**](StorageExist.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json