Package | Description |
---|---|
com.dropbox.core |
Modifier and Type | Class and Description |
---|---|
static class |
DbxException.BadRequest
This is what is thrown when the Dropbox server tells us that it didn't
like something about our request.
|
static class |
DbxException.BadResponse
Thrown when we the response from the Dropbox server isn't something we expect.
|
static class |
DbxException.BadResponseCode
Thrown when the Dropbox server responds with an HTTP status code we didn't expect.
|
static class |
DbxException.InvalidAccessToken
Gets thrown when the access token you're using to make API calls is invalid.
|
static class |
DbxException.NetworkIO
This is what gets thrown when there's an IOException when reading or writing
to the network (when communicating with the Dropbox API servers).
|
static class |
DbxException.ProtocolError
Something unexpected happened with either the request or the response.
|
static class |
DbxException.RetryLater
The server is overloaded, or you have hit a rate limit.
|
static class |
DbxException.ServerError
The server said that something went wrong on its end (HTTP 500 error code).
|
Modifier and Type | Method and Description |
---|---|
static DbxException |
DbxRequestUtil.unexpectedStatus(HttpRequestor.Response response) |
Modifier and Type | Method and Description |
---|---|
static <T> T |
DbxRequestUtil.doGet(DbxRequestConfig requestConfig,
String accessToken,
String host,
String path,
String[] params,
ArrayList<HttpRequestor.Header> headers,
DbxRequestUtil.ResponseHandler<T> handler) |
static <T> T |
DbxRequestUtil.doPost(DbxRequestConfig requestConfig,
String accessToken,
String host,
String path,
String[] params,
ArrayList<HttpRequestor.Header> headers,
DbxRequestUtil.ResponseHandler<T> handler) |
<T> T |
DbxClient.doPost(String host,
String path,
String[] params,
ArrayList<HttpRequestor.Header> headers,
DbxRequestUtil.ResponseHandler<T> handler) |
static <T> T |
DbxRequestUtil.doPostNoAuth(DbxRequestConfig requestConfig,
String host,
String path,
String[] params,
ArrayList<HttpRequestor.Header> headers,
DbxRequestUtil.ResponseHandler<T> handler) |
DbxEntry.File |
DbxClient.Uploader.finish()
When you're done writing the file contents to
DbxClient.Uploader.body , call this
to indicate that you're done. |
DbxAuthFinish |
DbxWebAuth.finish(Map<String,String[]> queryParams)
Call this after the user has visited the authorizaton URL and Dropbox has redirected them
back to you (using the
redirectUri you passed in to DbxWebAuth.start(java.lang.String) . |
DbxAuthFinish |
DbxWebAuthNoRedirect.finish(String code)
Call this after the user has visited the authorizaton URL and copy/pasted the authorization
code that Dropbox gave them.
|
static <T> T |
DbxRequestUtil.finishResponse(HttpRequestor.Response response,
DbxRequestUtil.ResponseHandler<T> handler) |
DbxAccountInfo |
DbxClient.getAccountInfo()
Retrieve the user's account information.
|
DbxDelta<DbxEntry> |
DbxClient.getDelta(String cursor)
Return "delta" entries for the contents of a user's Dropbox.
|
<C> DbxDeltaC<C,DbxEntry> |
DbxClient.getDeltaC(String cursor,
Collector<DbxDeltaC.Entry<DbxEntry>,C> collector)
This is a more generic version of
DbxClient.getDelta(java.lang.String) . |
DbxEntry.File |
DbxClient.getFile(String path,
String revision,
OutputStream target)
Retrieves a file's content and writes it to the given
OutputStream . |
static String |
DbxRequestUtil.getFirstHeader(HttpRequestor.Response response,
String name) |
static String |
DbxRequestUtil.getFirstHeaderMaybe(HttpRequestor.Response response,
String name) |
DbxEntry |
DbxClient.getMetadata(String path)
Get the file or folder metadata for a given path.
|
DbxEntry.WithChildren |
DbxClient.getMetadataWithChildren(String path)
Get the metadata for a given path; if the path refers to a folder,
get all the children's metadata as well.
|
<C> DbxEntry.WithChildrenC<C> |
DbxClient.getMetadataWithChildrenC(String path,
Collector<DbxEntry,? extends C> collector)
Same as
DbxClient.getMetadataWithChildren(java.lang.String) except instead of always returning a list of
DbxEntry objects, you specify a Collector that processes the DbxEntry
objects one by one and aggregates them however you want. |
Maybe<DbxEntry.WithChildren> |
DbxClient.getMetadataWithChildrenIfChanged(String path,
String previousFolderHash)
Get the metadata for a given path and its children if anything has
changed since the last time you got them (as determined by the value
of
DbxEntry.WithChildren.hash from the last result). |
<C> Maybe<DbxEntry.WithChildrenC<C>> |
DbxClient.getMetadataWithChildrenIfChangedC(String path,
String previousFolderHash,
Collector<DbxEntry,? extends C> collector)
Same as
DbxClient.getMetadataWithChildrenIfChanged(java.lang.String, java.lang.String) except instead of always returning a list of
DbxEntry objects, you specify a Collector that processes the DbxEntry
objects one by one and aggregates them however you want. |
DbxEntry.File |
DbxClient.getThumbnail(DbxThumbnailSize size,
DbxThumbnailFormat format,
String path,
String revision,
OutputStream target) |
abstract T |
DbxRequestUtil.ResponseHandler.handle(HttpRequestor.Response response) |
static Map<String,String> |
DbxRequestUtil.parseAsQueryString(InputStream in) |
DbxClient.Downloader |
DbxClient.startGetFile(String path,
String revision)
Retrieve a file's content and content metadata.
|
DbxClient.Downloader |
DbxClient.startGetThumbnail(DbxThumbnailSize size,
DbxThumbnailFormat format,
String path,
String revision) |
DbxClient.Uploader |
DbxClient.startUploadFile(String targetPath,
DbxWriteMode writeMode,
long numBytes)
Start an API request to upload a file to Dropbox.
|
<E extends Throwable> |
DbxClient.uploadFile(String targetPath,
DbxWriteMode writeMode,
long numBytes,
DbxStreamWriter<E> writer)
Upload file contents to Dropbox, getting contents from the given
DbxStreamWriter . |
DbxEntry.File |
DbxClient.uploadFile(String targetPath,
DbxWriteMode writeMode,
long numBytes,
InputStream contents)
A wrapper around
DbxClient.uploadFile(String, DbxWriteMode, long, DbxStreamWriter) that
lets you pass in an InputStream . |
Copyright © 2013. All rights reserved.