Versions in this module Expand all Collapse all v1 v1.3.1 Feb 12, 2022 v1.3.0 Feb 12, 2022 Changes in this version type User + OauthToken *oauth2.Token v1.2.0 Feb 12, 2022 Changes in this version type Client + func (c *Client) NewUserFromAccessToken(ctx context.Context, accessToken string, tokenExpiry time.Time, ...) (*User, error) v1.1.1 Feb 12, 2022 Changes in this version + var Oauth2Endpoint = oauth2.Endpoint + func GetFieldName(s interface{}, name string) string + type ActivitiesMeasuresResp struct + Body *ActivitiesMeasuresRespBody + Error string + Path string + RawResponse []byte + Status status.Status + type ActivitiesMeasuresRespBody struct + Activities []Activity + Calories *float64 + Date *string + Distance *float64 + Elevation *float64 + Intense *int + Moderate *int + More bool + Offset int + ParsedDate *time.Time + SingleValue bool + Soft *int + Steps *float64 + TimeZone *string + type Activity struct + Calories float64 + Date string + Distance float64 + Elevation float64 + Intense int + Moderate int + ParsedDate *time.Time + Soft int + Steps float64 + TimeZone string + type ActivityMeasuresQueryParam struct + DisableDateParse bool + EndDateYMD *time.Time + LasteUpdate *time.Time + Offset *int + StartDateYMD *time.Time + UserID int + type BodyMeasureGroupResp struct + Attrib int + Category int + Date int64 + GrpID int + Measures []BodyMeasuresMeasure + type BodyMeasureRespBody struct + MeasureGrps []BodyMeasureGroupResp + More int + Timezone string + Updatetime int64 + type BodyMeasures struct + BodyTemperatures []BodyTemperature + BoneMasses []BoneMass + DiastolicBloodPressures []DiastolicBloodPressure + FatFreeMass []FatFreeMass + FatMassWeights []FatMassWeight + FatRatios []FatRatio + HeartPulses []HeartPulse + Heights []Height + Hydration []Hydration + MuscleMasses []MuscleMass + PulseWaveVelocity []PulseWaveVelocity + SP02Percents []SP02Percent + SkinTemperatures []SkinTemperature + SystolicBloodPressures []SystolicBloodPressure + Temperatures []Temperature + Weights []Weight + type BodyMeasuresMeasure struct + Type meastype.MeasType + Unit int + Value int + type BodyMeasuresQueryParams struct + Category *int + DevType *devtype.DevType + EndDate *time.Time + LastUpdate *time.Time + Limit *int + MeasType *meastype.MeasType + Offset *int + ParseResponse bool + StartDate *time.Time + UserID int + type BodyMeasuresResp struct + Body *BodyMeasureRespBody + Error string + ParsedResponse *BodyMeasures + Path string + RawResponse []byte + Status status.Status + func (rm BodyMeasuresResp) ParseData() *BodyMeasures + type BodyTemperature struct + Attrib int + Category int + Celcius float64 + Date time.Time + type BoneMass struct + Attrib int + Category int + Date time.Time + Mass float64 + type Client struct + IncludePath bool + OAuth2Config *oauth2.Config + Rand Rand + SaveRawResponse bool + Timeout time.Duration + func NewClient(clientID string, clientSecret string, redirectURL string) Client + func (c *Client) AuthCodeURL() (url string, state string, err error) + func (c *Client) GenerateAccessToken(ctx context.Context, code string) (*oauth2.Token, error) + func (c *Client) NewUserFromAuthCode(ctx context.Context, code string) (*User, error) + func (c *Client) NewUserFromRefreshToken(ctx context.Context, refreshToken string) (*User, error) + func (c *Client) SetScope(scopes ...string) + type CreateNotificationParam struct + Appli int + CallbackURL url.URL + Comment string + type CreateNotificationResp struct + Error string + Path string + RawResponse []byte + Status status.Status + type DiastolicBloodPressure struct + Attrib int + Category int + Date time.Time + MmHg float64 + type FatFreeMass struct + Attrib int + Category int + Date time.Time + Kgs float64 + type FatMassWeight struct + Attrib int + Category int + Date time.Time + Kgs float64 + type FatRatio struct + Attrib int + Category int + Date time.Time + Ratio float64 + type HeartPulse struct + Attrib int + BPM float64 + Category int + Date time.Time + type Height struct + Attrib int + Category int + Date time.Time + Meters float64 + type Hydration struct + Attrib int + Category int + Date time.Time + Hydration float64 + type IntraDayActivity struct + Calories *float64 + Distance *float64 + Duration *int + Elevation *float64 + PoolLap *int + Steps *int + type IntradayActivityQueryParam struct + EndDate *time.Time + StartDate *time.Time + UserID int + type IntradayActivityResp struct + Body *IntradayActivityRespBody + Error string + Path string + RawResponse []byte + Status status.Status + type IntradayActivityRespBody struct + Series map[int64]IntraDayActivity + type ListNotificationsParam struct + Appli *int + type ListNotificationsResp struct + Body *ListNotificationsRespBody + Error string + Path string + RawResponse []byte + Status status.Status + type ListNotificationsRespBody struct + Profiles []NotificationProfile + type MuscleMass struct + Attrib int + Category int + Date time.Time + Mass float64 + type NotificationInfoParam struct + Appli *int + CallbackURL url.URL + type NotificationInfoResp struct + Body *NotificationInfoRespBody + Error string + Path string + RawResponse []byte + Status status.Status + type NotificationInfoRespBody struct + Comment string + Expires int64 + ExpiresParsed *time.Time + type NotificationProfile struct + Comment string + Expires int64 + ExpiresParsed *time.Time + type PulseWaveVelocity struct + Attrib int + Category int + Date time.Time + Velocity float64 + type Rand func() (string, error) + type RevokeNotificationParam struct + Appli *int + CallbackURL url.URL + type RevokeNotificationResp struct + Error string + Path string + RawResponse []byte + Status status.Status + type SP02Percent struct + Attrib int + Category int + Date time.Time + Percentage float64 + type Scope string + const ScopeUserActivity + const ScopeUserInfo + const ScopeUserMetrics + type SkinTemperature struct + Attrib int + Category int + Celcius float64 + Date time.Time + type SleepMeasure struct + EndDate int64 + EndDateParsed *time.Time + StartDate int64 + StartDateParsed *time.Time + State sleepstate.SleepState + type SleepMeasuresQueryParam struct + EndDate time.Time + StartDate time.Time + UserID int + type SleepMeasuresResp struct + Body *SleepMeasuresRespBody + Error string + Path string + RawResponse []byte + Status status.Status + type SleepMeasuresRespBody struct + Model int + Series []SleepMeasure + type SleepSummary struct + Data SleepSummaryData + Date string + DateParsed *time.Time + EndDate int64 + EndDateParsed *time.Time + ID int64 + Model int + Modified int64 + StartDate int64 + StartDateParsed *time.Time + TimeZone string + type SleepSummaryBody struct + More bool + Series []SleepSummary + type SleepSummaryData struct + DeepSleepDuration int + DurationToSleep int + DurationToWakeUp *int + LightSleepDuration int + REMSleepDuration *int + WakeUpCount int + WakeUpDuration int + type SleepSummaryQueryParam struct + EndDateYMD *time.Time + LastUpdate *int64 + Offset *int + StartDateYMD *time.Time + type SleepSummaryResp struct + Body *SleepSummaryBody + Error string + Path string + RawResponse []byte + Status status.Status + type SystolicBloodPressure struct + Attrib int + Category int + Date time.Time + MmHg float64 + type Temperature struct + Attrib int + Category int + Celcius float64 + Date time.Time + type User struct + HTTPClient *http.Client + RefreshToken string + func (u *User) CreateNotification(params *CreateNotificationParam) (CreateNotificationResp, error) + func (u *User) CreateNotificationCtx(ctx context.Context, params *CreateNotificationParam) (CreateNotificationResp, error) + func (u *User) GetActivityMeasures(params *ActivityMeasuresQueryParam) (ActivitiesMeasuresResp, error) + func (u *User) GetActivityMeasuresCtx(ctx context.Context, params *ActivityMeasuresQueryParam) (ActivitiesMeasuresResp, error) + func (u *User) GetBodyMeasures(params *BodyMeasuresQueryParams) (BodyMeasuresResp, error) + func (u *User) GetBodyMeasuresCtx(ctx context.Context, params *BodyMeasuresQueryParams) (BodyMeasuresResp, error) + func (u *User) GetIntradayActivity(params *IntradayActivityQueryParam) (IntradayActivityResp, error) + func (u *User) GetIntradayActivityCtx(ctx context.Context, params *IntradayActivityQueryParam) (IntradayActivityResp, error) + func (u *User) GetNotificationInformation(params *NotificationInfoParam) (NotificationInfoResp, error) + func (u *User) GetNotificationInformationCtx(ctx context.Context, params *NotificationInfoParam) (NotificationInfoResp, error) + func (u *User) GetSleepMeasures(params *SleepMeasuresQueryParam) (SleepMeasuresResp, error) + func (u *User) GetSleepMeasuresCtx(ctx context.Context, params *SleepMeasuresQueryParam) (SleepMeasuresResp, error) + func (u *User) GetSleepSummary(params *SleepSummaryQueryParam) (SleepSummaryResp, error) + func (u *User) GetSleepSummaryCtx(ctx context.Context, params *SleepSummaryQueryParam) (SleepSummaryResp, error) + func (u *User) GetWorkouts(params *WorkoutsQueryParam) (WorkoutResponse, error) + func (u *User) GetWorkoutsCtx(ctx context.Context, params *WorkoutsQueryParam) (WorkoutResponse, error) + func (u *User) ListNotifications(params *ListNotificationsParam) (ListNotificationsResp, error) + func (u *User) ListNotificationsCtx(ctx context.Context, params *ListNotificationsParam) (ListNotificationsResp, error) + func (u *User) RevokeNotification(params *RevokeNotificationParam) (RevokeNotificationResp, error) + func (u *User) RevokeNotificationCtx(ctx context.Context, params *RevokeNotificationParam) (RevokeNotificationResp, error) + func (u *User) RoundTrip(req *http.Request) (resp *http.Response, err error) + func (u *User) Token() (*oauth2.Token, error) + func (u *User) TokenContext(ctx context.Context) (*oauth2.Token, error) + type UserId string + func (u *UserId) UnmarshalJSON(data []byte) error + type Weight struct + Attrib int + Category int + Date time.Time + Kgs float64 + type WithingsRoundTripper http.Client + func (w *WithingsRoundTripper) RoundTrip(request *http.Request) (*http.Response, error) + type Workout struct + Attrib int + Category *workouttype.WorkoutType + Data map[string]float64 + Date string + DateParsed *time.Time + EndDate int64 + EndDateParsed *time.Time + ID int + Model int + Modified int + StartDate int64 + StartDateParsed *time.Time + TimeZone string + UserID int + type WorkoutRespBody struct + Series []Workout + type WorkoutResponse struct + Body *WorkoutRespBody + Error string + Path string + RawResponse []byte + Status status.Status + type WorkoutsQueryParam struct + EndDateYMD *time.Time + StartDateYMD *time.Time + UserID int