mirror of
https://github.com/sstent/go-garth.git
synced 2026-01-26 00:52:40 +00:00
20 lines
549 B
Go
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)
|
|
}
|