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)))); }
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))); }