MarcusOtter / APOD.Net

An unofficial .NET wrapper for NASA's Astronomy Picture of the Day API.
https://marcusotter.github.io/APOD.Net/
MIT License
9 stars 2 forks source link

Implement batch API calls #12

Open MarcusOtter opened 4 years ago

MarcusOtter commented 4 years ago

To prevent timeouts, the library could provide an option to split requests that take a very long time into multiple requests and then return those results asynchronously using the new async iterators in C# 8.

The method should force the user to specify results per request within a reasonable range (1-50?) to give them some control over how many of their api requests they're using.

MarcusOtter commented 4 years ago

Since the library targets .NET Standard 2.0 we can't use C# 8. This could still be a feature to fetch the data in batches, which has the drawback of taking longer time and more API requests but users will not encounter timeouts.