public async Task <List <Album> > GetAlbums() { // TODO AT: Extract this into settings var albums = await _httpWrapper.MakeHttpCall("http://jsonplaceholder.typicode.com/albums"); var photos = await _photosService.GetPhotos(); var result = _mapper.MapItems(albums, photos); return(result); }
public override async void Prepare(string parameter) { base.Prepare(parameter); IsBusy = true; var photosResponse = await _photosService.GetPhotos(); IsBusy = false; if (photosResponse.IsSuccess) { PhotosCollection.AddRange(photosResponse.Results); } }
public async Task GetPhotos() { IsLoading = true; var photos = await _photosService .GetPhotos(Priority.Background) .ConfigureAwait(false); CachePhotos(photos); IsLoading = false; Photos = photos; }
public async Task <ActionResult> GetPhotos(int id) { List <Photo> photos = await photosService.GetPhotos(id); return(PartialView("_Photos", photos)); }
public IEnumerable <PhotoResource> GetPhotos(int vehicleId) { var photos = _photos.GetPhotos(vehicleId); return(Mapper.Map <IEnumerable <PhotoResource> >(photos)); }