// EpisodeGroups

        public Task <EpisodeGroupListResponse> ListEpisodeGroupsAsync(EpisodeGroupListRequest request, ListPagination?pagination = null)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }

            return(GetListAsync <EpisodeGroupListRequest, EpisodeGroupListResponse>(
                       _httpClient,
                       Constants.EpisodeGroups.ListEndpointConfiguration,
                       request,
                       pagination
                       ));
        }
 public static IAsyncEnumerable <EpisodeGroupEpisode> ListAllEpisodeGroupsAsync(this ISverigesRadioApiClient apiClient, EpisodeGroupListRequest request)
 {
     return(apiClient.ListAllAsync <EpisodeGroupEpisode, EpisodeGroupListRequest>(request, async(listRequest, pagination) =>
     {
         var result = await apiClient.ListEpisodeGroupsAsync(request, pagination);
         return (result.EpisodeGroup.Episodes, result.Pagination);
     }));
 }