Skip to content

Commit fd3c048

Browse files
committed
20220621 update : add and update api.
1 parent f6f7c65 commit fd3c048

File tree

4 files changed

+97
-15
lines changed

4 files changed

+97
-15
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
namespace Aspose.Cells.Cloud.SDK.Test
2+
{
3+
using System.IO;
4+
using System.Collections.Generic;
5+
using NUnit.Framework;
6+
using Aspose.Cells.Cloud.SDK.Api;
7+
using Aspose.Cells.Cloud.SDK.Model;
8+
/// <summary>
9+
/// Class for testing CellsWorkbookApi
10+
/// </summary>
11+
/// <remarks>
12+
/// This file is automatically generated by Swagger Codegen.
13+
/// Please update the test case below to test the API endpoint.
14+
/// </remarks>
15+
[TestFixture]
16+
public class Freeing2206Tests : CellsBaseTest
17+
{
18+
private CellsApi instance;
19+
private LightCellsApi lightInstance;
20+
/// <summary>
21+
/// Setup before each unit test
22+
/// </summary>
23+
[SetUp]
24+
public void Init()
25+
{
26+
instance = new CellsApi(clientId, clientSecret, apiVersion, testbaseurl);
27+
lightInstance = new LightCellsApi(clientId, clientSecret, apiVersion, testbaseurl);
28+
}
29+
30+
/// <summary>
31+
/// Clean up after each unit test
32+
/// </summary>
33+
[TearDown]
34+
public void Cleanup()
35+
{
36+
37+
}
38+
[Test]
39+
public void CellsCELLSCLOUD_Saveas_Test()
40+
{
41+
UpdateDataFile(instance, TEMPFOLDER, BOOK1);
42+
var response = instance.CellsSaveAsPostDocumentSaveAs(BOOK1, null, "book1.pdf", null, null, TEMPFOLDER, null, null, new Dictionary<string, string> { { "OnePagePerSheet", "false" } },false);
43+
Assert.IsInstanceOf<SaveResponse>(response, "response is System.IO.Stream");
44+
}
45+
46+
[Test]
47+
public void CellsCELLSCLOUD_Clear_Test()
48+
{
49+
if (IsDockerTest)
50+
{
51+
Assert.IsTrue(true);
52+
return;
53+
}
54+
IDictionary<string, Stream> files = new Dictionary<string, Stream>();
55+
files.Add(BOOK1, GetTestDataStream(BOOK1));
56+
files.Add(AssemblyTest, GetTestDataStream(AssemblyTest));
57+
var filesResult = lightInstance.PostClearObjects(files, "comment","Shee1");
58+
Assert.IsInstanceOf<FilesResult>(filesResult, "response is AccessTokenResponse");
59+
}
60+
[Test]
61+
public void CellsCELLSCLOUD_Clear_PDF_Test()
62+
{
63+
if (IsDockerTest)
64+
{
65+
Assert.IsTrue(true);
66+
return;
67+
}
68+
IDictionary<string, Stream> files = new Dictionary<string, Stream>();
69+
files.Add(BOOK1, GetTestDataStream(BOOK1));
70+
files.Add(AssemblyTest, GetTestDataStream(AssemblyTest));
71+
var filesResult = lightInstance.PostClearObjects(files, "comment", "Shee1","PDF");
72+
Assert.IsInstanceOf<FilesResult>(filesResult, "response is AccessTokenResponse");
73+
}
74+
75+
}
76+
}

Aspose.Cells.Cloud.SDK/Api/CellsApi.cs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5291,7 +5291,7 @@ public interface ICellsApi : IApiAccessor
52915291
/// <param name="storageName">storage name. (optional)</param>
52925292
/// <param name="outStorageName">output storage name. (optional)</param>
52935293
/// <returns>SaveResponse</returns>
5294-
SaveResponse CellsSaveAsPostDocumentSaveAs(string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null);
5294+
SaveResponse CellsSaveAsPostDocumentSaveAs(string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null, bool checkExcelRestriction = true);
52955295

52965296
/// <summary>
52975297
/// Convert document and save result to storage.
@@ -5309,7 +5309,7 @@ public interface ICellsApi : IApiAccessor
53095309
/// <param name="storageName">storage name. (optional)</param>
53105310
/// <param name="outStorageName">output storage name. (optional)</param>
53115311
/// <returns>ApiResponse of SaveResponse</returns>
5312-
ApiResponse<SaveResponse> CellsSaveAsPostDocumentSaveAsWithHttpInfo(string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null);
5312+
ApiResponse<SaveResponse> CellsSaveAsPostDocumentSaveAsWithHttpInfo(string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null, bool checkExcelRestriction = true);
53135313
/// <summary>
53145314
/// Delete a shape in worksheet
53155315
/// </summary>
@@ -13522,7 +13522,7 @@ public interface ICellsApi : IApiAccessor
1352213522
/// <param name="storageName">storage name.(optional)</param>
1352313523
/// <param name="outStorageName">output storage name.(optional)</param>
1352413524
/// <returns>Task of SaveResponse</returns>
13525-
System.Threading.Tasks.Task<SaveResponse> CellsSaveAsPostDocumentSaveAsAsync (string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null);
13525+
System.Threading.Tasks.Task<SaveResponse> CellsSaveAsPostDocumentSaveAsAsync (string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null, bool checkExcelRestriction = true);
1352613526

1352713527
/// <summary>
1352813528
/// Convert document and save result to storage.
@@ -13540,7 +13540,7 @@ public interface ICellsApi : IApiAccessor
1354013540
/// <param name="storageName">storage name.(optional)</param>
1354113541
/// <param name="outStorageName">output storage name.(optional)</param>
1354213542
/// <returns>Task of ApiResponse (SaveResponse)</returns>
13543-
System.Threading.Tasks.Task<ApiResponse<SaveResponse>> CellsSaveAsPostDocumentSaveAsAsyncWithHttpInfo (string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null);
13543+
System.Threading.Tasks.Task<ApiResponse<SaveResponse>> CellsSaveAsPostDocumentSaveAsAsyncWithHttpInfo (string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null, bool checkExcelRestriction = true);
1354413544
/// <summary>
1354513545
/// Delete a shape in worksheet
1354613546
/// </summary>
@@ -47366,10 +47366,10 @@ public async System.Threading.Tasks.Task<ApiResponse<CellsCloudResponse>> CellsR
4736647366
/// <param name="storageName">storage name. (optional)</param>
4736747367
/// <param name="outStorageName">output storage name. (optional)</param>
4736847368
/// <returns>SaveResponse</returns>
47369-
public SaveResponse CellsSaveAsPostDocumentSaveAs(string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null)
47369+
public SaveResponse CellsSaveAsPostDocumentSaveAs(string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null, bool checkExcelRestriction = true)
4737047370
{
4737147371
checkAccessToken();
47372-
ApiResponse<SaveResponse> localVarResponse = CellsSaveAsPostDocumentSaveAsWithHttpInfo(name, saveOptions, newfilename, isAutoFitRows, isAutoFitColumns, folder, storageName, outStorageName,extendedQueryParameters);
47372+
ApiResponse<SaveResponse> localVarResponse = CellsSaveAsPostDocumentSaveAsWithHttpInfo(name, saveOptions, newfilename, isAutoFitRows, isAutoFitColumns, folder, storageName, outStorageName,extendedQueryParameters,checkExcelRestriction);
4737347373
return localVarResponse.Data;
4737447374
}
4737547375

@@ -47386,7 +47386,7 @@ public SaveResponse CellsSaveAsPostDocumentSaveAs(string name, SaveOptions saveO
4738647386
/// <param name="storageName">storage name. (optional)</param>
4738747387
/// <param name="outStorageName">output storage name. (optional)</param>
4738847388
/// <returns>ApiResponse of SaveResponse</returns>
47389-
public ApiResponse< SaveResponse > CellsSaveAsPostDocumentSaveAsWithHttpInfo(string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null)
47389+
public ApiResponse< SaveResponse > CellsSaveAsPostDocumentSaveAsWithHttpInfo(string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null, bool checkExcelRestriction = true)
4739047390
{
4739147391
// verify the required parameter 'name' is set
4739247392
if (name == null)
@@ -47421,6 +47421,8 @@ public ApiResponse< SaveResponse > CellsSaveAsPostDocumentSaveAsWithHttpInfo(str
4742147421
if (folder != null) localVarQueryParams.Add("folder", Configuration.ApiClient.ParameterToString(folder)); // query parameter
4742247422
if (storageName != null) localVarQueryParams.Add("storageName", Configuration.ApiClient.ParameterToString(storageName)); // query parameter
4742347423
if (outStorageName != null) localVarQueryParams.Add("outStorageName", Configuration.ApiClient.ParameterToString(outStorageName)); // query parameter
47424+
if (!checkExcelRestriction) localVarQueryParams.Add("checkExcelRestriction", Configuration.ApiClient.ParameterToString(checkExcelRestriction)); // query parameter
47425+
4742447426
if (extendedQueryParameters != null)
4742547427
{
4742647428
foreach (KeyValuePair<string, string> keyValuePair in extendedQueryParameters)
@@ -47469,9 +47471,9 @@ public ApiResponse< SaveResponse > CellsSaveAsPostDocumentSaveAsWithHttpInfo(str
4746947471
/// <param name="storageName">storage name. (optional)</param>
4747047472
/// <param name="outStorageName">output storage name. (optional)</param>
4747147473
/// <returns>Task of SaveResponse</returns>
47472-
public async System.Threading.Tasks.Task<SaveResponse> CellsSaveAsPostDocumentSaveAsAsync (string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null)
47474+
public async System.Threading.Tasks.Task<SaveResponse> CellsSaveAsPostDocumentSaveAsAsync (string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null, bool checkExcelRestriction = true)
4747347475
{
47474-
ApiResponse<SaveResponse> localVarResponse = await CellsSaveAsPostDocumentSaveAsAsyncWithHttpInfo(name, saveOptions, newfilename, isAutoFitRows, isAutoFitColumns, folder, storageName, outStorageName,extendedQueryParameters);
47476+
ApiResponse<SaveResponse> localVarResponse = await CellsSaveAsPostDocumentSaveAsAsyncWithHttpInfo(name, saveOptions, newfilename, isAutoFitRows, isAutoFitColumns, folder, storageName, outStorageName,extendedQueryParameters ,checkExcelRestriction);
4747547477
return localVarResponse.Data;
4747647478

4747747479
}
@@ -47489,7 +47491,7 @@ public async System.Threading.Tasks.Task<SaveResponse> CellsSaveAsPostDocumentSa
4748947491
/// <param name="storageName">storage name. (optional)</param>
4749047492
/// <param name="outStorageName">output storage name. (optional)</param>
4749147493
/// <returns>Task of ApiResponse (SaveResponse)</returns>
47492-
public async System.Threading.Tasks.Task<ApiResponse<SaveResponse>> CellsSaveAsPostDocumentSaveAsAsyncWithHttpInfo (string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null)
47494+
public async System.Threading.Tasks.Task<ApiResponse<SaveResponse>> CellsSaveAsPostDocumentSaveAsAsyncWithHttpInfo (string name, SaveOptions saveOptions = null, string newfilename = null, bool? isAutoFitRows = null, bool? isAutoFitColumns = null, string folder = null, string storageName = null, string outStorageName = null, IDictionary<string, string> extendedQueryParameters = null, bool checkExcelRestriction = true)
4749347495
{
4749447496
// verify the required parameter 'name' is set
4749547497
if (name == null)
@@ -47524,6 +47526,7 @@ public async System.Threading.Tasks.Task<ApiResponse<SaveResponse>> CellsSaveAsP
4752447526
if (folder != null) localVarQueryParams.Add("folder", Configuration.ApiClient.ParameterToString(folder)); // query parameter
4752547527
if (storageName != null) localVarQueryParams.Add("storageName", Configuration.ApiClient.ParameterToString(storageName)); // query parameter
4752647528
if (outStorageName != null) localVarQueryParams.Add("outStorageName", Configuration.ApiClient.ParameterToString(outStorageName)); // query parameter
47529+
if (!checkExcelRestriction) localVarQueryParams.Add("checkExcelRestriction", Configuration.ApiClient.ParameterToString(checkExcelRestriction)); // query parameter
4752747530
if (extendedQueryParameters != null)
4752847531
{
4752947532
foreach (KeyValuePair<string, string> keyValuePair in extendedQueryParameters)

Aspose.Cells.Cloud.SDK/Api/LightCellsApi.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public interface ILightCellsApi
8585
/// <param name="objecttype"></param>
8686
/// <param name="file">File to upload</param>
8787
/// <returns>FilesResult</returns>
88-
FilesResult PostClearObjects(IDictionary<string, System.IO.Stream> files, string objecttype);
88+
FilesResult PostClearObjects(IDictionary<string, System.IO.Stream> files, string objecttype, string sheetname = null, string outFormat = null);
8989

9090
/// <summary>
9191
///
@@ -575,7 +575,7 @@ public FilesResult PostAssemble( IDictionary<string, System.IO.Stream> files, st
575575
/// <param name="objecttype"></param>
576576
/// <param name="file">File to upload</param>
577577
/// <returns>FilesResult</returns>
578-
public FilesResult PostClearObjects( IDictionary<string, System.IO.Stream> files, string objecttype)
578+
public FilesResult PostClearObjects( IDictionary<string, System.IO.Stream> files, string objecttype, string sheetname = null, string outFormat = null)
579579
{
580580
checkAccessToken();
581581
// verify the required parameter 'objecttype' is set
@@ -608,6 +608,9 @@ public FilesResult PostClearObjects( IDictionary<string, System.IO.Stream> files
608608
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
609609

610610
if (objecttype != null) localVarQueryParams.Add("objecttype", Configuration.ApiClient.ParameterToString(objecttype)); // query parameter
611+
if (sheetname != null) localVarQueryParams.Add("sheetname", Configuration.ApiClient.ParameterToString(sheetname)); // query parameter
612+
if (outFormat != null) localVarQueryParams.Add("outFormat", Configuration.ApiClient.ParameterToString(outFormat)); // query parameter
613+
611614
foreach (KeyValuePair<string, System.IO.Stream> file in files)
612615
{
613616
localVarFileParams.Add(file.Key, Configuration.ApiClient.ParameterToFile(file.Key, file.Value));

Aspose.Cells.Cloud.SDK/Aspose.Cells.Cloud.SDK.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<Description>This SDK allows you to work with Aspose.Cells Cloud REST APIs in your .NET applications quickly and easily, with zero initial cost.</Description>
1212
<Copyright>MIT</Copyright>
1313
<StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings>
14-
<AssemblyVersion>22.5</AssemblyVersion>
15-
<FileVersion>22.5</FileVersion>
16-
<Version>22.5</Version>
14+
<AssemblyVersion>22.6</AssemblyVersion>
15+
<FileVersion>22.6</FileVersion>
16+
<Version>22.6</Version>
1717
</PropertyGroup>
1818

1919
<ItemGroup>

0 commit comments

Comments
 (0)