mirror of
https://github.com/sstent/go-garth-cli.git
synced 2026-01-27 09:31:59 +00:00
sync
This commit is contained in:
19
shared/interfaces/api_client.go
Normal file
19
shared/interfaces/api_client.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package interfaces
|
||||
|
||||
import (
|
||||
"io"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
types "go-garth/internal/models/types"
|
||||
"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() (*types.UserProfile, error)
|
||||
GetWellnessData(startDate, endDate time.Time) ([]types.WellnessData, error)
|
||||
}
|
||||
Reference in New Issue
Block a user