public async Task <IEnumerable <PlanArmy> > GetArmies() { string armiesStringResponse = await ApiFramework.ApiGetStringResponse(Constants.ArmiesController); IEnumerable <PlanArmy> armies = JsonConvert.DeserializeObject <IEnumerable <PlanArmy> >(armiesStringResponse); return(armies); }
public async Task <IEnumerable <PlanUnit> > GetArmyUnitsForArmy(Guid armyId) { string armyUnitUrlString = $"{Constants.ArmyUnitsController}/planArmyId={armyId.ToString()}"; string armiesStringResponse = await ApiFramework.ApiGetStringResponse(armyUnitUrlString); IEnumerable <PlanUnit> planUnits = JsonConvert.DeserializeObject <IEnumerable <PlanUnit> >(armiesStringResponse); return(planUnits); }