using DTO; using Model; using RelationApi.Factories; using System; using System.Collections.Generic; using System.Linq; using System.Net.Http.Json; using System.Text; using System.Threading.Tasks; using static System.Net.WebRequestMethods; namespace RelationApi { public class RelationChampion : IChampionsManager { private readonly string IpApi; private readonly HttpClient _httpClient; public RelationChampion(string ipApi,HttpClient http) { IpApi = ipApi; _httpClient = http; } public async Task AddItem(Champion? item) { throw new NotImplementedException(); } public Task DeleteItem(Champion? item) { throw new NotImplementedException(); } public async Task> GetItems(int index, int count, string? orderingPropertyName = null, bool descending = false) { IEnumerable dto = await _httpClient.GetFromJsonAsync>(IpApi+ "GetItems?index="+index+"&count="+count+"&descending="+descending); return dto.Select(e => e.DtoToModel()).ToList(); } public Task> GetItemsByCharacteristic(string charName, int index, int count, string? orderingPropertyName = null, bool descending = false) { throw new NotImplementedException(); } public Task> GetItemsByClass(ChampionClass championClass, int index, int count, string? orderingPropertyName = null, bool descending = false) { throw new NotImplementedException(); } public Task> GetItemsByName(string substring, int index, int count, string? orderingPropertyName = null, bool descending = false) { throw new NotImplementedException(); } public Task> GetItemsByRunePage(RunePage? runePage, int index, int count, string? orderingPropertyName = null, bool descending = false) { throw new NotImplementedException(); } public Task> GetItemsBySkill(Skill? skill, int index, int count, string? orderingPropertyName = null, bool descending = false) { throw new NotImplementedException(); } public Task> GetItemsBySkill(string skill, int index, int count, string? orderingPropertyName = null, bool descending = false) { throw new NotImplementedException(); } public async Task GetNbItems() { return await _httpClient.GetFromJsonAsync(IpApi + "GetNbItems"); } public Task GetNbItemsByCharacteristic(string charName) { throw new NotImplementedException(); } public Task GetNbItemsByClass(ChampionClass championClass) { throw new NotImplementedException(); } public Task GetNbItemsByName(string substring) { throw new NotImplementedException(); } public Task GetNbItemsByRunePage(RunePage? runePage) { throw new NotImplementedException(); } public Task GetNbItemsBySkill(Skill? skill) { throw new NotImplementedException(); } public Task GetNbItemsBySkill(string skill) { throw new NotImplementedException(); } public Task UpdateItem(Champion? oldItem, Champion? newItem) { throw new NotImplementedException(); } } }