// exibir o log de movimentações de forma ordenada public async Task <List <Movement> > GetAllMovements() { var resul = await GetExtractAll(_configuration.GetSection("BackendTest:BaseURL").Value); var extractList = resul.pagamentos.Union(resul.recebimentos); var util = new UtilHelp(); var list = util.ConvertMovementResultToMovement(extractList.ToList()); return(list); }
public async Task <List <Movement> > GetMovementAll(string type, string baseURL) { var result = await _client.GetAsync($"{baseURL}/{type}"); var list = new List <Movement>(); if (result.IsSuccessStatusCode) { var movements = await result.Content.ReadAsAsync <IEnumerable <MovementResult> >(); var util = new UtilHelp(); list = util.ConvertMovementResultToMovement(movements.ToList()); } return(list); }