oura

package
v0.0.0-...-5eac7db Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: MIT Imports: 8 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 {
	AccessToken string
	Logger      *logger.Logger
}

func (*Client) ReadinessOneDay

func (c *Client) ReadinessOneDay(date string) (res *ReadinessOneDay, err error)

func (*Client) SleepOneDay

func (c *Client) SleepOneDay(date string) (res *SleepOneDay, err error)

func (*Client) UserInfo

func (c *Client) UserInfo() (res *UserInfo, err error)

type Readiness

type Readiness struct {
	Readiness []*ReadinessOneDay `json:"readiness"`
}

type ReadinessOneDay

type ReadinessOneDay struct {
	SummaryDate          string `json:"summary_date"`
	PeriodID             int    `json:"period_id"`
	Score                int    `json:"score"`
	ScorePreviousNight   int    `json:"score_previous_night"`
	ScoreSleepBalance    int    `json:"score_sleep_balance"`
	ScorePreviousDay     int    `json:"score_previous_day"`
	ScoreActivityBalance int    `json:"score_activity_balance"`
	ScoreRestingHR       int    `json:"socre_resting_hr"`
	ScoreHRVBalance      int    `json:"score_hrv_balance"`
	ScoreRecoveryIndex   int    `json:"score_recovery_index"`
	ScoreTemperature     int    `json:"score_temperature"`
	RestModeState        int    `json:"score_rest_mode_state"`
}

type Sleep

type Sleep struct {
	Sleep []*SleepOneDay `json:"sleep"`
}

type SleepOneDay

type SleepOneDay struct {
	SummaryDate       string    `json:"summary_date"`
	PeriodID          int       `json:"period_id"`
	IsLongest         int       `json:"is_longest"`
	Timezone          int       `json:"timezone"`
	BedtimeStart      time.Time `json:"bedtime_start"`
	BedtimeEnd        time.Time `json:"bedtime_end"`
	Score             int       `json:"score"`
	ScoreTotal        int       `json:"score_total"`
	ScoreDisturbances int       `json:"score_disturbances"`
	ScoreEfficiency   int       `json:"score_efficiency"`
	ScoreLatency      int       `json:"score_latency"`
	ScoreRem          int       `json:"score_rem"`
	ScoreDeep         int       `json:"score_deep"`
	ScoreAlignment    int       `json:"score_alignment"`
	Total             int       `json:"total"`    // duration - awake
	Duration          int       `json:"duration"` // from bed-in to bed-out
	Awake             int       `json:"awake"`
	Light             int       `json:"light"`
	Rem               int       `json:"rem"`
	Deep              int       `json:"deep"`
	OnsetLatency      int       `json:"onset_latency"`
	Restless          int       `json:"restless"`
	Efficiency        int       `json:"efficiency"`
	MidpointTime      int       `json:"midpoint_time"`
	HRLowest          float32   `json:"hr_lowest"`
	HRAverage         float32   `json:"hr_average"`
	Rmssd             int       `json:"rmssd"`
	BreathAverage     float32   `json:"breath_average"`
	TemperatureDelta  float32   `json:"temperature_delta"`
	Hypnogram5min     string    `json:"hypnogram_5min"`
	HR5min            []int     `json:"hr_5min"`
	Rmssd5min         []int     `json:"rmssd_5min"`
}

type UserInfo

type UserInfo struct {
	Age    int     `json:"age"`
	Weight float32 `json:"weight"`
	Gender string  `json:"gender"`
	Email  string  `json:"email"`
}

Jump to

Keyboard shortcuts

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