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

This commit is contained in:
Nick Craig-Wood
2017-12-07 22:14:36 +00:00
parent e00616b016
commit 5061aaaf46
22 changed files with 1394 additions and 462 deletions
@@ -15,7 +15,7 @@ stone -v -a :all go_types.stoneg.py "$gen_dir" "$spec_dir"/*.stone
stone -v -a :all go_client.stoneg.py "$gen_dir" "$spec_dir"/*.stone
# Update SDK and API spec versions
sdk_version=${1:-"3.0.0"}
sdk_version=${1:-"4.0.0"}
pushd ${spec_dir}
spec_version=$(git rev-parse --short HEAD)
popd
@@ -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')