Example #1
0
        public IEnumerable <Album> GetAllAlbumsAndPhotos(int id)
        {
            var requestUrl = $"{ApiHelper.base_url}/albums?userId=" + id;
            var albums     = RequestProcessor.Process <List <Album> >(requestUrl);

            // The photos endpoint doesn't support filter by albumId
            requestUrl = $"{ApiHelper.base_url}/photos";
            var photos = RequestProcessor.Process <List <Photo> >(requestUrl);

            var combinedAlbumsAndPhotos = CalcService.CombineAlbumsAndPhotos(albums, photos);

            return(combinedAlbumsAndPhotos);
        }