-type fitbitNotification struct {
- CollectionType string `json:"collectionType"`
- Date string `json:"date"`
- OwnerID string `json:"ownerId"`
- OwnerType string `json:"ownerType"`
- SubscriptionID string `json:"subscriptionId"`
-}
-
-func (n *fitbitNotification) URLValues() url.Values {
- return url.Values{
- "CollectionType": []string{n.CollectionType},
- "Date": []string{n.Date},
- "OwnerID": []string{n.OwnerID},
- "OwnerType": []string{n.OwnerType},
- "SubscriptionID": []string{n.SubscriptionID},
- }
-}
-
-func (n *fitbitNotification) URL() string {
- return fmt.Sprintf("https://api.fitbit.com/1/user/%s/%s/date/%s.json",
- n.OwnerID, n.CollectionType, n.Date)
+func googleSetupHandler(w http.ResponseWriter, r *http.Request) {
+ http.Redirect(w, r, gfit.AuthURL(), http.StatusTemporaryRedirect)