public async Task <ActionResult> ViewComments(int id)
        {
            _typiCodeService = new TypiCodeService(Client);
            var comments = await _typiCodeService.GetCommentsAsync(id);

            var commentsViewModel = new CommentsViewModel
            {
                Comments = comments
            };

            return(PartialView("_Comments", commentsViewModel));
        }
        public async Task <ActionResult> Index()
        {
            _typiCodeService = new TypiCodeService(Client);
            var albums = await _typiCodeService.GetAlbumsAsync();

            var albumsViewModel = new AlbumsViewModel
            {
                Albums = albums
            };

            return(View(albumsViewModel));
        }
        public async Task <ActionResult> ViewAlbum(int id)
        {
            _typiCodeService = new TypiCodeService(Client);
            var photos = await _typiCodeService.GetPhotosAsync(id);

            var photosViewModel = new PhotosViewModel
            {
                Photos = photos
            };

            return(View("AlbumPhotos", photosViewModel));
        }
 public TypicodeController(TypiCodeService typiCode)
 {
     _typiCode = typiCode;
 }