public async Task OnGet() { var spotify = await _spotifyClientBuilder.BuildClient(); int offset = int.TryParse(Request.Query["Offset"], out offset) ? offset : 0; var playlistRequest = new PlaylistCurrentUsersRequest { Limit = LIMIT, Offset = offset }; Playlists = await spotify.Playlists.CurrentUsers(playlistRequest); if (Playlists.Next != null) { Next = Url.Page("Index", new { Offset = offset + LIMIT }); } if (Playlists.Previous != null) { Previous = Url.Page("Index", values: new { Offset = offset - LIMIT }); } }
public async Task OnGet() { var spotify = await _spotifyClientBuilder.BuildClient(); Me = await spotify.UserProfile.Current(); }