We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03c2c25 commit 5fd5606Copy full SHA for 5fd5606
1 file changed
examples/dropbox/dropbox.go
@@ -2,6 +2,7 @@ package main
2
3
import (
4
"context"
5
+ "encoding/json"
6
"fmt"
7
"github.com/Matrix86/cloudwatcher"
8
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
@@ -10,9 +11,9 @@ import (
10
11
)
12
13
const (
- ClientId = "ZZZZZZ"
14
- ClientSecret = "YYYYYY"
15
- Token = "XXXXXX"
+ ClientId = ""
+ ClientSecret = ""
16
+ Token = ""
17
18
19
func getAuthCode() (string, error) {
@@ -37,7 +38,12 @@ func getAuthCode() (string, error) {
37
38
if err != nil {
39
return "", err
40
}
- return token.AccessToken, nil
41
+
42
+ b, err := json.Marshal(token)
43
+ if err != nil {
44
+ return "", err
45
+ }
46
+ return string(b), nil
47
48
func main() {
49
s, err := cloudwatcher.New("dropbox", "", 2*time.Second)
0 commit comments