fitbit

package
v0.0.0-...-07b6571 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(secret string) (*Client, error)

func (*Client) AllWeights

func (cli *Client) AllWeights() (weights []Weight, err error)

func (*Client) TimeSeries

func (cli *Client) TimeSeries() (ts TimeSeries, err error)

func (*Client) Weights

func (cli *Client) Weights(initialDate time.Time) (weights []Weight, err error)

type TimeSeries

type TimeSeries struct {
	Entries []TimeSeriesEntry `json:"body-weight"`
}

type TimeSeriesEntry

type TimeSeriesEntry struct {
	DateTime string `json:"dateTime"`
	Value    string `json:"value"`
}

type Weight

type Weight struct {
	Bmi    float64 `json:"bmi"`
	Date   string  `json:"date"`
	Fat    float64 `json:"fat"`
	Logid  uint    `json:"logid"`
	Source string  `json:"source"`
	Time   string  `json:"time"`
	Weight float64 `json:"weight"`
}

type Weights

type Weights struct {
	Weights []Weight `json:"weight"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL