public async Task <PagedArtists> GetMostPlayedArtists(string access_token, TimeRange timeRange = TimeRange.LongTerm) { var http = new HttpClient(); var personal = new PersonalizationApi(http, access_token); var artists = await personal.GetUsersTopArtists(10, timeRange : timeRange); return(artists); }
public void Initialize() { var http = new HttpClient(); IConfiguration testConfig = TestsHelper.GetLocalConfig(); bearerAccessToken = testConfig.GetValue(typeof(string), "SpotifyUserBearerAccessToken").ToString(); var accounts = new AccountsService(http, testConfig); api = new PersonalizationApi(http, accounts); }