public class DbxTeamClientV2 extends DbxTeamClientV2Base
DbxWebAuth
.
Team clients can access user endpoints by using the asMember(java.lang.String)
method. This allows team clients to perform actions as a particular team
member.
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 |
---|
DbxTeamClientV2(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.
|
DbxTeamClientV2(DbxRequestConfig requestConfig,
java.lang.String accessToken,
DbxHost host)
Same as
DbxTeamClientV2(DbxRequestConfig, String) except you can
also set the hostnames of the Dropbox API servers. |
DbxTeamClientV2(DbxRequestConfig requestConfig,
java.lang.String accessToken,
DbxHost host,
java.lang.String userId)
Same as
DbxTeamClientV2(DbxRequestConfig, String, DbxHost) except you can
also set the userId for multiple Dropbox accounts. |
Modifier and Type | Method and Description |
---|---|
DbxClientV2 |
asAdmin(java.lang.String adminId)
Returns a
DbxClientV2 that performs requests against Dropbox API
user endpoints as the given team admin. |
DbxClientV2 |
asMember(java.lang.String memberId)
Returns a
DbxClientV2 that performs requests against Dropbox API
user endpoints as the given team member. |
fileProperties, team, teamLog
public DbxTeamClientV2(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 DbxTeamClientV2(DbxRequestConfig requestConfig, java.lang.String accessToken, DbxHost host)
DbxTeamClientV2(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 DbxTeamClientV2(DbxRequestConfig requestConfig, java.lang.String accessToken, DbxHost host, java.lang.String userId)
DbxTeamClientV2(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 asMember(java.lang.String memberId)
DbxClientV2
that performs requests against Dropbox API
user endpoints as the given team member.
This method performs no validation of the team member ID.
memberId
- Team member ID of member in this client's team, never
null
.java.lang.IllegalArgumentException
- If memberId
is null
public DbxClientV2 asAdmin(java.lang.String adminId)
DbxClientV2
that performs requests against Dropbox API
user endpoints as the given team admin.
This method performs no validation of the team admin ID.
adminId
- Team member ID of the admin in client's team, never
null
.java.lang.IllegalArgumentException
- If adminId
is null