public IEnumerable<Series> GetMultipleSeries(
           string name = null, string abbreviation = null,
           string moderatorId = null, int? elementsPerPage = null,
           SeriesEmbeds embeds = default(SeriesEmbeds),
           SeriesOrdering orderBy = default(SeriesOrdering))
        {
            var parameters = new List<string>() { embeds.ToString() };

            parameters.AddRange(orderBy.ToParameters());

            if (!string.IsNullOrEmpty(name))
                parameters.Add(string.Format("name={0}", Uri.EscapeDataString(name)));

            if (!string.IsNullOrEmpty(abbreviation))
                parameters.Add(string.Format("abbreviation={0}", Uri.EscapeDataString(abbreviation)));

            if (!string.IsNullOrEmpty(moderatorId))
                parameters.Add(string.Format("moderator={0}", Uri.EscapeDataString(moderatorId)));

            if (elementsPerPage.HasValue)
                parameters.Add(string.Format("max={0}", elementsPerPage.Value));

            var uri = GetSeriesUri(parameters.ToParameters());
            return baseClient.DoPaginatedRequest(uri,
                x => Series.Parse(baseClient, x) as Series);
        }
        public Series GetSeriesFromSiteUri(string siteUri, SeriesEmbeds embeds = default(SeriesEmbeds))
        {
            var id = GetSeriesIDFromSiteUri(siteUri);

            if (string.IsNullOrEmpty(id))
            {
                return(null);
            }

            return(GetSingleSeries(id, embeds));
        }
        public Series GetSingleSeries(string seriesId, SeriesEmbeds embeds = default(SeriesEmbeds))
        {
            var parameters = new List <string>()
            {
                embeds.ToString()
            };

            var uri = GetSeriesUri(string.Format("/{0}{1}",
                                                 Uri.EscapeDataString(seriesId),
                                                 parameters.ToParameters()));

            var result = baseClient.DoRequest(uri);

            return(Series.Parse(baseClient, result.data));
        }
        public IEnumerable <Series> GetMultipleSeries(
            string name            = null, string abbreviation = null,
            string moderatorId     = null, int?elementsPerPage = null,
            SeriesEmbeds embeds    = default(SeriesEmbeds),
            SeriesOrdering orderBy = default(SeriesOrdering))
        {
            var parameters = new List <string>()
            {
                embeds.ToString()
            };

            parameters.AddRange(orderBy.ToParameters());

            if (!string.IsNullOrEmpty(name))
            {
                parameters.Add(string.Format("name={0}", Uri.EscapeDataString(name)));
            }

            if (!string.IsNullOrEmpty(abbreviation))
            {
                parameters.Add(string.Format("abbreviation={0}", Uri.EscapeDataString(abbreviation)));
            }

            if (!string.IsNullOrEmpty(moderatorId))
            {
                parameters.Add(string.Format("moderator={0}", Uri.EscapeDataString(moderatorId)));
            }

            if (elementsPerPage.HasValue)
            {
                parameters.Add(string.Format("max={0}", elementsPerPage.Value));
            }

            var uri = GetSeriesUri(parameters.ToParameters());

            return(baseClient.DoPaginatedRequest(uri,
                                                 x => Series.Parse(baseClient, x) as Series));
        }
        public Series GetSeriesFromSiteUri(string siteUri, SeriesEmbeds embeds = default(SeriesEmbeds))
        {
            var id = GetSeriesIDFromSiteUri(siteUri);

            if (string.IsNullOrEmpty(id))
                return null;

            return GetSingleSeries(id, embeds);
        }
        public Series GetSingleSeries(string seriesId, SeriesEmbeds embeds = default(SeriesEmbeds))
        {
            var parameters = new List<string>() { embeds.ToString() };

            var uri = GetSeriesUri(string.Format("/{0}{1}",
                Uri.EscapeDataString(seriesId),
                parameters.ToParameters()));

            var result = baseClient.DoRequest(uri);

            return Series.Parse(baseClient, result.data);
        }