mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
Initial implementation for Spotify listens export
This commit is contained in:
parent
3ded679d80
commit
3d3685d8bc
11 changed files with 2355 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue