1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-22 19:23:40 +00:00

vendor: update github.com/dropbox/dropbox-sdk-go-unofficial to fix #1806

This commit is contained in:
Nick Craig-Wood
2017-12-05 09:12:15 +00:00
parent e00616b016
commit 5061aaaf46
22 changed files with 1394 additions and 462 deletions

View File

@@ -40,7 +40,7 @@ class GoClientBackend(CodeBackend):
for route in namespace.routes:
self._generate_route(namespace, route)
self.emit('// New returns a Client implementation for this namespace')
with self.block('func New(c dropbox.Config) *apiImpl'):
with self.block('func New(c dropbox.Config) Client'):
self.emit('ctx := apiImpl(dropbox.NewContext(c))')
self.emit('return &ctx')
@@ -192,7 +192,8 @@ class GoClientBackend(CodeBackend):
out('err = apiError')
out('return')
out('var apiError dropbox.APIError')
with self.block('if resp.StatusCode == http.StatusBadRequest'):
with self.block("if resp.StatusCode == http.StatusBadRequest || "
"resp.StatusCode == http.StatusInternalServerError"):
out('apiError.ErrorSummary = string(body)')
out('err = apiError')
out('return')