mirror of
https://github.com/sstent/go-garth.git
synced 2026-02-02 12:31:53 +00:00
sync - build broken
This commit is contained in:
27
python-garmin-connect/LastUsed.go
Normal file
27
python-garmin-connect/LastUsed.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package connect
|
||||
|
||||
// LastUsed describes the last synchronization.
|
||||
type LastUsed struct {
|
||||
DeviceID int `json:"userDeviceId"`
|
||||
ProfileNumber int `json:"userProfileNumber"`
|
||||
ApplicationNumber int `json:"applicationNumber"`
|
||||
DeviceApplicationKey string `json:"lastUsedDeviceApplicationKey"`
|
||||
DeviceName string `json:"lastUsedDeviceName"`
|
||||
DeviceUploadTime Time `json:"lastUsedDeviceUploadTime"`
|
||||
ImageURL string `json:"imageUrl"`
|
||||
Released bool `json:"released"`
|
||||
}
|
||||
|
||||
// LastUsed will return information about the latest synchronization.
|
||||
func (c *Client) LastUsed(displayName string) (*LastUsed, error) {
|
||||
URL := "https://connect.garmin.com/modern/proxy/device-service/deviceservice/userlastused/" + displayName
|
||||
|
||||
lastused := new(LastUsed)
|
||||
|
||||
err := c.getJSON(URL, lastused)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return lastused, err
|
||||
}
|
||||
Reference in New Issue
Block a user