Skip to content

Commit

Permalink
Update api specs and remove INSTANCE in OkHttp3Requestor for major ve…
Browse files Browse the repository at this point in the history
…rsion update.
  • Loading branch information
jiuyangzhao committed Mar 17, 2017
1 parent 43efdce commit 3719cfa
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 18 deletions.
75 changes: 75 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,78 @@
3.0.0 (2017-03-17)
---------------------------------------------
- Breaking changes:
- static INSTANCE is removed from OkHttp3Requestor and OkHttpRequestor
- copyBatch/moveBatch now takes RelocationBatchArg instead of List<RelocationPath>
- Update to latest API specs:
- Auth namespace:
- Added user_suspended to AuthError.
- Added TokenFromOAuth1Arg, TokenFromOAuth1Result and TokenFromOAuth1Error.
- Added token/from_oauth1 rote.
- Added AccessError and PaperAccessError.
- Added InvalidAccountTypeError.
- Files namespace:
- Added PathRootError.
- Added invalid_path_root to LookupError.
- Added autorename to CreateFolderArg.
- Added DeleteBatchArg, DeleteBatchResultEntry, DeleteResult, DeleteBatchResult, DeleteBatchError, DeleteBatchJobStatus and DeleteBatchLaunch.
- Added delete_batch and delete_batch/check routes.
- Added RelocationPath.
- Added to allow_shared_folder and autorename to RelocationArg.
- Added RelocationBatchArg, RelocationBatchResult, RelocationBatchJobStatus, RelocationResult,RelocationBatchError and RelocationBatchLaunch.
- Added copy_batch and copy_batch/check routes.
- Added move_batch and move_batch/check routes.
- Sharing namespace: - Changed PathOrId validation pattern.
- Changed path in ShareFolderArg from type files.Path to files.WritePath.
- Added contains_app_folder, contains_team_folder and invalid_path_root to ShareFolderArg.
- Added UploadSessionFinishBatchLaunch and made it new return type for upload_session/finish_batch.
- Added Sha256HexHash alias.
- Added content_hash to FileMetadata.
- Added upload_api_rate_limit feature attribute to upload_session/start, upload_session/append_v2, upload_session/append, upload, upload_session/finish_batch.
- Added duplicated_or_nested_paths to RelocationError and removed from RelocationBatchError.
- Added properties api_group attribute and is_preview attribute to properties/*.
- Added disable_viewer_info and enable_viewer_info to CommitInfoWithProperties.
- Added link_metadata to SharedFileMetadata.
- Added ViewerInfoPolicy union.
- Added no_explicit_access to MemberSelector.
- Deprecated change_file_member_access.
- Added update_file_member route and UpdateFileMemberArgs struct.
- Sharing namespace:
- Added unsupported_link_type to SharedLinkError.
- Added is_member to GroupInfo.
- Added too_many_files to UnshareFolderError.
- Added no_explicit_access to RelinquishFolderMembershipError.
- Added viewer_info_policy, disable_viewer_info, enable_viewer_info to FolderPolicy.
- Added team, is_inside_team_folder, path_lower to SharedLinkPolicy.
- Added link_metadata, policy, shared_folder_id, time_invited to SharedFolderMetadata.
- Added actions, link_settings, viewer_info_policy to ShareFolderArg and removed default values from policies in ShareFolderArg.
- Added viewer_info_policy, link_settings to UpdateFolderPolicyArg.
- Stone Cfg namespace:
- Changed validation pattern for owner in Route.
- Added feature route attribute.
- Added attribute api_group, is_preview.
- Removed attributes alpha_group, beta_group.
- Team namespace:
- Added team_license_limit to MembersRecoverError.
- Removed beta_group attribute from members/recover.
- Added group_name_already_used and group_name_invalid to GroupUpdateError.
- Added joined_on, persistent_id to MemberProfile.
- Added team_member_id, external_id to UserSelectorArg.
- Added TeamMemberId, MemberExternalId, GroupExternalId, ResellerId aliases.
- Added company_managed, system_managed to GroupManagementType.
- Added TimeRange.
- Added archive_in_progress to TeamFolderStatus, TeamFolderIdArg.
- Added BaseTeamFolderError.
- TeamFolderRenameError, TeamFolderArchiveError, BaseTeamFolderError, TeamFolderPermanentlyDeleteError now extend BaseTeamFolderError.
- Added folder_name_reserved to TeamFolderRenameError.
- Added GroupSelectorWithTeamGroupError.
- GroupMemberSelectorError, GroupMembersSelectorError now extends GroupSelectorWithTeamGroupError.
- Removed alpha from alpha/groups/*.
- GroupDeleteError, GroupUpdateError, GroupMembersAddError now extends GroupSelectorWithTeamGroupError.
- Added members_not_in_team, users_not_found to GroupMembersAddError.
- Added joined_on to TeamMemberProfile.
- Added member_persistent_id, duplicate_member_persistent_id, persistent_id_disabled, new_persistent_id, persistent_id_disabled, persistent_id_used_by_other_user to MemberSelectorError.
- Fix the bug that when InputStream throws IOException, DbxUploader#uploadAndFinish() throws NetworkIOException

2.1.1 (2016-08-01)
---------------------------------------------
- Fix "Required field ... missing" deserialization bug caused by certain backwards-compatible response changes from the server.
Expand Down
6 changes: 3 additions & 3 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A Java library to access [Dropbox's HTTP-based Core API v2](https://www.dropbox.

License: [MIT](License.txt)

[Javadoc.](https://dropbox.github.io/dropbox-sdk-java/api-docs/v2.1.x/)
[Javadoc.](https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.0/)

## Setup

Expand All @@ -14,7 +14,7 @@ If you're using Maven, then edit your project's "pom.xml" and add this to the `<
<dependency>
<groupId>com.dropbox.core</groupId>
<artifactId>dropbox-core-sdk</artifactId>
<version>2.1.2</version>
<version>3.0.0</version>
</dependency>
```

Expand All @@ -23,7 +23,7 @@ If you are using Gradle, then edit your project's "build.gradle" and add this to
```groovy
dependencies {
// ...
compile 'com.dropbox.core:dropbox-core-sdk:2.1.2'
compile 'com.dropbox.core:dropbox-core-sdk:3.0.0'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class DropboxClientFactory {
public static void init(String accessToken) {
if (sDbxClient == null) {
DbxRequestConfig requestConfig = DbxRequestConfig.newBuilder("examples-v2-demo")
.withHttpRequestor(OkHttp3Requestor.INSTANCE)
.withHttpRequestor(new OkHttp3Requestor(OkHttp3Requestor.defaultOkHttpClient()))
.build();

sDbxClient = new DbxClientV2(requestConfig, accessToken);
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/com/dropbox/core/http/OkHttp3Requestor.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@
* v3</a>. You can only use this if your project includes the OkHttp v3 library.
*/
public class OkHttp3Requestor extends HttpRequestor {
/**
* @deprecated This field will be removed. Instead, do:
* {@code new OkHttp3Requestor(OkHttp3Requestor.defaultOkHttpClient())}
*/
@Deprecated
public static final OkHttp3Requestor INSTANCE = new OkHttp3Requestor(defaultOkHttpClient());

/**
* Returns an {@code OkHttpClient} instance with the default settings for this SDK.
*/
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/com/dropbox/core/http/OkHttpRequestor.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@
* </p>
*/
public class OkHttpRequestor extends HttpRequestor {
/**
* @deprecated This field will be removed. Instead, do:
* {@code new OkHttpRequestor(OkHttpRequestor.defaultOkHttpClient())}
*/
@Deprecated
public static final OkHttpRequestor INSTANCE = new OkHttpRequestor(defaultOkHttpClient());

/**
* Returns an {@code OkHttpClient} instance with the default settings for this SDK.
*/
Expand Down

0 comments on commit 3719cfa

Please sign in to comment.