Exemplo n.º 1
0
        public async Task <ActionResult <IEnumerable <ChannelResponse> > > Get([FromQuery] GetChannelsRequest request)
        {
            var page = await _channelManager.GetAsync(request.ToDomain(), Cancel);

            SetTotalCountHeader(page.TotalCount);
            return(Ok(page.Items.Select(x => new ChannelResponse(x))));
        }
Exemplo n.º 2
0
        public async Task <ActionResult <PlaylistResponse> > Get([FromRoute] String alias)
        {
            var playlist = await _playlistManager.GetAsync(alias, Cancel);

            var playlistChannels = await _channelManager.GetAsync(playlist.Channels, Cancel);

            return(Ok(new PlaylistResponse(playlist, playlistChannels)));
        }