Refactor and expose more information

This commit was merged in pull request #1.
This commit is contained in:
2025-07-14 20:40:41 +02:00
committed by GitHub
parent 1e71c06fc3
commit 9cfbdc21d0
20 changed files with 409 additions and 162 deletions

View File

@@ -0,0 +1,15 @@
using HomeApi.Models.Response;
using Refit;
namespace HomeApi.Integration.Client;
public interface IAuroraClient
{
[Get("/v1/")]
Task<AuroraForecastApiResponse> GetForecastAsync(
[AliasAs("type")] string type = "all",
[AliasAs("lat")] string latitude = "0",
[AliasAs("long")] string longitude = "0",
[AliasAs("forecast")] string forecast = "false",
[AliasAs("threeday")] string threeDay = "false");
}

View File

@@ -0,0 +1,13 @@
using HomeApi.Models.Response;
using Refit;
namespace HomeApi.Integration.Client;
public interface INominatimClient
{
[Get("/search")]
Task<List<NomatimApiResponse>> SearchAsync(
[AliasAs("q")] string query,
[AliasAs("format")] string format = "json",
[AliasAs("limit")] int limit = 1);
}

View File

@@ -0,0 +1,17 @@
using HomeApi.Models.Response;
namespace HomeApi.Integration.Client;
using Refit;
public interface IWeatherClient
{
[Get("/forecast.json")]
Task<WeatherData> GetForecastAsync(
[AliasAs("key")] string apiKey,
[AliasAs("q")] string coordinates,
[AliasAs("days")] int days = 7,
[AliasAs("lang")] string language = "sv",
[AliasAs("aqi")] string aqi = "yes",
[AliasAs("alerts")] string alerts = "yes");
}