feat: support updating Garmin credentials at runtime

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-17 18:57:54 +02:00
parent 684b026ff4
commit 6f62686d29
3 changed files with 47 additions and 0 deletions

View File

@@ -18,6 +18,8 @@ type Client struct {
authResultCursor int
ClosedCalled bool
GetActivitiesCalls int
LastEmail string
LastPassword string
}
var _ garmin.Client = (*Client)(nil)
@@ -70,6 +72,11 @@ func (c *Client) GetActivityDetails(ctx context.Context, activityID int64) (garm
return c.Details[activityID], nil
}
func (c *Client) UpdateCredentials(email, password string) {
c.LastEmail = email
c.LastPassword = password
}
func (c *Client) Close() error {
c.ClosedCalled = true
return nil