Skip to content

Commit 91af748

Browse files
author
Diwaker Gupta
committed
Update to latest API spec.
1 parent 576f3b5 commit 91af748

File tree

9 files changed

+206
-60
lines changed

9 files changed

+206
-60
lines changed

dropbox/file_properties/client.go

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ type Client interface {
4242
// explicitly marked for deletion.
4343
PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error)
4444
// PropertiesRemove : Remove the specified property group from the file. To
45-
// remove specific property field key value pairs, see route
46-
// `propertiesUpdate`. To update a template, see `templatesUpdateForUser` or
45+
// remove specific property field key value pairs, see `propertiesUpdate`.
46+
// To update a template, see `templatesUpdateForUser` or
4747
// `templatesUpdateForTeam`. Templates can't be removed once created.
4848
PropertiesRemove(arg *RemovePropertiesArg) (err error)
4949
// PropertiesSearch : Search across property templates for particular
@@ -57,29 +57,33 @@ type Client interface {
5757
// `propertiesOverwrite` will delete any fields that are omitted from a
5858
// property group.
5959
PropertiesUpdate(arg *UpdatePropertiesArg) (err error)
60-
// TemplatesAddForTeam : Add a template associated with a team. See route
60+
// TemplatesAddForTeam : Add a template associated with a team. See
6161
// `propertiesAdd` to add properties to a file or folder.
6262
TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error)
63-
// TemplatesAddForUser : Add a template associated with a user. See route
64-
// `propertiesAdd` to add properties to a file.
63+
// TemplatesAddForUser : Add a template associated with a user. See
64+
// `propertiesAdd` to add properties to a file. This endpoint can't be
65+
// called on a team member or admin's behalf.
6566
TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateResult, err error)
6667
// TemplatesGetForTeam : Get the schema for a specified template.
6768
TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateResult, err error)
68-
// TemplatesGetForUser : Get the schema for a specified template.
69+
// TemplatesGetForUser : Get the schema for a specified template. This
70+
// endpoint can't be called on a team member or admin's behalf.
6971
TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateResult, err error)
7072
// TemplatesListForTeam : Get the template identifiers for a team. To get
7173
// the schema of each template use `templatesGetForTeam`.
7274
TemplatesListForTeam() (res *ListTemplateResult, err error)
7375
// TemplatesListForUser : Get the template identifiers for a team. To get
74-
// the schema of each template use `templatesGetForUser`.
76+
// the schema of each template use `templatesGetForUser`. This endpoint
77+
// can't be called on a team member or admin's behalf.
7578
TemplatesListForUser() (res *ListTemplateResult, err error)
7679
// TemplatesUpdateForTeam : Update a template associated with a team. This
7780
// route can update the template name, the template description and add
7881
// optional properties to templates.
7982
TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error)
8083
// TemplatesUpdateForUser : Update a template associated with a user. This
8184
// route can update the template name, the template description and add
82-
// optional properties to templates.
85+
// optional properties to templates. This endpoint can't be called on a team
86+
// member or admin's behalf.
8387
TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error)
8488
}
8589

dropbox/file_requests/types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
// THE SOFTWARE.
2020

2121
// Package file_requests : This namespace contains endpoints and data types for
22-
// file request operations. Warning: This namespace is in beta and is subject to
23-
// backwards-incompatible changes.
22+
// file request operations.
2423
package file_requests
2524

2625
import (

dropbox/files/types.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,11 @@ func NewGpsCoordinates(Latitude float64, Longitude float64) *GpsCoordinates {
11231123
type ListFolderArg struct {
11241124
// Path : A unique identifier for the file.
11251125
Path string `json:"path"`
1126+
// SharedLink : A shared link to list the contents of, if the link is
1127+
// protected provide the password. if this field is present,
1128+
// `ListFolderArg.path` will be relative to root of the shared link. Only
1129+
// non-recursive mode is supported for shared link.
1130+
SharedLink *SharedLink `json:"shared_link,omitempty"`
11261131
// Recursive : If true, the list folder operation will be applied
11271132
// recursively to all subfolders and the response will contain contents of
11281133
// all subfolders.
@@ -2310,6 +2315,21 @@ func NewSearchResult(Matches []*SearchMatch, More bool, Start uint64) *SearchRes
23102315
return s
23112316
}
23122317

2318+
// SharedLink : has no documentation (yet)
2319+
type SharedLink struct {
2320+
// Url : Shared link url.
2321+
Url string `json:"url"`
2322+
// Password : Password for the shared link.
2323+
Password string `json:"password,omitempty"`
2324+
}
2325+
2326+
// NewSharedLink returns a new SharedLink instance
2327+
func NewSharedLink(Url string) *SharedLink {
2328+
s := new(SharedLink)
2329+
s.Url = Url
2330+
return s
2331+
}
2332+
23132333
// ThumbnailArg : has no documentation (yet)
23142334
type ThumbnailArg struct {
23152335
// Path : The path to the image file you want to thumbnail.

dropbox/sdk.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ const (
3535
hostAPI = "api"
3636
hostContent = "content"
3737
hostNotify = "notify"
38-
sdkVersion = "3.0.0"
39-
specVersion = "52ee619"
38+
sdkVersion = "3.1.0"
39+
specVersion = "97eb698"
4040
)
4141

4242
// Version returns the current SDK version and API Spec version

dropbox/sharing/types.go

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3368,7 +3368,7 @@ func NewSharedContentLinkMetadata(AudienceOptions []*LinkAudience, CurrentAudien
33683368
// part of the results for `listFileMembersBatch`.
33693369
type SharedFileMembers struct {
33703370
// Users : The list of user members of the shared file.
3371-
Users []*UserMembershipInfo `json:"users"`
3371+
Users []*UserFileMembershipInfo `json:"users"`
33723372
// Groups : The list of group members of the shared file.
33733373
Groups []*GroupMembershipInfo `json:"groups"`
33743374
// Invitees : The list of invited members of a file, but have not logged in
@@ -3381,7 +3381,7 @@ type SharedFileMembers struct {
33813381
}
33823382

33833383
// NewSharedFileMembers returns a new SharedFileMembers instance
3384-
func NewSharedFileMembers(Users []*UserMembershipInfo, Groups []*GroupMembershipInfo, Invitees []*InviteeMembershipInfo) *SharedFileMembers {
3384+
func NewSharedFileMembers(Users []*UserFileMembershipInfo, Groups []*GroupMembershipInfo, Invitees []*InviteeMembershipInfo) *SharedFileMembers {
33853385
s := new(SharedFileMembers)
33863386
s.Users = Users
33873387
s.Groups = Groups
@@ -4106,6 +4106,41 @@ func (u *UpdateFolderPolicyError) UnmarshalJSON(body []byte) error {
41064106
return nil
41074107
}
41084108

4109+
// UserMembershipInfo : The information about a user member of the shared
4110+
// content.
4111+
type UserMembershipInfo struct {
4112+
MembershipInfo
4113+
// User : The account information for the membership user.
4114+
User *UserInfo `json:"user"`
4115+
}
4116+
4117+
// NewUserMembershipInfo returns a new UserMembershipInfo instance
4118+
func NewUserMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserMembershipInfo {
4119+
s := new(UserMembershipInfo)
4120+
s.AccessType = AccessType
4121+
s.User = User
4122+
s.IsInherited = false
4123+
return s
4124+
}
4125+
4126+
// UserFileMembershipInfo : The information about a user member of the shared
4127+
// content with an appended last seen timestamp.
4128+
type UserFileMembershipInfo struct {
4129+
UserMembershipInfo
4130+
// TimeLastSeen : The UTC timestamp of when the user has last seen the
4131+
// content, if they have.
4132+
TimeLastSeen time.Time `json:"time_last_seen,omitempty"`
4133+
}
4134+
4135+
// NewUserFileMembershipInfo returns a new UserFileMembershipInfo instance
4136+
func NewUserFileMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserFileMembershipInfo {
4137+
s := new(UserFileMembershipInfo)
4138+
s.AccessType = AccessType
4139+
s.User = User
4140+
s.IsInherited = false
4141+
return s
4142+
}
4143+
41094144
// UserInfo : Basic information about a user. Use `usersAccount` and
41104145
// `usersAccountBatch` to obtain more detailed information.
41114146
type UserInfo struct {
@@ -4126,23 +4161,6 @@ func NewUserInfo(AccountId string, SameTeam bool) *UserInfo {
41264161
return s
41274162
}
41284163

4129-
// UserMembershipInfo : The information about a user member of the shared
4130-
// content.
4131-
type UserMembershipInfo struct {
4132-
MembershipInfo
4133-
// User : The account information for the membership user.
4134-
User *UserInfo `json:"user"`
4135-
}
4136-
4137-
// NewUserMembershipInfo returns a new UserMembershipInfo instance
4138-
func NewUserMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserMembershipInfo {
4139-
s := new(UserMembershipInfo)
4140-
s.AccessType = AccessType
4141-
s.User = User
4142-
s.IsInherited = false
4143-
return s
4144-
}
4145-
41464164
// ViewerInfoPolicy : has no documentation (yet)
41474165
type ViewerInfoPolicy struct {
41484166
dropbox.Tagged

dropbox/team/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ type Client interface {
241241
// TeamFolderArchiveCheck : Returns the status of an asynchronous job for
242242
// archiving a team folder. Permission : Team member file access.
243243
TeamFolderArchiveCheck(arg *async.PollArg) (res *TeamFolderArchiveJobStatus, err error)
244-
// TeamFolderCreate : Creates a new, active, team folder. Permission : Team
245-
// member file access.
244+
// TeamFolderCreate : Creates a new, active, team folder with no members.
245+
// Permission : Team member file access.
246246
TeamFolderCreate(arg *TeamFolderCreateArg) (res *TeamFolderMetadata, err error)
247247
// TeamFolderGetInfo : Retrieves metadata for team folders. Permission :
248248
// Team member file access.

0 commit comments

Comments
 (0)