Skip to content

Commit 270e24c

Browse files
SDK regenerated by CI server [ci skip]
1 parent 6ffdd55 commit 270e24c

File tree

2 files changed

+22
-30
lines changed

2 files changed

+22
-30
lines changed

README.md

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -317,35 +317,27 @@ Config.json file:
317317
Go code:
318318

319319
```
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
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+
wordsApi.UploadFile(ctx, file, remotePath, nil)
330+
331+
// get a text for the first paragraph of the first section
332+
options := map[string]interface{}{
333+
"folder": remoteFolder,
334+
}
335+
336+
result, _, _ := wordsApi.GetParagraphs(ctx, remoteName, options)
337+
338+
fmt.Println(result.Paragraphs.ParagraphLinkList[0].Text)
339+
340+
// End README example
349341
```
350342

351343
[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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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"},

0 commit comments

Comments
 (0)