public void InitializePanel(string code, string state, string error) { Code = code; State = state; Error = error; var token = SpotifyDataService.GetToken(code, RedirectUri); token.Wait(); var views = new List <PartialView>(); var spotifyVM = new SpotifyViewModel(); spotifyVM.InitializeView(token.Result.access_token); views.Add(new PartialView { PartialViewPath = spotifyVM.PartialViewPath, Title = spotifyVM.Title, ViewModel = spotifyVM }); var feedVM = new FeedViewModel(); feedVM.InitializeView(); views.Add(new PartialView { PartialViewPath = feedVM.PartialViewPath, Title = feedVM.Title, ViewModel = feedVM }); PartialViews = views; }
public void InitializeView(string token) { NewReleases = SpotifyDataService.GetNewReleases(token); PartialViewPath = "~/Views/PartialView/_SpotifyPartialView.cshtml"; Title = "Spotify"; }