Skip to content

Commit 17ace64

Browse files
committed
20220916 update: add convert apis.
1 parent 309676a commit 17ace64

File tree

10 files changed

+687
-46
lines changed

10 files changed

+687
-46
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
namespace Aspose.Cells.Cloud.SDK.Test
2+
{
3+
using NUnit.Framework;
4+
using Aspose.Cells.Cloud.SDK.Api;
5+
6+
/// <summary>
7+
/// Class for testing CellsWorkbookApi
8+
/// </summary>
9+
/// <remarks>
10+
/// This file is automatically generated by Swagger Codegen.
11+
/// Please update the test case below to test the API endpoint.
12+
/// </remarks>
13+
[TestFixture]
14+
public class Freeing2209Tests : CellsBaseTest
15+
{
16+
private CellsApi instance;
17+
private LightCellsApi lightInstance;
18+
/// <summary>
19+
/// Setup before each unit test
20+
/// </summary>
21+
[SetUp]
22+
public void Init()
23+
{
24+
instance = new CellsApi(clientId, clientSecret, apiVersion, testbaseurl);
25+
}
26+
27+
/// <summary>
28+
/// Clean up after each unit test
29+
/// </summary>
30+
[TearDown]
31+
public void Cleanup()
32+
{
33+
34+
}
35+
36+
37+
38+
[Test]
39+
public void CellsCELLSCLOUD_PostConvertPNG()
40+
{
41+
var fileInfo = instance.PostConvertWorkbookToPNG(GetTestDataStream(BOOK1));
42+
Assert.IsInstanceOf<Model.FileInfo>(fileInfo, "response is AccessTokenResponse");
43+
}
44+
[Test]
45+
public void CellsCELLSCLOUD_PostConvertPDF()
46+
{
47+
var fileInfo = instance.PostConvertWorkbookToPDF(GetTestDataStream(BOOK1));
48+
Assert.IsInstanceOf<Model.FileInfo>(fileInfo, "response is AccessTokenResponse");
49+
}
50+
[Test]
51+
public void CellsCELLSCLOUD_PostConvertDocx()
52+
{
53+
var fileInfo = instance.PostConvertWorkbookToDocx(GetTestDataStream(BOOK1));
54+
Assert.IsInstanceOf<Model.FileInfo>(fileInfo, "response is AccessTokenResponse");
55+
}
56+
}
57+
}

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

Lines changed: 593 additions & 0 deletions
Large diffs are not rendered by default.

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.8</AssemblyVersion>
15-
<FileVersion>22.8</FileVersion>
16-
<Version>22.8</Version>
14+
<AssemblyVersion>22.9</AssemblyVersion>
15+
<FileVersion>22.9</FileVersion>
16+
<Version>22.9</Version>
1717
</PropertyGroup>
1818

1919
<ItemGroup>

Aspose.Cells.Cloud.SDK/Client/ApiClient.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ private RestRequest PrepareRequest(
223223
// add form parameter, if any
224224
foreach(var param in formParams)
225225
request.AddParameter(param.Key, param.Value);
226-
//request.AlwaysMultipartFormData = true;
226+
227227
// add file parameter, if any
228-
foreach (var param in fileParams)
228+
foreach(var param in fileParams)
229229
{
230230
#if NETCOREAPP2_0
231231
request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType);
@@ -237,9 +237,10 @@ private RestRequest PrepareRequest(
237237
//request.AddParameter(param.Value.Name, stream.ToArray(), ParameterType.RequestBody);
238238
request.AddFile(param.Value.Name, stream.ToArray(), param.Value.Name, param.Value.ContentType);
239239
}
240+
240241
#endif
241242
}
242-
243+
243244
if (postBody != null) // http body (model or byte[]) parameter
244245
{
245246
if (postBody.GetType() == typeof(String))
@@ -340,11 +341,12 @@ public FileParameter ParameterToFile(string name, Stream stream)
340341
else
341342
return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided");
342343
}
344+
343345
public FileParameter ParameterToFile(string name, string value)
344346
{
345347
return FileParameter.Create(name,Encoding.UTF8.GetBytes(value), name);
346348
}
347-
349+
348350
/// <summary>
349351
/// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime.
350352
/// If parameter is a list, join the list with ",".

Aspose.Cells.Cloud.SDK/Client/Configuration.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public Configuration(ApiClient apiClient = null,
5959
string tempFolderPath = null,
6060
string dateTimeFormat = null,
6161
int timeout = 100000,
62-
string userAgent = "Swagger-Codegen/22.5/csharp"
62+
string userAgent = "Swagger-Codegen/22.9/csharp"
6363
)
6464
{
6565
setApiClientUsingDefault(apiClient);
@@ -94,7 +94,7 @@ public Configuration(ApiClient apiClient)
9494
/// Version of the package.
9595
/// </summary>
9696
/// <value>Version of the package.</value>
97-
public const string Version = "22.5";
97+
public const string Version = "22.9";
9898

9999
/// <summary>
100100
/// Gets or sets the default Configuration.
@@ -338,7 +338,7 @@ public static String ToDebugReport()
338338
.GetExecutingAssembly()
339339
.GetReferencedAssemblies()
340340
.Where(x => x.Name == "System.Core").First().Version.ToString() + "\n";
341-
report += " SDK Package Version: 22.5\n";
341+
report += " SDK Package Version: 22.9\n";
342342

343343
return report;
344344
}

Aspose.Cells.Cloud.SDK/Model/DocxSaveOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// --------------------------------------------------------------------------------------------------------------------
2-
// <copyright company="Aspose" file="DifSaveOptions.cs">
2+
// <copyright company="Aspose" file="DocxSaveOptions.cs">
33
// Copyright (c) 2022 Aspose.Cells for Cloud
44
// </copyright>
55
// <summary>

Aspose.Cells.Cloud.SDK/Model/JsonSaveOptions.cs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// --------------------------------------------------------------------------------------------------------------------
2-
// <copyright company="Aspose" file="ImageSaveOptions.cs">
2+
// <copyright company="Aspose" file="JsonSaveOptions.cs">
33
// Copyright (c) 2022 Aspose.Cells for Cloud
44
// </copyright>
55
// <summary>
@@ -40,31 +40,29 @@ namespace Aspose.Cells.Cloud.SDK.Model
4040
public class JsonSaveOptions : SaveOptions
4141
{
4242
/// <summary>
43-
/// Gets or sets ChartImageType
43+
/// Gets or sets ExportArea
4444
/// </summary>
45-
[DataMember(Name= "ExportArea", EmitDefaultValue=false)]
45+
[DataMember(Name="ExportArea", EmitDefaultValue=false)]
4646
public CellArea ExportArea { get; set; }
4747

4848
/// <summary>
49-
/// Gets or sets EmbededImageNameInSvg
49+
/// Gets or sets HasHeaderRow
5050
/// </summary>
51-
[DataMember(Name= "HasHeaderRow", EmitDefaultValue=false)]
51+
[DataMember(Name="HasHeaderRow", EmitDefaultValue=false)]
5252
public bool? HasHeaderRow { get; set; }
5353

5454
/// <summary>
55-
/// Gets or sets HorizontalResolution
55+
/// Gets or sets ExportAsString
5656
/// </summary>
57-
[DataMember(Name= "ExportAsString", EmitDefaultValue=false)]
57+
[DataMember(Name="ExportAsString", EmitDefaultValue=false)]
5858
public bool? ExportAsString { get; set; }
5959

6060
/// <summary>
61-
/// Gets or sets ImageFormat
61+
/// Gets or sets Indent
6262
/// </summary>
63-
[DataMember(Name= "Indent", EmitDefaultValue=false)]
63+
[DataMember(Name="Indent", EmitDefaultValue=false)]
6464
public string Indent { get; set; }
6565

66-
67-
6866
/// <summary>
6967
/// Get the string presentation of the object
7068
/// </summary>

Aspose.Cells.Cloud.SDK/Model/PptxSaveOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// --------------------------------------------------------------------------------------------------------------------
2-
// <copyright company="Aspose" file="DifSaveOptions.cs">
2+
// <copyright company="Aspose" file="PptxSaveOptions.cs">
33
// Copyright (c) 2022 Aspose.Cells for Cloud
44
// </copyright>
55
// <summary>

Aspose.Cells.Cloud.SDK/Model/SqlScriptSaveOptions.cs

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// --------------------------------------------------------------------------------------------------------------------
2-
// <copyright company="Aspose" file="ImageSaveOptions.cs">
2+
// <copyright company="Aspose" file="SqlScriptSaveOptions.cs">
33
// Copyright (c) 2022 Aspose.Cells for Cloud
44
// </copyright>
55
// <summary>
@@ -63,24 +63,12 @@ public class SqlScriptSaveOptions : SaveOptions
6363
[DataMember(Name="AddBlankLineBetweenRows", EmitDefaultValue=false)]
6464
public bool? AddBlankLineBetweenRows { get; set; }
6565

66-
/// <summary>
67-
/// Gets or sets Separator
68-
/// </summary>
69-
[DataMember(Name="Separator", EmitDefaultValue=false)]
70-
public char? Separator { get; set; }
71-
7266
/// <summary>
7367
/// Gets or sets OperatorType
7468
/// </summary>
7569
[DataMember(Name="OperatorType", EmitDefaultValue=false)]
7670
public string OperatorType { get; set; }
7771

78-
/// <summary>
79-
/// Gets or sets PrimaryKey
80-
/// </summary>
81-
[DataMember(Name="PrimaryKey", EmitDefaultValue=false)]
82-
public int? PrimaryKey { get; set; }
83-
8472
/// <summary>
8573
/// Gets or sets CreateTable
8674
/// </summary>
@@ -109,17 +97,20 @@ public class SqlScriptSaveOptions : SaveOptions
10997
/// Gets or sets ExportAsString
11098
/// </summary>
11199
[DataMember(Name="ExportAsString", EmitDefaultValue=false)]
112-
public int? ExportAsString { get; set; }
100+
public bool? ExportAsString { get; set; }
101+
113102
/// <summary>
114103
/// Gets or sets ExportArea
115-
/// </summary>
116-
[DataMember(Name = "ExportArea", EmitDefaultValue = false)]
104+
/// </summary>
105+
[DataMember(Name="ExportArea", EmitDefaultValue=false)]
117106
public CellArea ExportArea { get; set; }
107+
118108
/// <summary>
119109
/// Gets or sets HasHeaderRow
120-
/// </summary>
121-
[DataMember(Name = "HasHeaderRow", EmitDefaultValue = false)]
110+
/// </summary>
111+
[DataMember(Name="HasHeaderRow", EmitDefaultValue=false)]
122112
public bool? HasHeaderRow { get; set; }
113+
123114
/// <summary>
124115
/// Get the string presentation of the object
125116
/// </summary>
@@ -132,9 +123,7 @@ public override string ToString()
132123
sb.Append(" ColumnTypeMap: ").Append(this.ColumnTypeMap).Append("\n");
133124
sb.Append(" CheckAllDataForColumnType: ").Append(this.CheckAllDataForColumnType).Append("\n");
134125
sb.Append(" AddBlankLineBetweenRows: ").Append(this.AddBlankLineBetweenRows).Append("\n");
135-
sb.Append(" Separator: ").Append(this.Separator).Append("\n");
136126
sb.Append(" OperatorType: ").Append(this.OperatorType).Append("\n");
137-
sb.Append(" PrimaryKey: ").Append(this.PrimaryKey).Append("\n");
138127
sb.Append(" CreateTable: ").Append(this.CreateTable).Append("\n");
139128
sb.Append(" IdName: ").Append(this.IdName).Append("\n");
140129
sb.Append(" StartId: ").Append(this.StartId).Append("\n");

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Nuget](https://img.shields.io/nuget/v/Aspose.Cells-Cloud) ![Nuget](https://img.shields.io/nuget/dt/Aspose.Cells-Cloud) ![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-dotnet)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-dotnet/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-dotnet/22.8)
1+
![Nuget](https://img.shields.io/nuget/v/Aspose.Cells-Cloud) ![Nuget](https://img.shields.io/nuget/dt/Aspose.Cells-Cloud) ![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-dotnet)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-dotnet/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-dotnet/22.9)
22

33
# .NET SDK for Spreadsheet Processing in the Cloud
44

@@ -21,9 +21,11 @@ The Cloud SDK enhances your C#, ASP.NET, & other .NET-based cloud apps to [proce
2121
- [Leverage the power of Pivot Tables](https://docs.aspose.cloud/cells/working-with-pivot-tables/) & Ranges.
2222

2323

24-
## Feature & Enhancements in Version 22.8
24+
## Feature & Enhancements in Version 22.9
2525

26-
- Support transposing Excel Rows to Columns.
26+
- Add api for converting workbook to png.
27+
- Add api for converting workbook to pdf.
28+
- Add api for converting workbook to docx.
2729

2830
## Read & Write Spreadsheet Formats
2931

0 commit comments

Comments
 (0)