Skip to content

Commit 81ac5b2

Browse files
author
Diwaker Gupta
committed
New methods no longer return *apiImpl
Instead, return the `Client` interface for that namespace. While this should not break existing applications (since apiImpl was package internal), bumping the major version to indicate the interface change. Refs #31
1 parent 8d158dc commit 81ac5b2

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

dropbox/auth/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func (dbx *apiImpl) TokenRevoke() (err error) {
172172
}
173173

174174
// New returns a Client implementation for this namespace
175-
func New(c dropbox.Config) *apiImpl {
175+
func New(c dropbox.Config) Client {
176176
ctx := apiImpl(dropbox.NewContext(c))
177177
return &ctx
178178
}

dropbox/file_properties/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ func (dbx *apiImpl) TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateT
11931193
}
11941194

11951195
// New returns a Client implementation for this namespace
1196-
func New(c dropbox.Config) *apiImpl {
1196+
func New(c dropbox.Config) Client {
11971197
ctx := apiImpl(dropbox.NewContext(c))
11981198
return &ctx
11991199
}

dropbox/file_requests/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ func (dbx *apiImpl) Update(arg *UpdateFileRequestArgs) (res *FileRequest, err er
326326
}
327327

328328
// New returns a Client implementation for this namespace
329-
func New(c dropbox.Config) *apiImpl {
329+
func New(c dropbox.Config) Client {
330330
ctx := apiImpl(dropbox.NewContext(c))
331331
return &ctx
332332
}

dropbox/files/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3714,7 +3714,7 @@ func (dbx *apiImpl) UploadSessionStart(arg *UploadSessionStartArg, content io.Re
37143714
}
37153715

37163716
// New returns a Client implementation for this namespace
3717-
func New(c dropbox.Config) *apiImpl {
3717+
func New(c dropbox.Config) Client {
37183718
ctx := apiImpl(dropbox.NewContext(c))
37193719
return &ctx
37203720
}

dropbox/paper/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ func (dbx *apiImpl) DocsUsersRemove(arg *RemovePaperDocUser) (err error) {
12351235
}
12361236

12371237
// New returns a Client implementation for this namespace
1238-
func New(c dropbox.Config) *apiImpl {
1238+
func New(c dropbox.Config) Client {
12391239
ctx := apiImpl(dropbox.NewContext(c))
12401240
return &ctx
12411241
}

dropbox/sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const (
3535
hostAPI = "api"
3636
hostContent = "content"
3737
hostNotify = "notify"
38-
sdkVersion = "3.4.0"
38+
sdkVersion = "4.0.0"
3939
specVersion = "5389e5b"
4040
)
4141

dropbox/sharing/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3266,7 +3266,7 @@ func (dbx *apiImpl) UpdateFolderPolicy(arg *UpdateFolderPolicyArg) (res *SharedF
32663266
}
32673267

32683268
// New returns a Client implementation for this namespace
3269-
func New(c dropbox.Config) *apiImpl {
3269+
func New(c dropbox.Config) Client {
32703270
ctx := apiImpl(dropbox.NewContext(c))
32713271
return &ctx
32723272
}

dropbox/team/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4651,7 +4651,7 @@ func (dbx *apiImpl) TokenGetAuthenticatedAdmin() (res *TokenGetAuthenticatedAdmi
46514651
}
46524652

46534653
// New returns a Client implementation for this namespace
4654-
func New(c dropbox.Config) *apiImpl {
4654+
func New(c dropbox.Config) Client {
46554655
ctx := apiImpl(dropbox.NewContext(c))
46564656
return &ctx
46574657
}

dropbox/team_log/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func (dbx *apiImpl) GetEventsContinue(arg *GetTeamEventsContinueArg) (res *GetTe
179179
}
180180

181181
// New returns a Client implementation for this namespace
182-
func New(c dropbox.Config) *apiImpl {
182+
func New(c dropbox.Config) Client {
183183
ctx := apiImpl(dropbox.NewContext(c))
184184
return &ctx
185185
}

dropbox/users/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ func (dbx *apiImpl) GetSpaceUsage() (res *SpaceUsage, err error) {
318318
}
319319

320320
// New returns a Client implementation for this namespace
321-
func New(c dropbox.Config) *apiImpl {
321+
func New(c dropbox.Config) Client {
322322
ctx := apiImpl(dropbox.NewContext(c))
323323
return &ctx
324324
}

0 commit comments

Comments
 (0)