Files
Wireless_Eink_HomeScreen/HomeApi/Integration/AuroraService.cs
SocksOnHead e21601234a Add image generation (#2)
* Add image generation

* Optimise for minimal memory

* Added a new ui

* Add support for esp
2025-07-19 19:11:31 +02:00

25 lines
604 B
C#

using HomeApi.Integration.Client;
using HomeApi.Models.Response;
namespace HomeApi.Integration;
public interface IAuroraService
{
Task<AuroraForecastApiResponse> GetAuroraForecastAsync(string lat, string lon);
}
public class AuroraService(IAuroraClient auroraApi) : IAuroraService
{
public Task<AuroraForecastApiResponse> GetAuroraForecastAsync(string lat, string lon)
{
try
{
return auroraApi.GetForecastAsync(latitude: lat, longitude: lon);
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}
}
}