Ejemplo n.º 1
0
        /// <summary>
        /// Gets list of available languages from TVDb
        /// </summary>
        /// <param name="completionHandler">The async completion handler. May be null.</param>
        /// <returns></returns>
        public TvdbLanguagesResult GetTvdbLanguages(TvdbAsyncHandler completionHandler)
        {
            initializeFunction();
            string            url           = string.Format(tvdblanguages);
            TvdbAsyncHandler  asyncHandler  = completionHandler;
            ProcessJsonString processString = new ProcessJsonString(LanguageSearchResponse);

            return((TvdbLanguagesResult)getData(url, "en", new TvdbDelegates(asyncHandler, processString)));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get the actors for an episode.
        /// </summary>
        /// <param name="identity">The episode identity number.</param>
        /// <param name="completionHandler">The async completion handler. May be null.</param>
        /// <returns>The results object.</returns>
        public TvdbActorsResult GetEpisodeActors(int identity, TvdbAsyncHandler completionHandler)
        {
            initializeFunction();

            string            url           = string.Format(getEpisodeActorsUrl, identity);
            TvdbAsyncHandler  asyncHandler  = completionHandler;
            ProcessJsonString processString = new ProcessJsonString(episodeActorsResponse);

            return((TvdbActorsResult)getData(url, null, new TvdbDelegates(asyncHandler, processString)));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Get the image summary for a series.
        /// </summary>
        /// <param name="identity">The series identity.</param>
        /// <param name="completionHandler">The async completion handler. May be null.</param>
        /// <returns>The results object.</returns>
        public TvdbImageSummaryResult GetSeriesImageSummary(int identity, TvdbAsyncHandler completionHandler)
        {
            initializeFunction();

            string            url           = string.Format(getSeriesImageSummaryUrl, identity);
            TvdbAsyncHandler  asyncHandler  = completionHandler;
            ProcessJsonString processString = new ProcessJsonString(seriesImageSummaryResponse);

            return((TvdbImageSummaryResult)getData(url, null, new TvdbDelegates(asyncHandler, processString)));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Get the banners for a series.
        /// </summary>
        /// <param name="identity">The series identity.</param>
        /// <param name="imageType">The type of image to get.</param>
        /// <param name="completionHandler">The async completion handler. May be null.</param>
        /// <param name="languageCode">The language code.</param>
        /// <returns>The results object.</returns>
        public TvdbBannersResult GetSeriesBanners(int identity, ImageType imageType, TvdbAsyncHandler completionHandler, String languageCode)
        {
            initializeFunction();

            string            url           = string.Format(getSeriesBannersUrl, identity, imageType.ToString());
            TvdbAsyncHandler  asyncHandler  = completionHandler;
            ProcessJsonString processString = new ProcessJsonString(seriesBannersResponse);

            return((TvdbBannersResult)getData(url, languageCode, new TvdbDelegates(asyncHandler, processString)));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Get the details of an episode for a language code.
        /// </summary>
        /// <param name="episodeIdentity">The episode identity.</param>
        /// <param name="completionHandler">The async completion handler. May be null.</param>
        /// <param name="languageCode">The language code.</param>
        /// <returns>The results object.</returns>
        public TvdbEpisodeInfoResult GetEpisodeDetails(int episodeIdentity, TvdbAsyncHandler completionHandler, string languageCode)
        {
            initializeFunction();

            string            url           = string.Format(getEpisodeDetailsUrl, episodeIdentity);
            TvdbAsyncHandler  asyncHandler  = completionHandler;
            ProcessJsonString processString = new ProcessJsonString(episodeDetailResponse);

            return((TvdbEpisodeInfoResult)getData(url, languageCode, new TvdbDelegates(asyncHandler, processString)));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Get a page of the episodes of a series for a language code.
        /// </summary>
        /// <param name="identity">The identity of the series.</param>
        /// <param name="pageNumber">The page number.</param>
        /// <param name="completionHandler">The async completion handler. May be null.</param>
        /// <param name="languageCode">The language code.</param>
        /// <returns>The results object.</returns>
        public TvdbSeriesEpisodesResult GetSeriesEpisodes(int identity, int pageNumber, TvdbAsyncHandler completionHandler, string languageCode)
        {
            initializeFunction();

            string            url           = string.Format(getSeriesEpisodesUrl, identity, pageNumber);
            TvdbAsyncHandler  asyncHandler  = completionHandler;
            ProcessJsonString processString = new ProcessJsonString(seriesEpisodesResponse);

            return((TvdbSeriesEpisodesResult)getData(url, languageCode, new TvdbDelegates(asyncHandler, processString)));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Search for the basic series data for a language code.
        /// </summary>
        /// <param name="title">Part or all of the title.</param>
        /// <param name="completionHandler">The async completion handler. May be null.</param>
        /// <param name="languageCode">The language code.</param>
        /// <returns>The results object.</returns>
        public TvdbSeriesSearchResult GetSeries(string title, TvdbAsyncHandler completionHandler, string languageCode)
        {
            initializeFunction();

            string            url           = string.Format(getSeriesUrl, escapeQueryString(title));
            TvdbAsyncHandler  asyncHandler  = completionHandler;
            ProcessJsonString processString = new ProcessJsonString(seriesSearchResponse);

            return((TvdbSeriesSearchResult)getData(url, languageCode, new TvdbDelegates(asyncHandler, processString)));
        }