Documentation ¶
Index ¶
- Constants
- type FitbitController
- func (c *FitbitController) Callback(ctx context.Context, code string, verifier string) (string, domain.OAuth2Token, error)
- func (c *FitbitController) GenerateAuthURL(state string) (url.URL, string, error)
- func (c *FitbitController) GetHeartData(ctx context.Context, token domain.OAuth2Token, ...) ([]domain.HeartData, domain.OAuth2Token, error)
- func (c *FitbitController) GetName(ctx context.Context, token domain.OAuth2Token) (string, domain.OAuth2Token, error)
Constants ¶
View Source
const ( AuthEndpoint = "https://www.fitbit.com/oauth2/authorize" TokenEndpoint = "https://api.fitbit.com/oauth2/token" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FitbitController ¶
type FitbitController struct {
// contains filtered or unexported fields
}
func NewFitbitController ¶
func NewFitbitController(serverURL config.ServerURL, clientID config.ClientID, clientSecret config.ClientSecret) (*FitbitController, error)
func (*FitbitController) Callback ¶
func (c *FitbitController) Callback(ctx context.Context, code string, verifier string) (string, domain.OAuth2Token, error)
func (*FitbitController) GenerateAuthURL ¶
func (*FitbitController) GetHeartData ¶
func (c *FitbitController) GetHeartData(ctx context.Context, token domain.OAuth2Token, timeRange domain.FitbitTimeRange, detail domain.HeartDetail) ([]domain.HeartData, domain.OAuth2Token, error)
func (*FitbitController) GetName ¶
func (c *FitbitController) GetName(ctx context.Context, token domain.OAuth2Token) (string, domain.OAuth2Token, error)
Click to show internal directories.
Click to hide internal directories.