Files
go-garth/shared/interfaces/api_client.go
2025-09-22 16:41:49 -07:00

20 lines
549 B
Go

package interfaces
import (
"io"
"net/url"
"time"
garth "github.com/sstent/go-garth/pkg/garth/types"
"github.com/sstent/go-garth/shared/models"
)
// APIClient defines the interface for making API calls that data packages need.
type APIClient interface {
ConnectAPI(path string, method string, params url.Values, body io.Reader) ([]byte, error)
GetUsername() string
GetUserSettings() (*models.UserSettings, error)
GetUserProfile() (*garth.UserProfile, error)
GetWellnessData(startDate, endDate time.Time) ([]garth.WellnessData, error)
}