25 lines
704 B
C#
25 lines
704 B
C#
using PokemonSleepWeb.Client.Service.IService;
|
|
using PokemonSleepWeb.Client.Utility;
|
|
using PokemonSleepWeb.Client.Models;
|
|
|
|
namespace PokemonSleepWeb.Client.Service
|
|
{
|
|
public class PokemonService : IPokemonService
|
|
{
|
|
private readonly IBaseService _baseService;
|
|
public PokemonService(IBaseService baseService)
|
|
{
|
|
_baseService = baseService;
|
|
}
|
|
|
|
public async Task<ResponseDto?> GetAllPokemonAsync()
|
|
{
|
|
return await _baseService.SendAsync(new RequestDto()
|
|
{
|
|
ApiType = StaticDetails.ApiType.GET,
|
|
Url = StaticDetails.PokemonSleepAPIBase + "/api/pokemon"
|
|
});
|
|
}
|
|
}
|
|
}
|