Exemplo n.º 1
0
        public async Task <IEnumerable <FeedItemViewModel> > FeedItems(int id, int?pageNum = 1)
        {
            if (!pageNum.HasValue || pageNum == 0)
            {
                pageNum = 1;
            }

            var feed = await K_AkicaClient.GetFeedForPooperAsync(id, pageNum.Value);

            return(feed.Select(e => new FeedItemViewModel(e)));
        }
Exemplo n.º 2
0
        public async Task <ViewComponentResult> FeedItems(int id, int?pageNum = 1)
        {
            if (!pageNum.HasValue || pageNum == 0)
            {
                pageNum = 1;
            }

            var feed = await K_AkicaClient.GetFeedForPooperAsync(id, pageNum.Value);

            var model = feed.Select(e => new FeedItemViewModel(e));

            return(ViewComponent("FeedItemsComponent", new { model, isPlain = pageNum > 1 }));
        }