public SearchViewModel() { spotifyAPI = Depency.GetInstance <ISpotifyAPI>(); Albums = new ObservableCollection <Item>(); Tracks = new ObservableCollection <Item>(); Playlists = new ObservableCollection <Item>(); Artists = new ObservableCollection <Item>(); }
public SpotifyAuthorization() { string clientId = Settings.Default.ClientId; string clientSecret = Settings.Default.ClientSecret; string headerValue = "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(clientId + ":" + clientSecret)); webClient = Depency.GetInstance <IWebClient>(); webClient.RequestUri = "https://accounts.spotify.com/api/token"; webClient.Method = Method.POST; webClient.Header = new RequestHeader { Header = HttpRequestHeader.Authorization, Value = headerValue }; webClient.PostData = "grant_type=client_credentials"; }
public SearchAlbumViewModel() { spotifyAPI = Depency.GetInstance <ISpotifyAPI>(); Albums = new ObservableCollection <Item>(); }