remove support for oauth.

Only oauth proxy is now supported
This commit is contained in:
2023-09-26 01:16:01 +02:00
parent 1c9706485c
commit 6754b778c8
5 changed files with 33 additions and 108 deletions

View File

@@ -6,14 +6,11 @@ import (
)
type args struct {
SpotifyClientID string `arg:"--spotify-client-id,required,env:SPOTIFY_CLIENT_ID" placeholder:"SPOTIFY_CLIENT_ID"`
SpotifyClientSecret string `arg:"--spotify-client-secret,required,env:SPOTIFY_CLIENT_SECRET" placeholder:"SPOTIFY_CLIENT_SECRET"`
DeviceName string `arg:"--device-name,required,env:SPOTIFY_DEVICE_NAME" placeholder:"SPOTIFY_DEVICE_NAME" help:"Can be found later in the API"`
PlaylistID string `arg:"--playlist-id,required,env:SPOTIFY_PLAYLIST_ID" help:"Just the id" placeholder:"SPOTIFY_PLAYLIST_ID"`
RedirectURL string `arg:"--redirect-url,required,env:SPOTIFY_REDIRECT_URL" help:"Must be the same as in the Spotify developer dashboard." placeholder:"SPOTIFY_REDIRECT_URL"`
ListenAddr string `arg:"--listen-addr,env:LISTEN_ADDR" help:"Address to listen on" placeholder:"LISTEN_ADDR" default:":3000"`
OAuthProxyURL string `arg:"--oauth-proxy-url,env:OAUTH_PROXY_URL" help:"URL of the oauth proxy" placeholder:"OAUTH_PROXY_URL"`
OAuthProxyAPIKey string `arg:"--oauth-proxy-api-key,env:OAUTH_PROXY_API_KEY" help:"API key for the oauth proxy" placeholder:"OAUTH_PROXY_API_KEY"`
DeviceName string `arg:"--device-name,required,env:SPOTIFY_DEVICE_NAME" placeholder:"SPOTIFY_DEVICE_NAME" help:"Can be found later in the API"`
PlaylistID string `arg:"--playlist-id,required,env:SPOTIFY_PLAYLIST_ID" help:"Just the id" placeholder:"SPOTIFY_PLAYLIST_ID"`
ListenAddr string `arg:"--listen-addr,env:LISTEN_ADDR" help:"Address to listen on" placeholder:"LISTEN_ADDR" default:":3000"`
OAuthProxyURL string `arg:"--oauth-proxy-url,env:OAUTH_PROXY_URL" help:"URL of the oauth proxy" placeholder:"OAUTH_PROXY_URL"`
OAuthProxyAPIKey string `arg:"--oauth-proxy-api-key,env:OAUTH_PROXY_API_KEY" help:"API key for the oauth proxy" placeholder:"OAUTH_PROXY_API_KEY"`
}
func main() {
@@ -21,13 +18,10 @@ func main() {
arg.MustParse(&args)
morningalarm.New(morningalarm.MorningAlarmConfig{
SpotifyClientID: args.SpotifyClientID,
SpotifyClientSecret: args.SpotifyClientSecret,
DeviceName: args.DeviceName,
PlaylistID: args.PlaylistID,
RedirectURL: args.RedirectURL,
ListenAddr: args.ListenAddr,
OAuthProxyURL: args.OAuthProxyURL,
OAuthProxyAPIKey: args.OAuthProxyAPIKey,
DeviceName: args.DeviceName,
PlaylistID: args.PlaylistID,
ListenAddr: args.ListenAddr,
OAuthProxyURL: args.OAuthProxyURL,
OAuthProxyAPIKey: args.OAuthProxyAPIKey,
}).Start()
}