Skip to content

Commit 8dabdf4

Browse files
author
Karl Rieb
committed
ChangeLog/ReadMe: Update for 2.0.2 release.
examples: upload-file example updated to use new upload append endpoint. generator: deprecated route bug fixed.
1 parent 9473d7d commit 8dabdf4

5 files changed

Lines changed: 39 additions & 8 deletions

File tree

ChangeLog.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
---------------------------------------------
2+
2.0.2 (2016-04-28)
3+
- Update to latest API specs:
4+
- Authentication
5+
- Add token/revoke endpoint.
6+
- Account
7+
- Add disabled field to Account.
8+
- Files (DbxUserFilesRequests)
9+
- Add withIncludeDeleted(Boolean) and withIncludeHasExplicitSharedMembers(Boolean) to GetMetadataBuilder and ListFolderBuilder.
10+
- Add close argument to uploadSessionStart(..) to explicitly close an upload session.
11+
- Add uploadSessionAppendV2(..) that provides explicit session close support. uploadSessionAppend(..) is now deprecated.
12+
- Add copyReferenceGet(..) and copyReferenceSave(..) for copying files and folders.
13+
- Add getTemporaryLink(..) endpoint.
14+
- Shared links (DbxUserSharingRequests)
15+
- Add removeExpiration argument to modifySharedLinkSettings(..).
16+
- Shared folders
17+
- Add FolderAction.LEAVE_A_COPY.
18+
- Add SharedFolderMetadata.getTimeInvited().
19+
- Add IS_OSX_PACKAGE and INSIDE_OSX_PACKAGE to SharePathError. Returned when a user attempts to share an OS X package or folder inside an OS X package.
20+
- Business endpoints (DbxTeamTeamRequests)
21+
- GroupSummary.getMemberCount() is now optional and returns a Long.
22+
- devicesListTeamDevices(..) is now deprecated by devicesListMemberDevices(..).
23+
- linkedAppsListTeamLinkedApps(..) is now deprecated by linkedAppsListMembersLinkedApps(..).
24+
- Add returnMembers argument to groupsMembersSetAccessType(..).
25+
- Fix JsonDateReaderTest failures for non-English systems.
26+
- Update ProGuard rules to fix handling of embedded trusted SSL certs resource.
127
- Fix tutorial example to list folder entries for folders with many files.
228

329
---------------------------------------------

ReadMe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ If you're using Maven, then edit your project's "pom.xml" and add this to the `<
1414
<dependency>
1515
<groupId>com.dropbox.core</groupId>
1616
<artifactId>dropbox-core-sdk</artifactId>
17-
<version>2.0.1</version>
17+
<version>2.0.2</version>
1818
</dependency>
1919
```
2020

@@ -23,7 +23,7 @@ If you are using Gradle, then edit your project's "build.gradle" and add this to
2323
```groovy
2424
dependencies {
2525
// ...
26-
compile 'com.dropbox.core:dropbox-core-sdk:2.0.1'
26+
compile 'com.dropbox.core:dropbox-core-sdk:2.0.2'
2727
}
2828
```
2929

examples/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
<source>8</source>
6565
<target>8</target>
6666
<encoding>UTF-8</encoding>
67+
<showDeprecation>true</showDeprecation>
6768
</configuration>
6869
</plugin>
6970
</plugins>

examples/upload-file/src/main/java/com/dropbox/core/examples/upload_file/Main.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,19 @@ private static void chunkedUploadFile(DbxClientV2 dbxClient, File localFile, Str
116116
printProgress(uploaded, size);
117117
}
118118

119+
UploadSessionCursor cursor = new UploadSessionCursor(sessionId, uploaded);
120+
119121
// (2) Append
120122
while ((size - uploaded) > CHUNKED_UPLOAD_CHUNK_SIZE) {
121-
dbxClient.files().uploadSessionAppend(sessionId, uploaded)
123+
dbxClient.files().uploadSessionAppendV2(cursor)
122124
.uploadAndFinish(in, CHUNKED_UPLOAD_CHUNK_SIZE);
123125
uploaded += CHUNKED_UPLOAD_CHUNK_SIZE;
124126
printProgress(uploaded, size);
127+
cursor = new UploadSessionCursor(sessionId, uploaded);
125128
}
126129

127130
// (3) Finish
128131
long remaining = size - uploaded;
129-
UploadSessionCursor cursor = new UploadSessionCursor(sessionId, uploaded);
130132
CommitInfo commitInfo = CommitInfo.newBuilder(dropboxPath)
131133
.withMode(WriteMode.ADD)
132134
.withClientModified(new Date(localFile.lastModified()))

generator/java.babelg.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ def has_optional_arg_fields(self):
945945

946946
@property
947947
def is_deprecated(self):
948-
return self.as_babel.deprecrated is not None
948+
return self.as_babel.deprecated is not None
949949

950950
@property
951951
def deprecated_by(self):
@@ -1708,10 +1708,12 @@ def generate_javadoc(self, doc, context=None, fields=(), params=(), returns=None
17081708

17091709
# look at context to determine if we are deprecated, unless explicitly specified
17101710
if deprecated is None and context is not None:
1711-
if hasattr(context, "is_deprecated"):
1711+
if isinstance(context, RouteWrapper):
1712+
deprecated = context.deprecated_by or context.is_deprecated
1713+
elif isinstance(context, FieldWrapper):
17121714
deprecated = context.is_deprecated
1713-
if deprecated and hasattr(context, "deprecated_by") and context.deprecated_by is not None:
1714-
deprecated = context.deprecated_by
1715+
else:
1716+
assert not hasattr(context, "is_deprecated"), repr(context)
17151717

17161718
params_doc = self.javadoc_params(fields, allow_defaults=allow_defaults)
17171719
params_doc.update(self._translate_ordered_collection(params, context))

0 commit comments

Comments
 (0)