Skip to content

Commit

Permalink
Merge pull request #80 from dropbox/new-release
Browse files Browse the repository at this point in the history
Add v6 to module path
  • Loading branch information
Rajat Goel authored May 11, 2021
2 parents 88524a5 + 79b0eb4 commit 54dda64
Show file tree
Hide file tree
Showing 37 changed files with 79 additions and 76 deletions.
9 changes: 6 additions & 3 deletions generator/generate-sdk.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
#! /usr/bin/env bash
set -euo pipefail

if [[ $# -gt 1 ]]; then
if [[ $# -ne 1 ]]; then
echo "$0: Not expecting more than one command-line argument, got $#." 1>&2
exit 1
fi

version=$(echo $1 | cut -f1 -d'.')
loc=$(realpath -e $0)
base_dir=$(dirname "$loc")
spec_dir="$base_dir/dropbox-api-spec"
gen_dir=$(dirname ${base_dir})/dropbox
gen_dir=$(dirname ${base_dir})/v$version/dropbox

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:-"5.0.0"}
sdk_version=${1}
pushd ${spec_dir}
spec_version=$(git rev-parse --short HEAD)
popd

sed -i.bak -e "s/UNKNOWN SDK VERSION/${sdk_version}/" \
-e "s/UNKNOWN SPEC VERSION/${spec_version}/" ${gen_dir}/sdk.go
rm ${gen_dir}/sdk.go.bak
pushd ${gen_dir}
goimports -l -w ${gen_dir}
popd
4 changes: 2 additions & 2 deletions dropbox/account/client.go → v6/dropbox/account/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"io/ioutil"
"net/http"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
)

// Client interface describes all routes in this namespace
Expand Down
2 changes: 1 addition & 1 deletion dropbox/account/types.go → v6/dropbox/account/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package account
import (
"encoding/json"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)

// PhotoSourceArg : has no documentation (yet)
Expand Down
2 changes: 1 addition & 1 deletion dropbox/async/types.go → v6/dropbox/async/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package async
import (
"encoding/json"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)

// LaunchResultBase : Result returned by methods that launch an asynchronous
Expand Down
2 changes: 1 addition & 1 deletion dropbox/auth/client.go → v6/dropbox/auth/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"io/ioutil"
"net/http"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)

// Client interface describes all routes in this namespace
Expand Down
2 changes: 1 addition & 1 deletion dropbox/auth/sdk.go → v6/dropbox/auth/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"strconv"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)

// AuthAPIError wraps AuthError
Expand Down
2 changes: 1 addition & 1 deletion dropbox/auth/types.go → v6/dropbox/auth/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package auth
import (
"encoding/json"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)

// AccessError : Error occurred because the account doesn't have permission to
Expand Down
4 changes: 2 additions & 2 deletions dropbox/check/client.go → v6/dropbox/check/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"io/ioutil"
"net/http"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
)

// Client interface describes all routes in this namespace
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dropbox/common/types.go → v6/dropbox/common/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package common
import (
"encoding/json"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)

// PathRoot : has no documentation (yet)
Expand Down
4 changes: 2 additions & 2 deletions dropbox/contacts/client.go → v6/dropbox/contacts/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"io/ioutil"
"net/http"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
)

// Client interface describes all routes in this namespace
Expand Down
2 changes: 1 addition & 1 deletion dropbox/contacts/types.go → v6/dropbox/contacts/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package contacts
import (
"encoding/json"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)

// DeleteManualContactsArg : has no documentation (yet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"io/ioutil"
"net/http"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
)

// Client interface describes all routes in this namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ package file_properties
import (
"encoding/json"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)

// AddPropertiesArg : has no documentation (yet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"io/ioutil"
"net/http"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
)

// Client interface describes all routes in this namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"encoding/json"
"time"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)

// GeneralFileRequestsError : There is an error accessing the file requests
Expand Down
8 changes: 4 additions & 4 deletions dropbox/files/client.go → v6/dropbox/files/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import (
"log"
"net/http"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/async"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/file_properties"
)

// Client interface describes all routes in this namespace
Expand Down
4 changes: 2 additions & 2 deletions dropbox/files/types.go → v6/dropbox/files/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"encoding/json"
"time"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/file_properties"
)

// GetMetadataArg : has no documentation (yet)
Expand Down
4 changes: 2 additions & 2 deletions dropbox/paper/client.go → v6/dropbox/paper/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
"log"
"net/http"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
)

// Client interface describes all routes in this namespace
Expand Down
4 changes: 2 additions & 2 deletions dropbox/paper/types.go → v6/dropbox/paper/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
"encoding/json"
"time"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/sharing"
)

// AddMember : has no documentation (yet)
Expand Down
2 changes: 1 addition & 1 deletion dropbox/sdk.go → v6/dropbox/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const (
hostAPI = "api"
hostContent = "content"
hostNotify = "notify"
sdkVersion = "5.0.0"
sdkVersion = "6.0.0"
specVersion = "85f2eff"
)

Expand Down
6 changes: 3 additions & 3 deletions dropbox/sdk_test.go → v6/dropbox/sdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
"strings"
"testing"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/users"
)

func generateURL(base string, namespace string, route string) string {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// Package seen_state : has no documentation (yet)
package seen_state

import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
import "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"

// PlatformType : Possible platforms on which a user may view content.
type PlatformType struct {
Expand Down
6 changes: 3 additions & 3 deletions dropbox/sharing/client.go → v6/dropbox/sharing/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
"log"
"net/http"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/async"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
)

// Client interface describes all routes in this namespace
Expand Down
10 changes: 5 additions & 5 deletions dropbox/sharing/types.go → v6/dropbox/sharing/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ import (
"encoding/json"
"time"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/seen_state"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/files"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/seen_state"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_common"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/users"
)

// AccessInheritance : Information about the inheritance policy of a shared
Expand Down
8 changes: 4 additions & 4 deletions dropbox/team/client.go → v6/dropbox/team/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (
"log"
"net/http"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/async"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/file_properties"
)

// Client interface describes all routes in this namespace
Expand Down
14 changes: 7 additions & 7 deletions dropbox/team/types.go → v6/dropbox/team/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ import (
"encoding/json"
"time"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/account"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/secondary_emails"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/account"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/files"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/secondary_emails"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_common"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_policies"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/users"
)

// DeviceSession : has no documentation (yet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package team_common
import (
"time"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)

// GroupManagementType : The group type determines how a group is managed.
Expand Down
4 changes: 2 additions & 2 deletions dropbox/team_log/client.go → v6/dropbox/team_log/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"io/ioutil"
"net/http"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
)

// Client interface describes all routes in this namespace
Expand Down
12 changes: 6 additions & 6 deletions dropbox/team_log/types.go → v6/dropbox/team_log/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import (
"encoding/json"
"time"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/files"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/sharing"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_common"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_policies"
)

// AccessMethodLogInfo : Indicates the method in which the action was performed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// Package team_policies : has no documentation (yet)
package team_policies

import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
import "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"

// CameraUploadsPolicyState : has no documentation (yet)
type CameraUploadsPolicyState struct {
Expand Down
4 changes: 2 additions & 2 deletions dropbox/users/client.go → v6/dropbox/users/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"io/ioutil"
"net/http"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
)

// Client interface describes all routes in this namespace
Expand Down
10 changes: 5 additions & 5 deletions dropbox/users/types.go → v6/dropbox/users/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ package users
import (
"encoding/json"

"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/common"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies"
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users_common"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/common"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_common"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_policies"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/users_common"
)

// Account : The amount of detail revealed about an account depends on the user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// the users namespace.
package users_common

import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
import "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"

// AccountType : What type of account this user has.
type AccountType struct {
Expand Down
Loading

0 comments on commit 54dda64

Please sign in to comment.