mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 23:16:28 +00:00
33 lines
864 B
C#
33 lines
864 B
C#
using SpotifyAPI.Web.Http;
|
|
|
|
namespace SpotifyAPI.Web
|
|
{
|
|
public class SpotifyClient : ISpotifyClient
|
|
{
|
|
private readonly IAPIConnector _apiConnector;
|
|
|
|
public SpotifyClient(string token, string tokenType = "Bearer") :
|
|
this(SpotifyClientConfig.CreateDefault(token, tokenType))
|
|
{ }
|
|
|
|
public SpotifyClient(SpotifyClientConfig config)
|
|
{
|
|
Ensure.ArgumentNotNull(config, nameof(config));
|
|
|
|
_apiConnector = config.CreateAPIConnector();
|
|
UserProfile = new UserProfileClient(_apiConnector);
|
|
Browse = new BrowseClient(_apiConnector);
|
|
Shows = new ShowsClient(_apiConnector);
|
|
Playlists = new PlaylistsClient(_apiConnector);
|
|
}
|
|
|
|
public IUserProfileClient UserProfile { get; }
|
|
|
|
public IBrowseClient Browse { get; }
|
|
|
|
public IShowsClient Shows { get; }
|
|
|
|
public IPlaylistsClient Playlists { get; }
|
|
}
|
|
}
|