Skip to content

Commit 9986f8c

Browse files
Update to latest SDK spec
2 parents 70c5cf3 + 7d53932 commit 9986f8c

1,749 files changed

Lines changed: 35863 additions & 9277 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

core/api/core.api

Lines changed: 4707 additions & 64 deletions
Large diffs are not rendered by default.

core/build/generated_stone_source/main/refs/javadoc-refs.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

core/build/generated_stone_source/main/src/com/dropbox/core/v2/DbxAppClientV2Base.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.dropbox.core.v2.auth.DbxAppAuthRequests;
77
import com.dropbox.core.v2.check.DbxAppCheckRequests;
88
import com.dropbox.core.v2.files.DbxAppFilesRequests;
9+
import com.dropbox.core.v2.riviera.DbxAppRivieraRequests;
910
import com.dropbox.core.v2.sharing.DbxAppSharingRequests;
1011

1112
/**
@@ -17,6 +18,7 @@ public class DbxAppClientV2Base {
1718
private final DbxAppAuthRequests auth;
1819
private final DbxAppCheckRequests check;
1920
private final DbxAppFilesRequests files;
21+
private final DbxAppRivieraRequests riviera;
2022
private final DbxAppSharingRequests sharing;
2123

2224
/**
@@ -29,6 +31,7 @@ protected DbxAppClientV2Base(DbxRawClientV2 _client) {
2931
this.auth = new DbxAppAuthRequests(_client);
3032
this.check = new DbxAppCheckRequests(_client);
3133
this.files = new DbxAppFilesRequests(_client);
34+
this.riviera = new DbxAppRivieraRequests(_client);
3235
this.sharing = new DbxAppSharingRequests(_client);
3336
}
3437

@@ -59,6 +62,15 @@ public DbxAppFilesRequests files() {
5962
return files;
6063
}
6164

65+
/**
66+
* Returns client for issuing requests in the {@code "riviera"} namespace.
67+
*
68+
* @return Dropbox riviera client
69+
*/
70+
public DbxAppRivieraRequests riviera() {
71+
return riviera;
72+
}
73+
6274
/**
6375
* Returns client for issuing requests in the {@code "sharing"} namespace.
6476
*

core/build/generated_stone_source/main/src/com/dropbox/core/v2/DbxClientV2Base.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.dropbox.core.v2.files.DbxUserFilesRequests;
1313
import com.dropbox.core.v2.openid.DbxUserOpenidRequests;
1414
import com.dropbox.core.v2.paper.DbxUserPaperRequests;
15+
import com.dropbox.core.v2.riviera.DbxUserRivieraRequests;
1516
import com.dropbox.core.v2.sharing.DbxUserSharingRequests;
1617
import com.dropbox.core.v2.users.DbxUserUsersRequests;
1718

@@ -30,6 +31,7 @@ public class DbxClientV2Base {
3031
private final DbxUserFilesRequests files;
3132
private final DbxUserOpenidRequests openid;
3233
private final DbxUserPaperRequests paper;
34+
private final DbxUserRivieraRequests riviera;
3335
private final DbxUserSharingRequests sharing;
3436
private final DbxUserUsersRequests users;
3537

@@ -49,6 +51,7 @@ protected DbxClientV2Base(DbxRawClientV2 _client) {
4951
this.files = new DbxUserFilesRequests(_client);
5052
this.openid = new DbxUserOpenidRequests(_client);
5153
this.paper = new DbxUserPaperRequests(_client);
54+
this.riviera = new DbxUserRivieraRequests(_client);
5255
this.sharing = new DbxUserSharingRequests(_client);
5356
this.users = new DbxUserUsersRequests(_client);
5457
}
@@ -136,6 +139,15 @@ public DbxUserPaperRequests paper() {
136139
return paper;
137140
}
138141

142+
/**
143+
* Returns client for issuing requests in the {@code "riviera"} namespace.
144+
*
145+
* @return Dropbox riviera client
146+
*/
147+
public DbxUserRivieraRequests riviera() {
148+
return riviera;
149+
}
150+
139151
/**
140152
* Returns client for issuing requests in the {@code "sharing"} namespace.
141153
*

core/build/generated_stone_source/main/src/com/dropbox/core/v2/account/DbxUserAccountRequests.java

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33

44
package com.dropbox.core.v2.account;
55

6+
import com.dropbox.core.DbxDownloader;
67
import com.dropbox.core.DbxException;
78
import com.dropbox.core.DbxWrappedException;
89
import com.dropbox.core.http.HttpRequestor;
10+
import com.dropbox.core.v2.DbxDownloadStyleBuilder;
911
import com.dropbox.core.v2.DbxRawClientV2;
1012

13+
import java.util.Collections;
1114
import java.util.HashMap;
15+
import java.util.List;
1216
import java.util.Map;
1317

1418
/**
@@ -23,6 +27,116 @@ public DbxUserAccountRequests(DbxRawClientV2 client) {
2327
this.client = client;
2428
}
2529

30+
//
31+
// route 2/account/delete_profile_photo
32+
//
33+
34+
/**
35+
* Deletes the current user's profile photo.
36+
*
37+
* @param arg This struct is empty. The comment here is intentionally
38+
* emitted to avoid indentation issues with Stone.
39+
*
40+
* @return This struct is empty. The comment here is intentionally emitted
41+
* to avoid indentation issues with Stone.
42+
*/
43+
DeleteProfilePhotoResult deleteProfilePhoto(DeleteProfilePhotoArg arg) throws DeleteProfilePhotoErrorException, DbxException {
44+
try {
45+
return this.client.rpcStyle(this.client.getHost().getApi(),
46+
"2/account/delete_profile_photo",
47+
arg,
48+
false,
49+
DeleteProfilePhotoArg.Serializer.INSTANCE,
50+
DeleteProfilePhotoResult.Serializer.INSTANCE,
51+
DeleteProfilePhotoError.Serializer.INSTANCE);
52+
}
53+
catch (DbxWrappedException ex) {
54+
throw new DeleteProfilePhotoErrorException("2/account/delete_profile_photo", ex.getRequestId(), ex.getUserMessage(), (DeleteProfilePhotoError) ex.getErrorValue());
55+
}
56+
}
57+
58+
/**
59+
* Deletes the current user's profile photo.
60+
*
61+
* @return This struct is empty. The comment here is intentionally emitted
62+
* to avoid indentation issues with Stone.
63+
*/
64+
public DeleteProfilePhotoResult deleteProfilePhoto() throws DeleteProfilePhotoErrorException, DbxException {
65+
DeleteProfilePhotoArg _arg = new DeleteProfilePhotoArg();
66+
return deleteProfilePhoto(_arg);
67+
}
68+
69+
//
70+
// route 2/account/get_photo
71+
//
72+
73+
/**
74+
* This lovely endpoint gets the account photo of a given user.
75+
*
76+
* @param _headers Extra headers to send with request.
77+
*
78+
* @return Downloader used to download the response body and view the server
79+
* response.
80+
*/
81+
DbxDownloader<AccountPhotoGetResult> getPhoto(AccountPhotoGetArg arg, List<HttpRequestor.Header> _headers) throws AccountPhotoGetErrorException, DbxException {
82+
try {
83+
return this.client.downloadStyle(this.client.getHost().getContent(),
84+
"2/account/get_photo",
85+
arg,
86+
false,
87+
_headers,
88+
AccountPhotoGetArg.Serializer.INSTANCE,
89+
AccountPhotoGetResult.Serializer.INSTANCE,
90+
AccountPhotoGetError.Serializer.INSTANCE);
91+
}
92+
catch (DbxWrappedException ex) {
93+
throw new AccountPhotoGetErrorException("2/account/get_photo", ex.getRequestId(), ex.getUserMessage(), (AccountPhotoGetError) ex.getErrorValue());
94+
}
95+
}
96+
97+
/**
98+
* This lovely endpoint gets the account photo of a given user.
99+
*
100+
* @param dbxAccountId Encoded ID of the user. Must start either with
101+
* 'dbid:' or 'dbaphid:'. Must not be {@code null}.
102+
* @param size A string representing the size of the photo. Must not be
103+
* {@code null}.
104+
* @param circleCrop True if the photo should be cropped and false
105+
* otherwise.
106+
* @param expectAccountPhoto True if we expect account photo to exist.
107+
*
108+
* @return Downloader used to download the response body and view the server
109+
* response.
110+
*
111+
* @throws IllegalArgumentException If any argument does not meet its
112+
* preconditions.
113+
*/
114+
public DbxDownloader<AccountPhotoGetResult> getPhoto(String dbxAccountId, String size, boolean circleCrop, boolean expectAccountPhoto) throws AccountPhotoGetErrorException, DbxException {
115+
AccountPhotoGetArg _arg = new AccountPhotoGetArg(dbxAccountId, size, circleCrop, expectAccountPhoto);
116+
return getPhoto(_arg, Collections.<HttpRequestor.Header>emptyList());
117+
}
118+
119+
/**
120+
* This lovely endpoint gets the account photo of a given user.
121+
*
122+
* @param dbxAccountId Encoded ID of the user. Must start either with
123+
* 'dbid:' or 'dbaphid:'. Must not be {@code null}.
124+
* @param size A string representing the size of the photo. Must not be
125+
* {@code null}.
126+
* @param circleCrop True if the photo should be cropped and false
127+
* otherwise.
128+
* @param expectAccountPhoto True if we expect account photo to exist.
129+
*
130+
* @return Downloader builder for configuring the request parameters and
131+
* instantiating a downloader.
132+
*
133+
* @throws IllegalArgumentException If any argument does not meet its
134+
* preconditions.
135+
*/
136+
public GetPhotoBuilder getPhotoBuilder(String dbxAccountId, String size, boolean circleCrop, boolean expectAccountPhoto) {
137+
return new GetPhotoBuilder(this, dbxAccountId, size, circleCrop, expectAccountPhoto);
138+
}
139+
26140
//
27141
// route 2/account/set_profile_photo
28142
//

core/build/generated_stone_source/main/src/com/dropbox/core/v2/async/PollErrorException.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
* Exception thrown when the server responds with a {@link PollError} error.
1111
*
1212
* <p> This exception is raised by {@link
13+
* com.dropbox.core.v2.riviera.DbxAppRivieraRequests#getMarkdownAsyncCheck(String)},
14+
* {@link
15+
* com.dropbox.core.v2.riviera.DbxAppRivieraRequests#getTranscriptAsyncCheck(String)},
16+
* {@link
1317
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGet(String)},
1418
* {@link
1519
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGetV2(String)},
@@ -45,6 +49,8 @@
4549
*/
4650
public class PollErrorException extends DbxApiException {
4751
// exception for routes:
52+
// 2/riviera/get_markdown_async/check
53+
// 2/riviera/get_transcript_async/check
4854
// 2/team/members/add/job_status/get
4955
// 2/team/members/add/job_status/get_v2
5056
// 2/team/members/move_former_member_files/job_status/check
@@ -66,6 +72,10 @@ public class PollErrorException extends DbxApiException {
6672

6773
/**
6874
* The error reported by {@link
75+
* com.dropbox.core.v2.riviera.DbxAppRivieraRequests#getMarkdownAsyncCheck(String)},
76+
* {@link
77+
* com.dropbox.core.v2.riviera.DbxAppRivieraRequests#getTranscriptAsyncCheck(String)},
78+
* {@link
6979
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGet(String)},
7080
* {@link
7181
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGetV2(String)},

0 commit comments

Comments
 (0)