using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Sony.Filtr.Tasks.Tasks.Spotify; using Sony.Filtr.Utility.Extensions; namespace Sony.Filtr.Worker.Onetime { public class FixSpotifyBrowseGlobalExport { private readonly ImportSpotifyBrowse _spotifyBrowse; public FixSpotifyBrowseGlobalExport(ImportSpotifyBrowse spotifyBrowse) { _spotifyBrowse = spotifyBrowse; } public async Task ExecuteAsync() { var startDate = new DateTime(2017, 08, 11); var endDate = DateTime.Today.AddDays(-1); var dateRange = startDate.GetDateRangeTo(endDate); foreach(var date in dateRange) { await _spotifyBrowse.SaveBrowseExportFileAsync(date); } } } }