コード例 #1
0
        public SpotifyHandlerService(EnergizeClient client)
        {
            this.Logger = client.Logger;
            this.Api    = new SpotifyWebAPI
            {
                TokenType    = "Bearer",
                UseAuth      = true,
                UseAutoRetry = true
            };
            this.LavaRest = GetLavaRestClient();
            // TODO: add configuration entry
            this.Config           = Essentials.Config.Instance.Spotify;
            this.SpotifyAuthTimer = new Timer(this.TradeSpotifyToken);

            SpotifyRunConfig spotifyRunConfig = new SpotifyRunConfig(this.LavaRest, this.Api, this.Config, new SpotifyTrackConverter(this.LavaRest, this.Config));

            this.TrackProvider    = new SpotifyTrackProvider(spotifyRunConfig);
            this.SearchProvider   = new SpotifySearchProvider(spotifyRunConfig);
            this.PlaylistProvider = new SpotifyPlaylistProvider(spotifyRunConfig);
            this.AlbumProvider    = new SpotifyAlbumProvider(spotifyRunConfig);
            this.ArtistProvider   = new SpotifyArtistProvider(spotifyRunConfig);
        }
コード例 #2
0
 public SpotifyAlbumProvider(SpotifyRunConfig runConfig)
 {
     this.RunConfig = runConfig;
 }
コード例 #3
0
 public SpotifyArtistProvider(SpotifyRunConfig runConfig)
 {
     this.RunConfig = runConfig;
 }
コード例 #4
0
 public SpotifyTrackProvider(SpotifyRunConfig runConfig)
 {
     this.RunConfig = runConfig;
 }
コード例 #5
0
 public SpotifySearchProvider(SpotifyRunConfig runConfig)
 {
     this.RunConfig = runConfig;
 }