Skip to content

Commit 32f67fc

Browse files
committed
Fix Aspose.Cells Cloud SDK 20.11.1
1 parent 4d25def commit 32f67fc

File tree

7 files changed

+24
-24
lines changed

7 files changed

+24
-24
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ First, create an account at [Aspose for Cloud](https://dashboard.aspose.cloud/#/
5757

5858
```golang
5959
func GetDocumentCircleAnnotations() (CircleAnnotationsResponse, *http.Response, error) {
60-
cellsAPI := NewCellsApiService("AppSid", "AppKey", "https://api.aspose.cloud","v3.0")
60+
cellsAPI := NewCellsApiService("clientId", "clientSecret", "https://api.aspose.cloud","v3.0")
6161
name := "Book1.xlsx"
6262

6363
args := new(UploadFileOpts)

api/swagger.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9697,13 +9697,13 @@ paths:
96979697
x-exportParamName: "GrantType"
96989698
- name: "client_id"
96999699
in: "formData"
9700-
description: "App SID"
9700+
description: "Client Id"
97019701
required: true
97029702
type: "string"
97039703
x-exportParamName: "ClientId"
97049704
- name: "client_secret"
97059705
in: "formData"
9706-
description: "App Key"
9706+
description: "Client Secret"
97079707
required: true
97089708
type: "string"
97099709
x-exportParamName: "ClientSecret"
@@ -14458,12 +14458,12 @@ securityDefinitions:
1445814458
flow: "implicit"
1445914459
scopes:
1446014460
write:pets: "modify pets in your account"
14461-
appsid:
14462-
type: "apiKey"
14463-
name: "appsid"
14461+
clientId:
14462+
type: "clientSecret"
14463+
name: "clientId"
1446414464
in: "query"
1446514465
signature:
14466-
type: "apiKey"
14466+
type: "clientSecret"
1446714467
name: "signature"
1446814468
in: "query"
1446914469
definitions:

api_cells.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ func Version() {
3535
}
3636

3737
/* Create Instance of CellsApiService
38-
@param appSid string Application SID
39-
@param appKey string Application Key
38+
@param clientId string Client Id
39+
@param clientSecret string Client Secret
4040
@param basePath string Base service path. Set "" for default
4141
@return *CellsApiService */
42-
func NewCellsApiService(appSid string, appKey string, opts ...string) *CellsApiService {
42+
func NewCellsApiService(clientId string, clientSecret string, opts ...string) *CellsApiService {
4343
var basePath = ""
4444
var version = ""
4545
for i, v := range opts {
@@ -50,7 +50,7 @@ func Version() {
5050
version = v
5151
}
5252
}
53-
config := NewConfiguration(appSid, appKey, basePath, version)
53+
config := NewConfiguration(clientId, clientSecret, basePath, version)
5454
client := NewAPIClient(config)
5555
return client.CellsApi
5656
}
@@ -22077,8 +22077,8 @@ func (a *CellsApiService) MoveFolder( localVarOptionals *MoveFolderOpts) (*ht
2207722077
/*
2207822078
CellsApiService Get Access token
2207922079
* @param grantType Grant Type
22080-
* @param clientId App SID
22081-
* @param clientSecret App Key
22080+
* @param clientId Client Id
22081+
* @param clientSecret Client Secret
2208222082

2208322083
@return AccessTokenResponse
2208422084
*/

base_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func NewBaseTest() *BaseTest {
5858
remoteFolder: "GoTest",
5959
localTestDataFolder: "TestData/",
6060
TestNumber: 0,
61-
// Get App key and App SID from https://aspose.cloud
61+
// Get Client Secret and Client Id from https://aspose.cloud
6262
CellsAPI: NewCellsApiService(os.Getenv("CellsCloudTestClientId"), os.Getenv("CellsCloudTestClientSecret"), os.Getenv("CellsCloudTestApiBaseUrl"), "v3.0"),
6363
}
6464
return bt

client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ func strlen(s string) (int) {
407407

408408
// addAuth add Authorization header to request
409409
func (a *APIClient) addAuth(request *http.Request) (err error) {
410-
if(a.cfg.AppKey=="" && a.cfg.AppSid==""){
410+
if(a.cfg.ClientSecret=="" && a.cfg.ClientId==""){
411411
return nil
412412
}
413413
if (a.cfg.AccessToken == "") {
@@ -434,8 +434,8 @@ func (a *APIClient) RequestOauthToken() (error) {
434434
}
435435
resp, err := http.PostForm(getAccessTokeUri, url.Values{
436436
"grant_type": {"client_credentials"},
437-
"client_id": {a.cfg.AppSid},
438-
"client_secret": {a.cfg.AppKey}})
437+
"client_id": {a.cfg.ClientId},
438+
"client_secret": {a.cfg.ClientSecret}})
439439

440440
if err != nil {
441441
return err

configuration.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,20 @@ type Configuration struct {
7272
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
7373
UserAgent string `json:"userAgent,omitempty"`
7474
HTTPClient *http.Client
75-
AppKey string
76-
AppSid string
75+
ClientSecret string
76+
ClientId string
7777
AccessToken string
7878
GetAccessTokenTime time.Time
7979
}
8080

81-
func NewConfiguration(appSid string, appKey string, basePath string, version string) *Configuration {
81+
func NewConfiguration(clientId string, clientSecret string, basePath string, version string) *Configuration {
8282
cfg := &Configuration{
8383
BasePath: "https://api.aspose.cloud",
8484
Version: "v3.0",
8585
DefaultHeader: make(map[string]string),
8686
UserAgent: "Aspose Cells Cloud SDK for Go",
87-
AppKey: appKey,
88-
AppSid: appSid,
87+
ClientSecret: clientSecret,
88+
ClientId: clientId,
8989
}
9090
if basePath != "" {
9191
cfg.BasePath = basePath

docs/CellsApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10570,8 +10570,8 @@ Name | Type | Description | Notes
1057010570
------------- | ------------- | ------------- | -------------
1057110571
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
1057210572
**grantType** | **string**| Grant Type |
10573-
**clientId** | **string**| App SID |
10574-
**clientSecret** | **string**| App Key |
10573+
**clientId** | **string**| Client Id |
10574+
**clientSecret** | **string**| Client Secret |
1057510575

1057610576
### Return type
1057710577

0 commit comments

Comments
 (0)