projects
/
kraftakt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e45460a
)
Package gfit: Implement Client.DeleteToken().
author
Florian Forster
<ff@octo.it>
Tue, 30 Jan 2018 08:40:36 +0000
(09:40 +0100)
committer
Florian Forster
<ff@octo.it>
Tue, 30 Jan 2018 08:40:36 +0000
(09:40 +0100)
gfit/gfit.go
patch
|
blob
|
history
diff --git
a/gfit/gfit.go
b/gfit/gfit.go
index
df7bd2c
..
610ee5c
100644
(file)
--- a/
gfit/gfit.go
+++ b/
gfit/gfit.go
@@
-70,6
+70,7
@@
func ParseToken(ctx context.Context, r *http.Request, u *app.User) error {
type Client struct {
*fitness.Service
+ appUser *app.User
}
func NewClient(ctx context.Context, u *app.User) (*Client, error) {
@@
-85,9
+86,14
@@
func NewClient(ctx context.Context, u *app.User) (*Client, error) {
return &Client{
Service: service,
+ appUser: u,
}, nil
}
+func (c *Client) DeleteToken(ctx context.Context) error {
+ return c.appUser.DeleteToken(ctx, "Google")
+}
+
func DataStreamID(dataSource *fitness.DataSource) string {
fields := []string{
dataSource.Type,