Documentation
¶
Index ¶
- type Client
- func (c *Client) AddWeights(weights []*core.Weight) error
- func (c *Client) DeleteWeight(weight *core.Weight) error
- func (c *Client) Equal(w1, w2 *core.Weight) bool
- func (c *Client) GetAllWeights() ([]*core.Weight, error)
- func (c *Client) GetFamilyID(name string) (int64, error)
- func (c *Client) GetFamilyMembers() error
- func (c *Client) GetFilterWeights(name string) ([]*core.Weight, error)
- func (c *Client) Login(username, password string) error
- func (c *Client) LoginWithToken(token string) error
- func (c *Client) Token() string
- type Record
- type RecordSummary
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 (*Client) AddWeights ¶ added in v0.3.0
func (*Client) DeleteWeight ¶ added in v0.3.0
func (*Client) GetFamilyMembers ¶
func (*Client) GetFilterWeights ¶ added in v0.2.0
func (*Client) LoginWithToken ¶
type Record ¶ added in v0.3.0
type Record struct {
DataSource int `json:"dataSource"` // 1 = WEIGHT
DeviceId string `json:"deviceId"` // uppercase mac without colons
DeviceSource int `json:"deviceSource"` // 102
GeneratedTime int64 `json:"generatedTime"` // unix
MemberId string `json:"memberId"` // -1 for main user
UserId string `json:"userId"`
WeightType int `json:"weightType"` // 0 - add, 1 - change or delete?
Summary RecordSummary `json:"summary"`
}
type RecordSummary ¶ added in v0.3.0
type RecordSummary struct {
Weight float32 `json:"weight"`
Height float32 `json:"height,omitempty"`
BMI float32 `json:"bmi,omitempty"`
FatRate float32 `json:"fatRate,omitempty"`
BodyWaterRate float32 `json:"bodyWaterRate,omitempty"`
BoneMass float32 `json:"boneMass,omitempty"`
Metabolism float32 `json:"metabolism,omitempty"`
MuscleRate float32 `json:"muscleRate,omitempty"`
MuscleAge int `json:"muscleAge,omitempty"`
ProteinRatio float32 `json:"proteinRatio,omitempty"`
StandBodyWeight float32 `json:"standBodyWeight,omitempty"`
VisceralFat float32 `json:"visceralFat,omitempty"`
Impedance int `json:"impedance,omitempty"`
EncryptImpedance string `json:"encryptImpedance,omitempty"`
BodyScore int `json:"bodyScore,omitempty"`
BodyStyle int `json:"bodyStyle,omitempty"`
DeviceType int `json:"deviceType"` // 1 - WEIGHT
Source int `json:"source"` // 1 - without Age, BodyBalanceScore, OneFootMeasureTime, SyncHealth
}
Click to show internal directories.
Click to hide internal directories.