Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.dropbox.core.v2.auth.DbxAppAuthRequests;
import com.dropbox.core.v2.check.DbxAppCheckRequests;
import com.dropbox.core.v2.files.DbxAppFilesRequests;
import com.dropbox.core.v2.riviera.DbxAppRivieraRequests;
import com.dropbox.core.v2.sharing.DbxAppSharingRequests;

/**
Expand All @@ -17,6 +18,7 @@ public class DbxAppClientV2Base {
private final DbxAppAuthRequests auth;
private final DbxAppCheckRequests check;
private final DbxAppFilesRequests files;
private final DbxAppRivieraRequests riviera;
private final DbxAppSharingRequests sharing;

/**
Expand All @@ -29,6 +31,7 @@ protected DbxAppClientV2Base(DbxRawClientV2 _client) {
this.auth = new DbxAppAuthRequests(_client);
this.check = new DbxAppCheckRequests(_client);
this.files = new DbxAppFilesRequests(_client);
this.riviera = new DbxAppRivieraRequests(_client);
this.sharing = new DbxAppSharingRequests(_client);
}

Expand Down Expand Up @@ -59,6 +62,15 @@ public DbxAppFilesRequests files() {
return files;
}

/**
* Returns client for issuing requests in the {@code "riviera"} namespace.
*
* @return Dropbox riviera client
*/
public DbxAppRivieraRequests riviera() {
return riviera;
}

/**
* Returns client for issuing requests in the {@code "sharing"} namespace.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.dropbox.core.v2.files.DbxUserFilesRequests;
import com.dropbox.core.v2.openid.DbxUserOpenidRequests;
import com.dropbox.core.v2.paper.DbxUserPaperRequests;
import com.dropbox.core.v2.riviera.DbxUserRivieraRequests;
import com.dropbox.core.v2.sharing.DbxUserSharingRequests;
import com.dropbox.core.v2.users.DbxUserUsersRequests;

Expand All @@ -30,6 +31,7 @@ public class DbxClientV2Base {
private final DbxUserFilesRequests files;
private final DbxUserOpenidRequests openid;
private final DbxUserPaperRequests paper;
private final DbxUserRivieraRequests riviera;
private final DbxUserSharingRequests sharing;
private final DbxUserUsersRequests users;

Expand All @@ -49,6 +51,7 @@ protected DbxClientV2Base(DbxRawClientV2 _client) {
this.files = new DbxUserFilesRequests(_client);
this.openid = new DbxUserOpenidRequests(_client);
this.paper = new DbxUserPaperRequests(_client);
this.riviera = new DbxUserRivieraRequests(_client);
this.sharing = new DbxUserSharingRequests(_client);
this.users = new DbxUserUsersRequests(_client);
}
Expand Down Expand Up @@ -136,6 +139,15 @@ public DbxUserPaperRequests paper() {
return paper;
}

/**
* Returns client for issuing requests in the {@code "riviera"} namespace.
*
* @return Dropbox riviera client
*/
public DbxUserRivieraRequests riviera() {
return riviera;
}

/**
* Returns client for issuing requests in the {@code "sharing"} namespace.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,103 @@
/* DO NOT EDIT */
/* This file was generated from account.stone */
/* This file was generated from account_account_photo.stone, account_account_photo_block.stone */

package com.dropbox.core.v2.account;

import com.dropbox.core.DbxDownloader;
import com.dropbox.core.DbxException;
import com.dropbox.core.DbxWrappedException;
import com.dropbox.core.http.HttpRequestor;
import com.dropbox.core.v2.DbxDownloadStyleBuilder;
import com.dropbox.core.v2.DbxRawClientV2;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* Routes in namespace "account".
*/
public class DbxUserAccountRequests {
// namespace account (account.stone)
// namespace account (account_account_photo.stone, account_account_photo_block.stone)

private final DbxRawClientV2 client;

public DbxUserAccountRequests(DbxRawClientV2 client) {
this.client = client;
}

//
// route 2/account/get_photo
//

/**
* This lovely endpoint gets the account photo of a given user.
*
* @param _headers Extra headers to send with request.
*
* @return Downloader used to download the response body and view the server
* response.
*/
DbxDownloader<AccountPhotoGetResult> getPhoto(AccountPhotoGetArg arg, List<HttpRequestor.Header> _headers) throws AccountPhotoGetErrorException, DbxException {
try {
return this.client.downloadStyle(this.client.getHost().getContent(),
"2/account/get_photo",
arg,
false,
_headers,
AccountPhotoGetArg.Serializer.INSTANCE,
AccountPhotoGetResult.Serializer.INSTANCE,
AccountPhotoGetError.Serializer.INSTANCE);
}
catch (DbxWrappedException ex) {
throw new AccountPhotoGetErrorException("2/account/get_photo", ex.getRequestId(), ex.getUserMessage(), (AccountPhotoGetError) ex.getErrorValue());
}
}

/**
* This lovely endpoint gets the account photo of a given user.
*
* @param dbxAccountId Encoded ID of the user. Must start either with
* 'dbid:' or 'dbaphid:'. Must not be {@code null}.
* @param size A string representing the size of the photo. Must not be
* {@code null}.
* @param circleCrop True if the photo should be cropped and false
* otherwise.
* @param expectAccountPhoto True if we expect account photo to exist.
*
* @return Downloader used to download the response body and view the server
* response.
*
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public DbxDownloader<AccountPhotoGetResult> getPhoto(String dbxAccountId, String size, boolean circleCrop, boolean expectAccountPhoto) throws AccountPhotoGetErrorException, DbxException {
AccountPhotoGetArg _arg = new AccountPhotoGetArg(dbxAccountId, size, circleCrop, expectAccountPhoto);
return getPhoto(_arg, Collections.<HttpRequestor.Header>emptyList());
}

/**
* This lovely endpoint gets the account photo of a given user.
*
* @param dbxAccountId Encoded ID of the user. Must start either with
* 'dbid:' or 'dbaphid:'. Must not be {@code null}.
* @param size A string representing the size of the photo. Must not be
* {@code null}.
* @param circleCrop True if the photo should be cropped and false
* otherwise.
* @param expectAccountPhoto True if we expect account photo to exist.
*
* @return Downloader builder for configuring the request parameters and
* instantiating a downloader.
*
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public GetPhotoBuilder getPhotoBuilder(String dbxAccountId, String size, boolean circleCrop, boolean expectAccountPhoto) {
return new GetPhotoBuilder(this, dbxAccountId, size, circleCrop, expectAccountPhoto);
}

//
// route 2/account/set_profile_photo
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* DO NOT EDIT */
/* This file was generated from account.stone */
/* This file was generated from account_account_photo.stone */

package com.dropbox.core.v2.account;

Expand Down Expand Up @@ -27,7 +27,7 @@
* will be used. </p>
*/
public final class PhotoSourceArg {
// union account.PhotoSourceArg (account.stone)
// union account.PhotoSourceArg (account_account_photo.stone)

/**
* Discriminating tag type for {@link PhotoSourceArg}.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* DO NOT EDIT */
/* This file was generated from account.stone */
/* This file was generated from account_account_photo.stone */

package com.dropbox.core.v2.account;

Expand All @@ -19,7 +19,7 @@
import javax.annotation.Nonnull;

class SetProfilePhotoArg {
// struct account.SetProfilePhotoArg (account.stone)
// struct account.SetProfilePhotoArg (account_account_photo.stone)

@Nonnull
protected final PhotoSourceArg photo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* DO NOT EDIT */
/* This file was generated from account.stone */
/* This file was generated from account_account_photo.stone */

package com.dropbox.core.v2.account;

Expand All @@ -17,7 +17,7 @@
import java.util.Arrays;

public enum SetProfilePhotoError {
// union account.SetProfilePhotoError (account.stone)
// union account.SetProfilePhotoError (account_account_photo.stone)
/**
* File cannot be set as profile photo.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* DO NOT EDIT */
/* This file was generated from account.stone */
/* This file was generated from account_account_photo.stone */

package com.dropbox.core.v2.account;

Expand All @@ -19,7 +19,7 @@
import javax.annotation.Nonnull;

public class SetProfilePhotoResult {
// struct account.SetProfilePhotoResult (account.stone)
// struct account.SetProfilePhotoResult (account_account_photo.stone)

@Nonnull
protected final String profilePhotoUrl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* DO NOT EDIT */
/* This file was generated from async.stone */
/* This file was generated from async_common_async.stone */

package com.dropbox.core.v2.async;

Expand Down Expand Up @@ -27,7 +27,7 @@
* tag associated with this instance. </p>
*/
public final class LaunchEmptyResult {
// union async.LaunchEmptyResult (async.stone)
// union async.LaunchEmptyResult (async_common_async.stone)

/**
* Discriminating tag type for {@link LaunchEmptyResult}.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* DO NOT EDIT */
/* This file was generated from async.stone */
/* This file was generated from async_common_async.stone */

package com.dropbox.core.v2.async;

Expand Down Expand Up @@ -28,7 +28,7 @@
* tag associated with this instance. </p>
*/
public final class LaunchResultBase {
// union async.LaunchResultBase (async.stone)
// union async.LaunchResultBase (async_common_async.stone)

/**
* Discriminating tag type for {@link LaunchResultBase}.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* DO NOT EDIT */
/* This file was generated from async.stone */
/* This file was generated from async_common_async.stone */

package com.dropbox.core.v2.async;

Expand All @@ -22,7 +22,7 @@
* Arguments for methods that poll the status of an asynchronous job.
*/
public class PollArg {
// struct async.PollArg (async.stone)
// struct async.PollArg (async_common_async.stone)

@Nonnull
protected final String asyncJobId;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* DO NOT EDIT */
/* This file was generated from async.stone */
/* This file was generated from async_common_async.stone */

package com.dropbox.core.v2.async;

Expand All @@ -21,7 +21,7 @@
* Upon completion of the job, no additional information is returned.
*/
public enum PollEmptyResult {
// union async.PollEmptyResult (async.stone)
// union async.PollEmptyResult (async_common_async.stone)
/**
* The asynchronous job is still in progress.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* DO NOT EDIT */
/* This file was generated from async.stone */
/* This file was generated from async_common_async.stone */

package com.dropbox.core.v2.async;

Expand All @@ -20,7 +20,7 @@
* Error returned by methods for polling the status of asynchronous job.
*/
public enum PollError {
// union async.PollError (async.stone)
// union async.PollError (async_common_async.stone)
/**
* The job ID is invalid.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* Exception thrown when the server responds with a {@link PollError} error.
*
* <p> This exception is raised by {@link
* com.dropbox.core.v2.riviera.DbxAppRivieraRequests#getTranscriptAsyncCheck(String)},
* {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGet(String)},
* {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGetV2(String)},
Expand Down Expand Up @@ -45,6 +47,7 @@
*/
public class PollErrorException extends DbxApiException {
// exception for routes:
// 2/riviera/get_transcript_async/check
// 2/team/members/add/job_status/get
// 2/team/members/add/job_status/get_v2
// 2/team/members/move_former_member_files/job_status/check
Expand All @@ -66,6 +69,8 @@ public class PollErrorException extends DbxApiException {

/**
* The error reported by {@link
* com.dropbox.core.v2.riviera.DbxAppRivieraRequests#getTranscriptAsyncCheck(String)},
* {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGet(String)},
* {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGetV2(String)},
Expand Down
Loading
Loading