Skip to content

Commit 91b19ab

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents 9d9a096 + 0dbc97d commit 91b19ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+642
-645
lines changed

README.md

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ Feel free to explore the [Developer's Guide](https://docs.aspose.cloud/display/w
1616
- Add & remove watermarks and protection.
1717
- Read & write access to Document Object Model.
1818

19+
## Enhancements in Version 23.6
20+
21+
- Fix XMLHttpRequest in web applications.
22+
23+
1924
## Enhancements in Version 23.5
2025

2126
- Added InsertSection method.
@@ -317,35 +322,27 @@ Config.json file:
317322
Go code:
318323

319324
```
320-
// Start README example
321-
322-
// init words cloud api
323-
config, _ := models.NewConfiguration(configFilePath)
324-
wordsApi, ctx, _ := api.CreateWordsApi(config)
325-
326-
// upload test.docx to a cloud
327-
// remote.docx is a name in the cloud
328-
file, _ := os.Open(localFilePath)
329-
uploadRequest := &models.UploadFileRequest{
330-
FileContent: file,
331-
Path: &remotePath,
332-
}
333-
wordsApi.UploadFile(ctx, uploadRequest)
334-
335-
// get a text for the first paragraph of the first section
336-
options := map[string]interface{}{
337-
"folder": remoteFolder,
338-
}
339-
request := &models.GetParagraphsRequest{
340-
Name: &remoteName,
341-
Optionals: options,
342-
}
343-
344-
result, _, _ := wordsApi.GetParagraphs(ctx, request)
345-
346-
fmt.Println(result.Paragraphs.ParagraphLinkList[0].Text)
347-
348-
// End README example
325+
// Start README example
326+
327+
// init words cloud api
328+
config, _ := models.NewConfiguration(configFilePath)
329+
wordsApi, ctx, _ := api.CreateWordsApi(config)
330+
331+
// upload test.docx to a cloud
332+
// remote.docx is a name in the cloud
333+
file, _ := os.Open(localFilePath)
334+
wordsApi.UploadFile(ctx, file, remotePath, nil)
335+
336+
// get a text for the first paragraph of the first section
337+
options := map[string]interface{}{
338+
"folder": remoteFolder,
339+
}
340+
341+
result, _, _ := wordsApi.GetParagraphs(ctx, remoteName, options)
342+
343+
fmt.Println(result.Paragraphs.ParagraphLinkList[0].Text)
344+
345+
// End README example
349346
```
350347

351348
[Product Page](https://products.aspose.cloud/words/go) | [Documentation](https://docs.aspose.cloud/display/wordscloud/Home) | [API Reference](https://apireference.aspose.cloud/words/) | [Code Samples](https://github.com/aspose-words-cloud/aspose-words-cloud-go) | [Blog](https://blog.aspose.cloud/category/words/) | [Free Support](https://forum.aspose.cloud/c/words) | [Free Trial](https://dashboard.aspose.cloud/#/apps)

dev/api/api_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ var (
6464
xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)")
6565
)
6666

67-
// APIClient manages communication with the Aspose.Words for Cloud API Reference API v23.5
67+
// APIClient manages communication with the Aspose.Words for Cloud API Reference API v23.6
6868
// In most cases there should be only one, shared, APIClient.
6969
type APIClient struct {
7070
cfg *models.Configuration
@@ -171,7 +171,7 @@ func (c *APIClient) NewContextWithToken(ctx context.Context) (ctxWithToken conte
171171
}
172172

173173
tokenUrl, _ := url.Parse(c.cfg.BaseUrl)
174-
tokenUrl.Path = "/connect/token"
174+
tokenUrl.Path = "/v4.0/words/connect/token"
175175

176176
response, err := http.PostForm(tokenUrl.String(), url.Values{
177177
"grant_type": {"client_credentials"},

dev/api/models/bmp_save_options_data.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@ type BmpSaveOptionsDataResult struct {
116116
// Container class for bmp save options.
117117
UseAntiAliasing bool `json:"UseAntiAliasing,omitempty"`
118118

119-
// Container class for bmp save options.
120-
UseGdiEmfRenderer bool `json:"UseGdiEmfRenderer,omitempty"`
121-
122119
// Container class for bmp save options.
123120
UseHighQualityRendering bool `json:"UseHighQualityRendering,omitempty"`
124121

125122
// Container class for bmp save options.
126123
VerticalResolution float64 `json:"VerticalResolution,omitempty"`
127124

125+
// Container class for bmp save options.
126+
UseGdiEmfRenderer bool `json:"UseGdiEmfRenderer,omitempty"`
127+
128128
// Container class for bmp save options.
129129
SaveFormat string `json:"SaveFormat,omitempty"`
130130
}
@@ -217,15 +217,15 @@ type BmpSaveOptionsData struct {
217217
// Container class for bmp save options.
218218
UseAntiAliasing *bool `json:"UseAntiAliasing,omitempty"`
219219

220-
// Container class for bmp save options.
221-
UseGdiEmfRenderer *bool `json:"UseGdiEmfRenderer,omitempty"`
222-
223220
// Container class for bmp save options.
224221
UseHighQualityRendering *bool `json:"UseHighQualityRendering,omitempty"`
225222

226223
// Container class for bmp save options.
227224
VerticalResolution *float64 `json:"VerticalResolution,omitempty"`
228225

226+
// Container class for bmp save options.
227+
UseGdiEmfRenderer *bool `json:"UseGdiEmfRenderer,omitempty"`
228+
229229
// Container class for bmp save options.
230230
SaveFormat *string `json:"SaveFormat,omitempty"`
231231
}

dev/api/models/comment.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,51 +33,51 @@ type CommentResult struct {
3333
Link WordsApiLinkResult `json:"Link,omitempty"`
3434

3535
// DTO container with a comment.
36-
Author string `json:"Author,omitempty"`
36+
RangeStart DocumentPositionResult `json:"RangeStart,omitempty"`
3737

3838
// DTO container with a comment.
39-
Content StoryChildNodesResult `json:"Content,omitempty"`
39+
RangeEnd DocumentPositionResult `json:"RangeEnd,omitempty"`
4040

4141
// DTO container with a comment.
42-
DateTime Time `json:"DateTime,omitempty"`
42+
Author string `json:"Author,omitempty"`
4343

4444
// DTO container with a comment.
4545
Initial string `json:"Initial,omitempty"`
4646

4747
// DTO container with a comment.
48-
RangeEnd DocumentPositionResult `json:"RangeEnd,omitempty"`
48+
DateTime Time `json:"DateTime,omitempty"`
4949

5050
// DTO container with a comment.
51-
RangeStart DocumentPositionResult `json:"RangeStart,omitempty"`
51+
Text string `json:"Text,omitempty"`
5252

5353
// DTO container with a comment.
54-
Text string `json:"Text,omitempty"`
54+
Content StoryChildNodesResult `json:"Content,omitempty"`
5555
}
5656

5757
type Comment struct {
5858
// DTO container with a comment.
5959
Link IWordsApiLink `json:"Link,omitempty"`
6060

6161
// DTO container with a comment.
62-
Author *string `json:"Author,omitempty"`
62+
RangeStart IDocumentPosition `json:"RangeStart,omitempty"`
6363

6464
// DTO container with a comment.
65-
Content IStoryChildNodes `json:"Content,omitempty"`
65+
RangeEnd IDocumentPosition `json:"RangeEnd,omitempty"`
6666

6767
// DTO container with a comment.
68-
DateTime *Time `json:"DateTime,omitempty"`
68+
Author *string `json:"Author,omitempty"`
6969

7070
// DTO container with a comment.
7171
Initial *string `json:"Initial,omitempty"`
7272

7373
// DTO container with a comment.
74-
RangeEnd IDocumentPosition `json:"RangeEnd,omitempty"`
74+
DateTime *Time `json:"DateTime,omitempty"`
7575

7676
// DTO container with a comment.
77-
RangeStart IDocumentPosition `json:"RangeStart,omitempty"`
77+
Text *string `json:"Text,omitempty"`
7878

7979
// DTO container with a comment.
80-
Text *string `json:"Text,omitempty"`
80+
Content IStoryChildNodes `json:"Content,omitempty"`
8181
}
8282

8383
type IComment interface {
@@ -103,16 +103,16 @@ func (obj *Comment) Initialize() {
103103
obj.Link.Initialize()
104104
}
105105

106-
if (obj.Content != nil) {
107-
obj.Content.Initialize()
106+
if (obj.RangeStart != nil) {
107+
obj.RangeStart.Initialize()
108108
}
109109

110110
if (obj.RangeEnd != nil) {
111111
obj.RangeEnd.Initialize()
112112
}
113113

114-
if (obj.RangeStart != nil) {
115-
obj.RangeStart.Initialize()
114+
if (obj.Content != nil) {
115+
obj.Content.Initialize()
116116
}
117117

118118

dev/api/models/comment_base.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,39 +30,39 @@ package models
3030
// Comment.
3131
type CommentBaseResult struct {
3232
// Comment.
33-
Author string `json:"Author,omitempty"`
33+
RangeStart NewDocumentPositionResult `json:"RangeStart,omitempty"`
3434

3535
// Comment.
36-
DateTime Time `json:"DateTime,omitempty"`
36+
RangeEnd NewDocumentPositionResult `json:"RangeEnd,omitempty"`
3737

3838
// Comment.
39-
Initial string `json:"Initial,omitempty"`
39+
Author string `json:"Author,omitempty"`
4040

4141
// Comment.
42-
RangeEnd NewDocumentPositionResult `json:"RangeEnd,omitempty"`
42+
DateTime Time `json:"DateTime,omitempty"`
4343

4444
// Comment.
45-
RangeStart NewDocumentPositionResult `json:"RangeStart,omitempty"`
45+
Initial string `json:"Initial,omitempty"`
4646

4747
// Comment.
4848
Text string `json:"Text,omitempty"`
4949
}
5050

5151
type CommentBase struct {
5252
// Comment.
53-
Author *string `json:"Author,omitempty"`
53+
RangeStart INewDocumentPosition `json:"RangeStart,omitempty"`
5454

5555
// Comment.
56-
DateTime *Time `json:"DateTime,omitempty"`
56+
RangeEnd INewDocumentPosition `json:"RangeEnd,omitempty"`
5757

5858
// Comment.
59-
Initial *string `json:"Initial,omitempty"`
59+
Author *string `json:"Author,omitempty"`
6060

6161
// Comment.
62-
RangeEnd INewDocumentPosition `json:"RangeEnd,omitempty"`
62+
DateTime *Time `json:"DateTime,omitempty"`
6363

6464
// Comment.
65-
RangeStart INewDocumentPosition `json:"RangeStart,omitempty"`
65+
Initial *string `json:"Initial,omitempty"`
6666

6767
// Comment.
6868
Text *string `json:"Text,omitempty"`
@@ -80,14 +80,14 @@ func (CommentBase) IsCommentBase() bool {
8080

8181

8282
func (obj *CommentBase) Initialize() {
83-
if (obj.RangeEnd != nil) {
84-
obj.RangeEnd.Initialize()
85-
}
86-
8783
if (obj.RangeStart != nil) {
8884
obj.RangeStart.Initialize()
8985
}
9086

87+
if (obj.RangeEnd != nil) {
88+
obj.RangeEnd.Initialize()
89+
}
90+
9191

9292
}
9393

dev/api/models/comment_insert.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,39 +30,39 @@ package models
3030
// Comment insert.
3131
type CommentInsertResult struct {
3232
// Comment insert.
33-
Author string `json:"Author,omitempty"`
33+
RangeStart NewDocumentPositionResult `json:"RangeStart,omitempty"`
3434

3535
// Comment insert.
36-
DateTime Time `json:"DateTime,omitempty"`
36+
RangeEnd NewDocumentPositionResult `json:"RangeEnd,omitempty"`
3737

3838
// Comment insert.
39-
Initial string `json:"Initial,omitempty"`
39+
Author string `json:"Author,omitempty"`
4040

4141
// Comment insert.
42-
RangeEnd NewDocumentPositionResult `json:"RangeEnd,omitempty"`
42+
DateTime Time `json:"DateTime,omitempty"`
4343

4444
// Comment insert.
45-
RangeStart NewDocumentPositionResult `json:"RangeStart,omitempty"`
45+
Initial string `json:"Initial,omitempty"`
4646

4747
// Comment insert.
4848
Text string `json:"Text,omitempty"`
4949
}
5050

5151
type CommentInsert struct {
5252
// Comment insert.
53-
Author *string `json:"Author,omitempty"`
53+
RangeStart INewDocumentPosition `json:"RangeStart,omitempty"`
5454

5555
// Comment insert.
56-
DateTime *Time `json:"DateTime,omitempty"`
56+
RangeEnd INewDocumentPosition `json:"RangeEnd,omitempty"`
5757

5858
// Comment insert.
59-
Initial *string `json:"Initial,omitempty"`
59+
Author *string `json:"Author,omitempty"`
6060

6161
// Comment insert.
62-
RangeEnd INewDocumentPosition `json:"RangeEnd,omitempty"`
62+
DateTime *Time `json:"DateTime,omitempty"`
6363

6464
// Comment insert.
65-
RangeStart INewDocumentPosition `json:"RangeStart,omitempty"`
65+
Initial *string `json:"Initial,omitempty"`
6666

6767
// Comment insert.
6868
Text *string `json:"Text,omitempty"`
@@ -83,14 +83,14 @@ func (CommentInsert) IsCommentBase() bool {
8383
}
8484

8585
func (obj *CommentInsert) Initialize() {
86-
if (obj.RangeEnd != nil) {
87-
obj.RangeEnd.Initialize()
88-
}
89-
9086
if (obj.RangeStart != nil) {
9187
obj.RangeStart.Initialize()
9288
}
9389

90+
if (obj.RangeEnd != nil) {
91+
obj.RangeEnd.Initialize()
92+
}
93+
9494

9595
}
9696

0 commit comments

Comments
 (0)