Open scottcowan opened 7 years ago
This could work although we'd want to limit the number of requests
var tasks = new List<Task<FindEstablishmentsResponse>>();
for (var i = 1; i < response.PageCount; i++)
{
filter.Page = i;
tasks.Add(RequestEstablishments(filter));
}
Task.WaitAll(tasks.Cast<Task>().ToArray());
foreach (var task in tasks)
{
list.AddRange(task.Result.Establishments);
}
Page size is fixed to 25 items and the requests take 30 mins to get all the responses.
We could do something around parallel requests to speed this up.