Documentation
¶
Index ¶
- Constants
- type Client
- func (gc *Client) Auth(username, password string) error
- func (gc *Client) DeleteMessage(messageId int) error
- func (gc *Client) HeartRateByDate(date time.Time) (HeartRate, error)
- func (gc *Client) MessageReceived(messageId int) error
- func (gc *Client) Messages() ([]Message, error)
- func (gc *Client) SleepByDate(date time.Time) (Sleep, error)
- func (gc *Client) UploadActivity(path string) (Upload, error)
- func (gc *Client) UserProfile() (UserProfile, error)
- func (gc *Client) WeightByDate(date time.Time) ([]Weight, error)
- type HeartRate
- type HeartRateValue
- type Message
- type Metadata
- type Queue
- type Result
- type ResultMessage
- type Sleep
- type Upload
- type UserProfile
- type Weight
Constants ¶
View Source
const (
GARMIN_CONNECT_URL = "https://connect.garmin.com"
)
View Source
const (
WORKOUT_FILE_TYPE = "FIT_TYPE_5"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DeleteMessage ¶
func (*Client) HeartRateByDate ¶
func (*Client) MessageReceived ¶
func (*Client) UserProfile ¶
func (gc *Client) UserProfile() (UserProfile, error)
type HeartRate ¶
type HeartRate struct {
Min int `json:"minHeartRate"`
Max int `json:"maxHeartRate"`
Values []HeartRateValue `json:"heartRateValues"`
}
type HeartRateValue ¶
type HeartRateValue [2]int
type Message ¶
type Message struct {
Id int `json:"messageId"`
Type string `json:"messageType"`
Status string `json:"messageStatus"`
DeviceId int `json:"deviceId"`
DeviceName string `json:"deviceName"`
ApplicationKey string `json:"applicationKey"`
FirmwareVersion string `json:"FirmwareVersion"`
WifiSetup bool `json:"wifiSetup"`
DeviceXmlDataType string `json:"deviceXmlDataType"`
Metadata Metadata `json:"metadata"`
}
type Metadata ¶
type Metadata struct {
Filetype string `json:"fileType"`
MessageUrl string `json:"messageUrl"`
Absolute bool `json:"absolute"`
MessageName string `json:"messageName"`
GroupName string `json:"groupName"`
Priority int `json:"priority"`
Id int `json:"metaDataId"`
AppDetails string `json:"appDetails"`
}
type Result ¶
type Result struct {
InternalId int `json:"internalId"`
ExternalId string `json:"externalId"`
Messages []ResultMessage `json:"messages"`
}
type ResultMessage ¶
type Upload ¶
type Upload struct {
DetailedImportResult struct {
UploadId int `json:"uploadId"`
Owner int `json:"owner"`
FileSize int `json;"fileSize"`
ProcessingTime int `json:"processingTime"`
CreationDate string `json:"creationDate"`
IpAddress string `json:"ipAddress"`
FileName string `json:"fileName"`
Report struct {
Class string `json:"@class"`
CreatedOn string `json:"createdOn"`
UserProfileId int `json:"userProfileId"`
Children []interface{} `json:"children"`
Entries []interface{} `json:"entries"`
}
Successes []Result `json:"successes"`
Failures []Result `json:"failures"`
} `json:"detailedImportResult"`
}
type UserProfile ¶
type UserProfile struct {
DisplayName string `json:"displayName"`
}
Click to show internal directories.
Click to hide internal directories.