.NET wrapper for unofficial SpaceX API v4 (with full support for all endpoints and query subsystem), providing information about everything related to the company.
Hi! I discovered, that for ships, latitude, longitude and last update is incorrect.
On 6th September, for "American Champion" ship, according to website Marine Trafic, last update and data about position are provided. Can you fix it, please?
Seeing the code call await ExecuteAsync().Result scared me ๐ฒ (if you didn't know, calling .Result before the method is finished executing (because of the await) can cause asynchronous issues). A useful link: https://montemagno.com/c-sharp-developers-stop-calling-dot-result/
I can't help but ask how you feel about that, because it breaks the asynchronous pattern.
I'm happy to help with reworking the asynchronous infrastructure, especially because I would like to see fully asynchronous methods available to the user.
Solutions:
The idea of the Execute method on the BuilderBase class is definitely a good idea but it's sort of negating the point of the Task-based asynchronous pattern. It would be nice to see methods like Execute and ExecuteAsync, with the former using <AsyncMethodName>().GetAwaiter().GetResult() (the "correct" way to synchronously wait for async methods to complete) and the later using an async requests library
Similar to other APIs and libraries (for example, Discord.NET), pushing the Execute level up to the method is a good idea. For example, we could use GetNextAsync and GetNext directly on the builder class.