Initial implementation for Spotify listens export

This commit is contained in:
Philipp Wolfer 2023-11-20 08:43:10 +01:00
parent 3ded679d80
commit 3d3685d8bc
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
11 changed files with 2355 additions and 3 deletions

View file

@ -25,6 +25,7 @@ import (
"time"
"github.com/spf13/viper"
"golang.org/x/oauth2"
)
// A listen service backend.
@ -34,6 +35,15 @@ type Backend interface {
FromConfig(config *viper.Viper) Backend
}
type OAuth2Backend interface {
Backend
// Returns OAuth2 config suitable for this backend
OAuth2Config(redirectUrl string) oauth2.Config
// Setup the OAuth2 client
OAuth2Setup(redirectUrl string, token *oauth2.Token) error
}
type ImportBackend interface {
Backend