TMDbLib/Client/TMDbClientTvShows.cs
/// <summary>
/// Retrieves all information for a specific tv show in relation to the current user account
/// </summary>
/// <param name="tvShowId">The id of the tv show to get the account states for</param>
/// <param name="cancellationToken">A cancellation token</param>
/// <remarks>Requires a valid user session</remarks>
/// <exception cref="UserSessionRequiredException">Thrown when the current client object doens't have a user session assigned.</exception>
Retrieves all information for a specific tv show in relation to the current user account
Retrieves all information for a specific tv show in relation to the current user account
public async Task<AccountState> GetTvShowAccountStateAsync(int tvShowId, CancellationToken cancellationToken = default)
        {
            RequireSessionId(SessionType.UserSession);
            RestRequest req = _client.Create("tv/{tvShowId}/{method}");
            req.AddUrlSegment("tvShowId", tvShowId.ToString(CultureInfo.InvariantCulture));
            req.AddUrlSegment("method", TvShowMethods.AccountStates.GetDescription());
            AddSessionId(req, SessionType.UserSession);
            RestResponse<AccountState> response = await req.Get<AccountState>(cancellationToken).ConfigureAwait(false);
            return await response.GetDataObject().ConfigureAwait(false);
        }
public async Task < AccountState > GetTvShowAccountStateAsync ( int tvShowId , CancellationToken cancellationToken = default ) { RequireSessionId ( SessionType . UserSession ) ; RestRequest req = _client . Create ( " " ) ; req . AddUrlSegment ( " " , tvShowId . ToString ( CultureInfo . InvariantCulture ) ) ; req . AddUrlSegment ( " " , TvShowMethods . AccountStates . GetDescription ( ) ) ; AddSessionId ( req , SessionType . UserSession ) ; RestResponse < AccountState > response = await req . Get < AccountState > ( cancellationToken ) . ConfigureAwait ( false ) ; return await response . GetDataObject ( ) . ConfigureAwait ( false ) ; }
Retrieves all information for a specific tv show in relation to the current user account
Retrieves all information for a specific tv show in relation to the current user account
Thrown when the current client object doens't have a user session assigned.
Thrown when the current client object doens ' t have a user session assigned .
tvShowId
int
The id of the tv show to get the account states for
The id of the tv show to get the account states for
cancellationToken
CancellationToken
A cancellation token
A cancellation token
remarks
Requires a valid user session
Requires a valid user session