-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'remotes/origin/master' into release
- Loading branch information
Showing
851 changed files
with
176,184 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
:copy files version folder | ||
xcopy dev %1 /E /Y /I | ||
xcopy *.md %1/ /Y | ||
: fix files | ||
powershell -command "& { (Get-Content %1\README.md).Replace('v2007', '%1').Replace('2007', '%1') | Set-Content %1\README.md }" | ||
powershell -command "& { (Get-Content %1\go.mod).Replace('/dev', '/%1') | Set-Content %1\go.mod }" | ||
powershell -command "& { Get-ChildItem "%1\tests\*.go" | ForEach-Object -Process {(Get-Content $_).Replace('/dev/', '/%1/') | Set-Content $_ } }" | ||
powershell -command "& { Get-ChildItem "%1\examples\*" | ForEach-Object -Process {(Get-Content $_).Replace('/dev/', '/%1/') | Set-Content $_ } }" | ||
powershell -command "& { Get-ChildItem "%1\api\*.go" | ForEach-Object -Process {(Get-Content $_).Replace('/dev/', '/%1/') | Set-Content $_ } }" | ||
|
||
: commit if any files are changed | ||
git add . | ||
git diff-index --quiet HEAD -- | ||
if %errorlevel% == 1 ( | ||
git commit -m 'Prepare to release %1' | ||
git push https://%2:%3@git.auckland.dynabic.com/words-cloud/words-cloud-dotnet.git master | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
/* | ||
* -------------------------------------------------------------------------------- | ||
* <copyright company="Aspose" file="get_all_revisions_online_request.go"> | ||
* Copyright (c) 2024 Aspose.Words for Cloud | ||
* </copyright> | ||
* <summary> | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
* </summary> | ||
* -------------------------------------------------------------------------------- | ||
*/ | ||
|
||
package models | ||
|
||
import ( | ||
"errors" | ||
"io/ioutil" | ||
"net/url" | ||
"strings" | ||
"io" | ||
"encoding/json" | ||
) | ||
|
||
// GetAllRevisionsOnlineRequest contains request data for WordsApiService.GetAllRevisionsOnline method. | ||
type GetAllRevisionsOnlineRequest struct { | ||
// The document. | ||
Document io.ReadCloser | ||
/* optional (nil or map[string]interface{}) with one or more of key / value pairs: | ||
key: "loadEncoding" value: (*string) Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML. | ||
key: "password" value: (*string) Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API. | ||
key: "encryptedPassword" value: (*string) Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details. | ||
key: "openTypeSupport" value: (*bool) The value indicates whether OpenType support is on. */ | ||
Optionals map[string]interface{} | ||
} | ||
|
||
|
||
func (data *GetAllRevisionsOnlineRequest) CreateRequestData() (RequestData, error) { | ||
var result RequestData | ||
var filesContentData = make([]FileReference, 0) | ||
if data == nil { | ||
return result, errors.New("Invalid object.") | ||
} | ||
|
||
result.Method = strings.ToUpper("put") | ||
|
||
// create path and map variables | ||
result.Path = "/words/online/get/revisions/getAll" | ||
|
||
result.Path = strings.Replace(result.Path, "/<nil>", "", -1) | ||
result.Path = strings.Replace(result.Path, "//", "/", -1) | ||
|
||
result.HeaderParams = make(map[string]string) | ||
result.QueryParams = url.Values{} | ||
result.FormParams = make([]FormParamContainer, 0) | ||
|
||
if (data.Document == nil) { | ||
return result, errors.New("Parameter Document is required.") | ||
} | ||
|
||
|
||
if err := typeCheckParameter(data.Optionals["loadEncoding"], "string", "data.Optionals[loadEncoding]"); err != nil { | ||
return result, err | ||
} | ||
if err := typeCheckParameter(data.Optionals["password"], "string", "data.Optionals[password]"); err != nil { | ||
return result, err | ||
} | ||
if err := typeCheckParameter(data.Optionals["encryptedPassword"], "string", "data.Optionals[encryptedPassword]"); err != nil { | ||
return result, err | ||
} | ||
if err := typeCheckParameter(data.Optionals["openTypeSupport"], "bool", "data.Optionals[openTypeSupport]"); err != nil { | ||
return result, err | ||
} | ||
|
||
|
||
|
||
if localVarTempParam, localVarOk := data.Optionals["loadEncoding"].(string); localVarOk { | ||
result.QueryParams.Add("LoadEncoding", parameterToString(localVarTempParam, "")) | ||
} | ||
|
||
|
||
if localVarTempParam, localVarOk := data.Optionals["password"].(string); localVarOk { | ||
result.QueryParams.Add("Password", parameterToString(localVarTempParam, "")) | ||
} | ||
|
||
|
||
if localVarTempParam, localVarOk := data.Optionals["encryptedPassword"].(string); localVarOk { | ||
result.QueryParams.Add("EncryptedPassword", parameterToString(localVarTempParam, "")) | ||
} | ||
|
||
|
||
if localVarTempParam, localVarOk := data.Optionals["openTypeSupport"].(bool); localVarOk { | ||
result.QueryParams.Add("OpenTypeSupport", parameterToString(localVarTempParam, "")) | ||
} | ||
|
||
|
||
|
||
_document := data.Document | ||
if _document != nil { | ||
fbs, _ := ioutil.ReadAll(_document) | ||
_document.Close() | ||
result.FormParams = append(result.FormParams, NewFileFormParamContainer("document", fbs)) | ||
} | ||
|
||
|
||
result.FileReferences = filesContentData | ||
for _, fileContentData := range filesContentData { | ||
if fileContentData.Source == "Request" { | ||
fbs, _ := ioutil.ReadAll(fileContentData.Content) | ||
result.FormParams = append(result.FormParams, NewFileFormParamContainer(fileContentData.Reference, fbs)) | ||
} | ||
} | ||
|
||
return result, nil | ||
} | ||
|
||
func (data *GetAllRevisionsOnlineRequest) CreateResponse(reader io.Reader, boundary string) (response interface{}, err error) { | ||
var successPayload IRevisionsResponse = new(RevisionsResponse) | ||
var jsonMap map[string]interface{} | ||
if err = json.NewDecoder(reader).Decode(&jsonMap); err != nil { | ||
return nil, err | ||
} | ||
|
||
successPayload.Deserialize(jsonMap) | ||
return successPayload, err | ||
} |
Oops, something went wrong.