Skip to content

Commit 75ff402

Browse files
committed
Aspose.Cells.Cloud SDK 19.6
1 parent 1651561 commit 75ff402

File tree

10 files changed

+212
-13
lines changed

10 files changed

+212
-13
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Add this dependency to your project's POM:
2828
<dependency>
2929
<groupId>com.aspose</groupId>
3030
<artifactId>aspose-cells-cloud</artifactId>
31-
<version>19.2.1</version>
31+
<version>19.6</version>
3232
<scope>compile</scope>
3333
</dependency>
3434
```
@@ -38,7 +38,7 @@ Add this dependency to your project's POM:
3838
Add this dependency to your project's build file:
3939

4040
```groovy
41-
compile "com.aspose:aspose-cells-cloud:19.2.1"
41+
compile "com.aspose:aspose-cells-cloud:19.6"
4242
```
4343

4444
### Others
@@ -49,12 +49,12 @@ At first generate the JAR by executing:
4949

5050
Then manually install the following JARs:
5151

52-
* target/aspose-cells-cloud-19.2.1.jar
52+
* target/aspose-cells-cloud-19.6.jar
5353
* target/lib/*.jar
5454

5555
## Getting Started
5656

57-
Please follow the [installation](#installation) instruction and execute the following Java code:
57+
Please follow the instruction and execute the following Java code:
5858

5959
```java
6060

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'idea'
22
apply plugin: 'eclipse'
33

44
group = 'com.aspose'
5-
version = '19.2'
5+
version = '19.6'
66

77
buildscript {
88
repositories {

docs/MarkdownSaveOptions.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
# MarkdownSaveOptions
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**encoding** | **String** | | [optional]
8+
**formatStrategy** | **String** | | [optional]
9+
**lineSeparator** | **String** | | [optional]
10+
11+
12+

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>aspose-cells-cloud</artifactId>
66
<packaging>jar</packaging>
77
<name>aspose-cells-cloud</name>
8-
<version>19.2.1</version>
8+
<version>19.6</version>
99
<url>https://github.com/swagger-api/swagger-codegen</url>
1010
<description>Swagger Java</description>
1111
<scm>
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
/*
2+
* Web API Swagger specification
3+
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4+
*
5+
* OpenAPI spec version: 1.0
6+
*
7+
*
8+
* NOTE: This class is auto generated by the swagger code generator program.
9+
* https://github.com/swagger-api/swagger-codegen.git
10+
* Do not edit the class manually.
11+
*/
12+
13+
14+
package com.aspose.cloud.cells.model;
15+
16+
import java.util.Objects;
17+
import com.aspose.cloud.cells.model.SaveOptions;
18+
import com.google.gson.TypeAdapter;
19+
import com.google.gson.annotations.JsonAdapter;
20+
import com.google.gson.annotations.SerializedName;
21+
import com.google.gson.stream.JsonReader;
22+
import com.google.gson.stream.JsonWriter;
23+
import io.swagger.annotations.ApiModel;
24+
import io.swagger.annotations.ApiModelProperty;
25+
import java.io.IOException;
26+
27+
/**
28+
* MarkdownSaveOptions
29+
*/
30+
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-06-12T17:09:26.063+08:00")
31+
public class MarkdownSaveOptions extends SaveOptions {
32+
@SerializedName("Encoding")
33+
private String encoding = null;
34+
35+
@SerializedName("FormatStrategy")
36+
private String formatStrategy = null;
37+
38+
@SerializedName("LineSeparator")
39+
private String lineSeparator = null;
40+
41+
public MarkdownSaveOptions encoding(String encoding) {
42+
this.encoding = encoding;
43+
return this;
44+
}
45+
46+
/**
47+
* Get encoding
48+
* @return encoding
49+
**/
50+
@ApiModelProperty(value = "")
51+
public String getEncoding() {
52+
return encoding;
53+
}
54+
55+
public void setEncoding(String encoding) {
56+
this.encoding = encoding;
57+
}
58+
59+
public MarkdownSaveOptions formatStrategy(String formatStrategy) {
60+
this.formatStrategy = formatStrategy;
61+
return this;
62+
}
63+
64+
/**
65+
* Get formatStrategy
66+
* @return formatStrategy
67+
**/
68+
@ApiModelProperty(value = "")
69+
public String getFormatStrategy() {
70+
return formatStrategy;
71+
}
72+
73+
public void setFormatStrategy(String formatStrategy) {
74+
this.formatStrategy = formatStrategy;
75+
}
76+
77+
public MarkdownSaveOptions lineSeparator(String lineSeparator) {
78+
this.lineSeparator = lineSeparator;
79+
return this;
80+
}
81+
82+
/**
83+
* Get lineSeparator
84+
* @return lineSeparator
85+
**/
86+
@ApiModelProperty(value = "")
87+
public String getLineSeparator() {
88+
return lineSeparator;
89+
}
90+
91+
public void setLineSeparator(String lineSeparator) {
92+
this.lineSeparator = lineSeparator;
93+
}
94+
95+
96+
@Override
97+
public boolean equals(java.lang.Object o) {
98+
if (this == o) {
99+
return true;
100+
}
101+
if (o == null || getClass() != o.getClass()) {
102+
return false;
103+
}
104+
MarkdownSaveOptions markdownSaveOptions = (MarkdownSaveOptions) o;
105+
return Objects.equals(this.encoding, markdownSaveOptions.encoding) &&
106+
Objects.equals(this.formatStrategy, markdownSaveOptions.formatStrategy) &&
107+
Objects.equals(this.lineSeparator, markdownSaveOptions.lineSeparator) &&
108+
super.equals(o);
109+
}
110+
111+
@Override
112+
public int hashCode() {
113+
return Objects.hash(encoding, formatStrategy, lineSeparator, super.hashCode());
114+
}
115+
116+
117+
@Override
118+
public String toString() {
119+
StringBuilder sb = new StringBuilder();
120+
sb.append("class MarkdownSaveOptions {\n");
121+
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
122+
sb.append(" encoding: ").append(toIndentedString(encoding)).append("\n");
123+
sb.append(" formatStrategy: ").append(toIndentedString(formatStrategy)).append("\n");
124+
sb.append(" lineSeparator: ").append(toIndentedString(lineSeparator)).append("\n");
125+
sb.append("}");
126+
return sb.toString();
127+
}
128+
129+
/**
130+
* Convert the given object to string with each line indented by 4 spaces
131+
* (except the first line).
132+
*/
133+
private String toIndentedString(java.lang.Object o) {
134+
if (o == null) {
135+
return "null";
136+
}
137+
return o.toString().replace("\n", "\n ");
138+
}
139+
140+
}
141+

src/test/java/com/aspose/cloud/cells/api/CellsApiUtil.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@
1515
public class CellsApiUtil {
1616
private static String accesstoken;
1717
private static String grantType = "client_credentials";
18-
private static String clientId = "your sid";
19-
private static String clientSecret = "your key";
20-
private static String sourceFolder ="test data foler";
18+
private static String clientId = "66164C51-693E-4904-A121-545961673EC1";
19+
private static String clientSecret = "536e76768419db9585afdd37bb5f7533";
20+
private static String sourceFolder ="D:\\Projects\\Aspose\\Aspose.Cloud\\Aspose.Cells.Cloud.SDK\\src\\TestData\\";
21+
// private static String clientId = "your sid";
22+
// private static String clientSecret = "your key";
23+
// private static String sourceFolder ="test data foler";
2124
public static String GetSourceFolder() {
2225
return sourceFolder;
2326
}
@@ -62,13 +65,12 @@ public static ApiClient Ready(String folder, String filename) {
6265
File file = new File(sourceFolder + filename);
6366
storageHelper.PutCreate(folder + "/" + filename, null, null, file);
6467

65-
CellsTaskApi apiTask = new CellsTaskApi();
6668
ApiClient apiClient = new ApiClient();
6769
apiClient.setBasePath("https://api.aspose.cloud/v1.1");
6870
apiClient.addDefaultHeader("Authorization", "Bearer " + GetAccessToken());
69-
apiTask.setApiClient(apiClient);
7071
return apiClient;
7172
}
73+
7274
public static byte[] GetFileData(String filename) {
7375
try {
7476
File file = new File(GetSourceFolder() + filename);

src/test/java/com/aspose/cloud/cells/api/CellsOleObjectsApiTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ public void cellsOleObjectsPutWorksheetOleObjectTest() throws ApiException {
187187
String imageFile = "word.jpg";
188188
String folder = TEMPFOLDER;
189189
api.setApiClient( CellsApiUtil.Ready(folder, name));
190+
CellsApiUtil.Upload( imageFile);
191+
CellsApiUtil.Upload(oleFile);
190192
OleObjectResponse response = api.cellsOleObjectsPutWorksheetOleObject(name, sheetName, oleObject, upperLeftRow, upperLeftColumn, height, width, oleFile, imageFile, folder,null);
191193
Assert.assertEquals("cellsOleObjectsPutWorksheetOleObjectTest is OK.", "OK", response.getStatus());
192194
// TODO: test validations

src/test/java/com/aspose/cloud/cells/api/CellsPicturesApiTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ public void cellsPicturesPutWorksheetAddPictureTest() throws ApiException {
184184
String picturePath = "WaterMark.png";
185185
String folder = TEMPFOLDER;
186186
api.setApiClient( CellsApiUtil.Ready(folder, name));
187+
CellsApiUtil.Upload( picturePath);
187188
PicturesResponse response = api.cellsPicturesPutWorksheetAddPicture(name, sheetName, picture, upperLeftRow, upperLeftColumn, lowerRightRow, lowerRightColumn, picturePath, folder,null);
188189
Assert.assertEquals("cellsPicturesPutWorksheetAddPictureTest is OK.", "OK", response.getStatus());
189190
// TODO: test validations

src/test/java/com/aspose/cloud/cells/api/CellsSaveAsApiTest.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,25 @@ public void cellsSaveAsPostDocumentSaveAsTest() throws ApiException {
7575

7676
// TODO: test validations
7777
}
78-
78+
/**
79+
* Convert document and save result to storage.
80+
*
81+
*
82+
*
83+
* @throws ApiException
84+
* if the Api call fails
85+
*/
86+
@Test
87+
public void cellsSaveAsPostDocumentSaveAsMDTest() throws ApiException {
88+
String name = BOOK1;
89+
SaveOptions saveOptions = null;
90+
String newfilename = "newbook.xlsx.md";
91+
Boolean isAutoFitRows = true;
92+
Boolean isAutoFitColumns = false;
93+
String folder = TEMPFOLDER;
94+
api.setApiClient( CellsApiUtil.Ready(folder, name));
95+
SaveResponse response = api.cellsSaveAsPostDocumentSaveAs(name, saveOptions, newfilename, isAutoFitRows, isAutoFitColumns, folder,null);
96+
97+
// TODO: test validations
98+
}
7999
}

src/test/java/com/aspose/cloud/cells/api/CellsWorkbookApiTest.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,27 @@ public void cellsWorkbookGetWorkbookTest() throws ApiException {
192192
// TODO: test validations
193193
}
194194

195+
/**
196+
* Read workbook default style info.
197+
*
198+
*
199+
*
200+
* @throws ApiException
201+
* if the Api call fails
202+
*/
203+
@Test
204+
public void cellsWorkbookGetWorkbookForMDTest() throws ApiException {
205+
String name = BOOK1;
206+
String password = null;
207+
Boolean isAutoFit = true;
208+
Boolean onlySaveTable = true;
209+
String format = "md";
210+
String folder = TEMPFOLDER;
211+
api.setApiClient( CellsApiUtil.Ready(folder, name));
212+
File response = api.cellsWorkbookGetWorkbook(name, password, format, isAutoFit, onlySaveTable, folder,null,null);
213+
214+
// TODO: test validations
215+
}
195216
/**
196217
* Read workbook default style info.
197218
*
@@ -594,7 +615,7 @@ public void cellsWorkbookPutWorkbookCreateTest() throws ApiException {
594615
String folder = TEMPFOLDER;
595616
CellsApiUtil.Upload(dataFile);
596617
api.setApiClient( CellsApiUtil.Ready(folder, templateFile));
597-
WorkbookResponse response = api.cellsWorkbookPutWorkbookCreate(name, templateFile, dataFile, folder,null);
618+
WorkbookResponse response = api.cellsWorkbookPutWorkbookCreate(name, folder+"/"+ templateFile, dataFile, folder,null);
598619

599620
// TODO: test validations
600621
}

0 commit comments

Comments
 (0)