public PagedFilmsViewModel(string url) { Title = "Films"; var filmsApi = ConnectToApi.GetDatasFromUrlAsync <PagedFilms>(url).Result; SetIsVisible(filmsApi); PreviousUrl = filmsApi.PreviousPage; NextUrl = filmsApi.NextPage; PagedFilms = new ObservableCollection <Film>(filmsApi.Films); }
public PagedSpeciesViewModel(string url) { Title = "Species"; var speciesApi = ConnectToApi.GetDatasFromUrlAsync <PagedSpecies>(url).Result; SetIsVisible(speciesApi); PreviousUrl = speciesApi.PreviousPage; NextUrl = speciesApi.NextPage; PagedSpecies = new ObservableCollection <Specie>(speciesApi.Species); }
public PagedPlanetsViewModel(string url) { Title = "Planets"; var planetsApi = ConnectToApi.GetDatasFromUrlAsync <PagedPlanets>(url).Result; SetIsVisible(planetsApi); PreviousUrl = planetsApi.PreviousPage; NextUrl = planetsApi.NextPage; PagedPlanets = new ObservableCollection <Planet>(planetsApi.Planets); }
public PagedStarshipsViewModel(string url) { Title = "Starships"; var starshipsApi = ConnectToApi.GetDatasFromUrlAsync <PagedStarships>(url).Result; SetIsVisible(starshipsApi); PreviousUrl = starshipsApi.PreviousPage; NextUrl = starshipsApi.NextPage; PagedStarships = new ObservableCollection <Starship>(starshipsApi.Starships); }
public PagedVehiclesViewModel(string url) { Title = "Vehicles"; var vehiclesApi = ConnectToApi.GetDatasFromUrlAsync <PagedVehicles>(url).Result; SetIsVisible(vehiclesApi); PreviousUrl = vehiclesApi.PreviousPage; NextUrl = vehiclesApi.NextPage; PagedVehicles = new ObservableCollection <Vehicle>(vehiclesApi.Vehicles); }
public PagedPeopleViewModel(string url) { Title = "People"; var peopleApi = ConnectToApi.GetDatasFromUrlAsync <PagedPeople>(url).Result; SetIsVisible(peopleApi); PreviousUrl = peopleApi.PreviousPage; NextUrl = peopleApi.NextPage; PagedPeople = new ObservableCollection <People>(peopleApi.People); }