Skip to content

Commit f77a111

Browse files
authored
Merge pull request #32 from aspose-pdf-cloud/develop
update to 22.3.1
2 parents e6cef95 + f61539d commit f77a111

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

annotations_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func TestDeleteAnnotation(t *testing.T) {
125125
"folder": GetBaseTest().remoteFolder,
126126
}
127127

128-
responseAnnotations, httpResponse, err := GetBaseTest().PdfAPI.GetDocumentAnnotations(name, args)
128+
responseAnnotations, _, err := GetBaseTest().PdfAPI.GetDocumentAnnotations(name, args)
129129
if err != nil {
130130
t.Error(err)
131131
}

api_client.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func selectHeaderAccept(accepts []string) string {
109109
// contains is a case insenstive match, finding needle in a haystack
110110
func contains(haystack []string, needle string) bool {
111111
for _, a := range haystack {
112-
if strings.ToLower(a) == strings.ToLower(needle) {
112+
if strings.EqualFold(a, needle) {
113113
return true
114114
}
115115
}
@@ -125,7 +125,7 @@ func typeCheckParameter(obj interface{}, expected string, name string) error {
125125

126126
// Check the type is as expected.
127127
if reflect.TypeOf(obj).String() != expected {
128-
return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String())
128+
return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String())
129129
}
130130
return nil
131131
}
@@ -176,7 +176,7 @@ func (c *APIClient) prepareRequest (
176176

177177
// set custom header
178178
headerParams["x-aspose-client"] = "go sdk"
179-
headerParams["x-aspose-client-version"] = "22.3.0"
179+
headerParams["x-aspose-client-version"] = "22.3.1"
180180

181181
// Detect postBody type and post.
182182
if postBody != nil {
@@ -195,7 +195,7 @@ func (c *APIClient) prepareRequest (
195195
// add form parameters and file if available.
196196
if len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") {
197197
if body != nil {
198-
return nil, errors.New("Cannot specify postBody and multipart form at the same time.")
198+
return nil, errors.New("cannot specify postBody and multipart form at the same time")
199199
}
200200
body = &bytes.Buffer{}
201201
w := multipart.NewWriter(body)
@@ -327,7 +327,7 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e
327327
}
328328

329329
if bodyBuf.Len() == 0 {
330-
err = fmt.Errorf("Invalid body type %s\n", contentType)
330+
err = fmt.Errorf("invalid body type %s", contentType)
331331
return nil, err
332332
}
333333
return bodyBuf, nil

caret_annotations_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func TestGetCaretAnnotation(t *testing.T) {
8181
"folder": GetBaseTest().remoteFolder,
8282
}
8383

84-
responseAnnotations, httpResponse, err := GetBaseTest().PdfAPI.GetDocumentCaretAnnotations(name, args)
84+
responseAnnotations, _, err := GetBaseTest().PdfAPI.GetDocumentCaretAnnotations(name, args)
8585
if err != nil {
8686
t.Error(err)
8787
}
@@ -156,7 +156,7 @@ func TestPutCaretAnnotation(t *testing.T) {
156156
Modified: "02/02/2018 00:00:00.000 AM",
157157
}
158158

159-
responseAnnotations, httpResponse, err := GetBaseTest().PdfAPI.GetDocumentCaretAnnotations(name, args)
159+
responseAnnotations, _, err := GetBaseTest().PdfAPI.GetDocumentCaretAnnotations(name, args)
160160
if err != nil {
161161
t.Error(err)
162162
}

circle_annotations_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func TestGetCircleAnnotation(t *testing.T) {
8181
"folder": GetBaseTest().remoteFolder,
8282
}
8383

84-
responseAnnotations, httpResponse, err := GetBaseTest().PdfAPI.GetDocumentCircleAnnotations(name, args)
84+
responseAnnotations, _, err := GetBaseTest().PdfAPI.GetDocumentCircleAnnotations(name, args)
8585
if err != nil {
8686
t.Error(err)
8787
}
@@ -152,7 +152,7 @@ func TestPutCircleAnnotation(t *testing.T) {
152152
Title: "Title Updated",
153153
}
154154

155-
responseAnnotations, httpResponse, err := GetBaseTest().PdfAPI.GetDocumentCircleAnnotations(name, args)
155+
responseAnnotations, _, err := GetBaseTest().PdfAPI.GetDocumentCircleAnnotations(name, args)
156156
if err != nil {
157157
t.Error(err)
158158
}

configuration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ type Configuration struct {
7575

7676
func NewConfiguration(appSid string, appKey string, basePath string) *Configuration {
7777
cfg := &Configuration{
78-
BasePath: "https://api.aspose.cloud/v2.0",
78+
BasePath: "https://api.aspose.cloud/v3.0",
7979
DefaultHeader: make(map[string]string),
8080
UserAgent: "aspose pdf cloud go sdk",
8181
AppKey: appKey,
@@ -89,4 +89,4 @@ func NewConfiguration(appSid string, appKey string, basePath string) *Configurat
8989

9090
func (c *Configuration) AddDefaultHeader(key string, value string) {
9191
c.DefaultHeader[key] = value
92-
}
92+
}

document_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func TestPostCreateDocument(t *testing.T) {
127127
PagesCount: 2,
128128
DocumentProperties: &DocumentProperties{
129129
List: []DocumentProperty{
130-
DocumentProperty{
130+
{
131131
BuiltIn: false,
132132
Name: "prop1",
133133
Value: "Val1",

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module github.com/aspose-pdf-cloud/aspose-pdf-cloud-go
1+
module github.com/aspose-pdf-cloud/aspose-pdf-cloud-go/v22
22

33
go 1.16

underline_annotations_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ func TestPutUnderlineAnnotation(t *testing.T) {
158158
ZIndex: 1,
159159
Title: "Title Updated",
160160
QuadPoints: []Point{
161-
Point{X: 10, Y: 10},
162-
Point{X: 20, Y: 10},
163-
Point{X: 10, Y: 20},
164-
Point{X: 10, Y: 10},
161+
{X: 10, Y: 10},
162+
{X: 20, Y: 10},
163+
{X: 10, Y: 20},
164+
{X: 10, Y: 10},
165165
},
166166
Modified: "02/02/2018 00:00:00.000 AM",
167167
}
168168

169-
responseAnnotations, httpResponse, err := GetBaseTest().PdfAPI.GetDocumentUnderlineAnnotations(name, args)
169+
responseAnnotations, _, err := GetBaseTest().PdfAPI.GetDocumentUnderlineAnnotations(name, args)
170170
if err != nil {
171171
t.Error(err)
172172
}

0 commit comments

Comments
 (0)