Skip to content

Commit 3a83248

Browse files
SDK regenerated by CI server [ci skip]
1 parent 0ccb9d6 commit 3a83248

File tree

3 files changed

+62
-2
lines changed

3 files changed

+62
-2
lines changed

dev/api/api_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var (
6565
xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)")
6666
)
6767

68-
// APIClient manages communication with the Aspose.Words for Cloud API Reference API v23.9
68+
// APIClient manages communication with the Aspose.Words for Cloud API Reference API v23.10
6969
// In most cases there should be only one, shared, APIClient.
7070
type APIClient struct {
7171
cfg *models.Configuration

dev/api/models/configuration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func NewConfiguration(configFilePath string) (pConfig *Configuration, err error)
9999
cfg := Configuration{
100100
BaseUrl: "https://api.aspose.cloud",
101101
DebugMode: false,
102-
DefaultHeader: map[string]string{"x-aspose-client": "go sdk", "x-aspose-client-version": "23.9"},
102+
DefaultHeader: map[string]string{"x-aspose-client": "go sdk", "x-aspose-client-version": "23.10"},
103103
}
104104
err = json.Unmarshal(data, &cfg)
105105

dev/tests/convert_document_test.go

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,66 @@ func Test_ConvertDocument_SaveAsDocx(t *testing.T) {
157157
assert.NotNil(t, actual.GetSaveResult().GetDestDocument(), "Validate SaveAsDocx response.");
158158
}
159159

160+
// Test for converting document to one of the available formats.
161+
func Test_ConvertDocument_SaveAsTiff(t *testing.T) {
162+
config := ReadConfiguration(t)
163+
client, ctx := PrepareTest(t, config)
164+
remoteFolder := remoteBaseTestDataFolder + "/DocumentActions/ConvertDocument"
165+
localName := "test_multi_pages.docx"
166+
remoteName := "TestSaveAsTiff.pdf"
167+
168+
UploadNextFileToStorage(t, ctx, client, GetLocalFile("Common/" + localName), remoteFolder + "/" + remoteName)
169+
170+
requestSaveOptions := models.TiffSaveOptionsData{
171+
FileName: ToStringPointer(baseTestOutPath + "/abc.tiff"),
172+
}
173+
174+
options := map[string]interface{}{
175+
"folder": remoteFolder,
176+
}
177+
178+
request := &models.SaveAsTiffRequest{
179+
Name: ToStringPointer(remoteName),
180+
SaveOptions: &requestSaveOptions,
181+
Optionals: options,
182+
}
183+
184+
actual, _, err := client.WordsApi.SaveAsTiff(ctx, request)
185+
if err != nil {
186+
t.Error(err)
187+
}
188+
189+
assert.NotNil(t, actual.GetSaveResult(), "Validate SaveAsTiff response.");
190+
assert.NotNil(t, actual.GetSaveResult().GetDestDocument(), "Validate SaveAsTiff response.");
191+
}
192+
193+
// Test for converting document to one of the available formats.
194+
func Test_ConvertDocument_SaveAsTiffOnline(t *testing.T) {
195+
config := ReadConfiguration(t)
196+
client, ctx := PrepareTest(t, config)
197+
localName := "test_multi_pages.docx"
198+
199+
requestDocument := OpenFile(t, "Common/" + localName)
200+
requestSaveOptions := models.TiffSaveOptionsData{
201+
FileName: ToStringPointer(baseTestOutPath + "/abc.tiff"),
202+
}
203+
204+
options := map[string]interface{}{
205+
}
206+
207+
request := &models.SaveAsTiffOnlineRequest{
208+
Document: requestDocument,
209+
SaveOptions: &requestSaveOptions,
210+
Optionals: options,
211+
}
212+
213+
_, _, err := client.WordsApi.SaveAsTiffOnline(ctx, request)
214+
if err != nil {
215+
t.Error(err)
216+
}
217+
218+
}
219+
160220
// A test for ConvertDocument.
161221
func Test_ConvertDocument_ConvertDocument(t *testing.T) {
162222
config := ReadConfiguration(t)

0 commit comments

Comments
 (0)