* Add image generation * Optimise for minimal memory * Added a new ui * Add support for esp
25 lines
604 B
C#
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;
|
|
}
|
|
}
|
|
} |