public class DbxClientV2 extends DbxClientV2Base
DbxWebAuth
.
This class has no mutable state, so it's thread safe as long as you pass
in a thread safe HttpRequestor
implementation.
_client
Constructor and Description |
---|
DbxClientV2(DbxRequestConfig requestConfig,
java.lang.String accessToken)
Creates a client that uses the given OAuth 2 access token as
authorization when performing requests against the default Dropbox hosts.
|
DbxClientV2(DbxRequestConfig requestConfig,
java.lang.String accessToken,
DbxHost host)
Same as
DbxClientV2(DbxRequestConfig, String) except you can
also set the hostnames of the Dropbox API servers. |
DbxClientV2(DbxRequestConfig requestConfig,
java.lang.String accessToken,
DbxHost host,
java.lang.String userId)
Same as
DbxClientV2(DbxRequestConfig, String, DbxHost) except you can
also set the userId for multiple Dropbox accounts. |
DbxClientV2(DbxRequestConfig requestConfig,
java.lang.String accessToken,
java.lang.String userId)
Creates a client that uses the given OAuth 2 access token as
authorization when performing requests against the default Dropbox hosts.
|
Modifier and Type | Method and Description |
---|---|
DbxClientV2 |
withPathRoot(PathRoot pathRoot)
Returns a new
DbxClientV2 that performs requests against Dropbox API
user endpoints relative to a namespace without including the namespace as
part of the path variable for every request. |
auth, contacts, fileProperties, fileRequests, files, paper, sharing, users
public DbxClientV2(DbxRequestConfig requestConfig, java.lang.String accessToken)
requestConfig
- Default attributes to use for each requestaccessToken
- OAuth 2 access token (that you got from Dropbox) that
gives your app the ability to make Dropbox API calls. Typically
acquired through DbxWebAuth
public DbxClientV2(DbxRequestConfig requestConfig, java.lang.String accessToken, java.lang.String userId)
requestConfig
- Default attributes to use for each requestaccessToken
- OAuth 2 access token (that you got from Dropbox) that
gives your app the ability to make Dropbox API calls. Typically
acquired through DbxWebAuth
userId
- The user ID of the current Dropbox account. Used for
multi-Dropbox account use-case.public DbxClientV2(DbxRequestConfig requestConfig, java.lang.String accessToken, DbxHost host)
DbxClientV2(DbxRequestConfig, String)
except you can
also set the hostnames of the Dropbox API servers. This is used in
testing. You don't normally need to call this.requestConfig
- Default attributes to use for each requestaccessToken
- OAuth 2 access token (that you got from Dropbox) that
gives your app the ability to make Dropbox API calls. Typically
acquired through DbxWebAuth
host
- Dropbox hosts to send requests to (used for mocking and
testing)public DbxClientV2(DbxRequestConfig requestConfig, java.lang.String accessToken, DbxHost host, java.lang.String userId)
DbxClientV2(DbxRequestConfig, String, DbxHost)
except you can
also set the userId for multiple Dropbox accounts.requestConfig
- Default attributes to use for each requestaccessToken
- OAuth 2 access token (that you got from Dropbox) that
gives your app the ability to make Dropbox API calls. Typically
acquired through DbxWebAuth
host
- Dropbox hosts to send requests to (used for mocking and
testing)userId
- The user ID of the current Dropbox account. Used for multi-Dropbox
account use-case.public DbxClientV2 withPathRoot(PathRoot pathRoot)
DbxClientV2
that performs requests against Dropbox API
user endpoints relative to a namespace without including the namespace as
part of the path variable for every request.
(https://www.dropbox.com/developers/reference/namespace-guide#pathrootmodes).
This method performs no validation of the namespace ID.
pathRoot
- the path root for this client, never null
.java.lang.IllegalArgumentException
- If pathRoot
is null