TMDbLib/Client/TMDbClientTvShows.cs
/// <summary>
/// Fetches a dynamic list of TV Shows
/// </summary>
/// <param name="list">Type of list to fetch</param>
/// <param name="language">Language</param>
/// <param name="page">Page</param>
/// <param name="timezone">Only relevant for list type AiringToday</param>
/// <param name="cancellationToken">A cancellation token</param>
/// <returns></returns>
Fetches a dynamic list of TV Shows
Fetches a dynamic list of TV Shows
public async Task<SearchContainer<SearchTv>> GetTvShowListAsync(TvShowListType list, string language, int page = 0, string timezone = null, CancellationToken cancellationToken = default)
        {
            RestRequest req = _client.Create("tv/{method}");
            req.AddUrlSegment("method", list.GetDescription());
            if (page > 0)
                req.AddParameter("page", page.ToString());
            if (!string.IsNullOrEmpty(timezone))
                req.AddParameter("timezone", timezone);
            language ??= DefaultLanguage;
            if (!string.IsNullOrWhiteSpace(language))
                req.AddParameter("language", language);
            SearchContainer<SearchTv> resp = await req.GetOfT<SearchContainer<SearchTv>>(cancellationToken).ConfigureAwait(false);
            return resp;
        }
public async Task < SearchContainer < SearchTv > > GetTvShowListAsync ( TvShowListType list , string language , int page = 0 , string timezone = null , CancellationToken cancellationToken = default ) { RestRequest req = _client . Create ( " " ) ; req . AddUrlSegment ( " " , list . GetDescription ( ) ) ; if ( page > 0 ) req . AddParameter ( " " , page . ToString ( ) ) ; if ( ! string . IsNullOrEmpty ( timezone ) ) req . AddParameter ( " " , timezone ) ; language ??= DefaultLanguage ; if ( ! string . IsNullOrWhiteSpace ( language ) ) req . AddParameter ( " " , language ) ; SearchContainer < SearchTv > resp = await req . GetOfT < SearchContainer < SearchTv > > ( cancellationToken ) . ConfigureAwait ( false ) ; return resp ; }
Fetches a dynamic list of TV Shows
Fetches a dynamic list of TV Shows
None
list
TvShowListType
Type of list to fetch
Type of list to fetch
language
string
None
page
int
None
timezone
string
Only relevant for list type AiringToday
Only relevant for list type AiringToday
cancellationToken
CancellationToken
A cancellation token
A cancellation token