Package fitbit: Fix activity summary URL.
authorFlorian Forster <ff@octo.it>
Wed, 10 Jan 2018 21:06:55 +0000 (22:06 +0100)
committerFlorian Forster <ff@octo.it>
Wed, 10 Jan 2018 21:06:55 +0000 (22:06 +0100)
fitbit/fitbit.go

index 0f1a583..6f15027 100644 (file)
@@ -140,7 +140,7 @@ func NewClient(ctx context.Context, fitbitUserID string, u *app.User) (*Client,
 }
 
 func (c *Client) ActivitySummary(t time.Time) (*ActivitySummary, error) {
-       url := fmt.Sprintf("https://api.fitbit.com/1/user/%s/activity/date/%s.json",
+       url := fmt.Sprintf("https://api.fitbit.com/1/user/%s/activities/date/%s.json",
                c.fitbitUserID, t.Format("2006-01-02"))
 
        res, err := c.client.Get(url)