using System.Net.Http.Json;
using TIAMWebApp.Shared.Application.Interfaces;
using TIAMWebApp.Shared.Application.Models;

namespace TIAMMobileApp.Services
{
    public class WeatherForecastService : IWeatherForecastService
    {
        private readonly HttpClient http;

        public WeatherForecastService(HttpClient http)
        {
            this.http = http;
        }
        public Task<WeatherForecast[]?> GetWeatherForecastAsync()
        {
            return http.GetFromJsonAsync<WeatherForecast[]>("WeatherForecastAPI");
        }
    }
}
