Account

tmdb-js/sections/types. Account

A class that represents a specific account in TMDb.

Constructor

new Account(id, accountSection)

Initializes this object.
Source:
Parameters:
Name Type Description
id string The id of the review.
accountSection exports.AccountSection The parent AccountSection.

Methods

(async) getCreatedListsAsync() → {Promise.<*>}

Gets the created lists of this account
Source:
Returns:
Type:
Promise.<*>
A Promise of created lists.

(async) getFavoriteMoviesAsync(sessionId, page, sortBy) → {Promise.<*>}

Gets the favorite movies of this account.
Source:
Parameters:
Name Type Default Description
sessionId string The session ID.
page Number 1 The page to retrieve data from.
sortBy string The sorting type to use (valid values: tmdb_utils.sortingTypes.CREATED_AT_ASC and tmdb_utils.sortingTypes.CREATED_AT_DESC).
Returns:
Type:
Promise.<*>
A Promise of favorite movies.

(async) getFavoriteTvShowsAsync(sessionId, page, sortBy) → {Promise.<*>}

Gets the favorite TV shows of this account.
Source:
Parameters:
Name Type Default Description
sessionId string The session ID.
page Number 1 The page to retrieve data from.
sortBy string The sorting type to use (see tmdb_utils.sortingTypes).
Returns:
Type:
Promise.<*>
A Promise of favorite TV shows.

(async) getMovieWatchlistAsync(sessionId, page, sortBy) → {Promise.<*>}

Gets the movie watchlist of this account.
Source:
Parameters:
Name Type Default Description
sessionId string The session ID.
page Number 1 The page to retrieve data from.
sortBy string The sorting type to use (see tmdb_utils.sortingTypes).
Returns:
Type:
Promise.<*>
A Promise of movies in this account's watchlist.

(async) getRatedMoviesAsync(sessionId, page, sortBy) → {Promise.<*>}

Gets the rated movies of this account.
Source:
Parameters:
Name Type Default Description
sessionId string The session ID.
page Number 1 The page to retrieve data from.
sortBy string The sorting type to use (see tmdb_utils.sortingTypes).
Returns:
Type:
Promise.<*>
A Promise of rated movies.

(async) getRatedTvShowEpisodesAsync(sessionId, page, sortBy) → {Promise.<*>}

Gets the rated TV show episodes of this account.
Source:
Parameters:
Name Type Default Description
sessionId string The session ID.
page Number 1 The page to retrieve data from.
sortBy string The sorting type to use (see tmdb_utils.sortingTypes).
Returns:
Type:
Promise.<*>
A Promise of rated TV show episodes.

(async) getRatedTvShowsAsync(sessionId, page, sortBy) → {Promise.<*>}

Gets the rated movies of this account.
Source:
Parameters:
Name Type Default Description
sessionId string The session ID.
page Number 1 The page to retrieve data from.
sortBy string The sorting type to use (see tmdb_utils.sortingTypes).
Returns:
Type:
Promise.<*>
A Promise of rated TV shows.

(async) getTvShowWatchlistAsync(sessionId, page, sortBy) → {Promise.<*>}

Gets the TV show watchlist of this account.
Source:
Parameters:
Name Type Default Description
sessionId string The session ID.
page Number 1 The page to retrieve data from.
sortBy string The sorting type to use (see tmdb_utils.sortingTypes).
Returns:
Type:
Promise.<*>
A Promise of TV shows in this account's watchlist.

(async) setMovieFavoriteStatusAsync(sessionId, mediaId, favorite) → {Promise.<boolean>}

Sets the favorite status of the movie with the specified ID.
Source:
Parameters:
Name Type Description
sessionId string The session ID.
mediaId string The ID of the movie.
favorite boolean A value indicating whether the movie should be set as a favorite or not.
Returns:
Type:
Promise.<boolean>
A Promise of a boolean value indicating whether the favorite marking was successful or not.

(async) setMovieWatchlistStatusAsync(sessionId, mediaId, watchlist) → {Promise.<boolean>}

Sets the watchlist status of the movie with the specified ID.
Source:
Parameters:
Name Type Description
sessionId string The session ID.
mediaId string The ID of the movie.
watchlist boolean A value indicating whether the movie should be in the watchlist or not.
Returns:
Type:
Promise.<boolean>
A Promise of a boolean value indicating whether the watchlist update was successful or not.

(async) setTvShowFavoriteStatusAsync(sessionId, mediaId, favorite) → {Promise.<boolean>}

Sets the favorite status of the TV show with the specified ID.
Source:
Parameters:
Name Type Description
sessionId string The session ID.
mediaId string The ID of the TV show.
favorite boolean A value indicating whether the TV show should be set as a favorite or not.
Returns:
Type:
Promise.<boolean>
A Promise of a boolean value indicating whether the favorite marking was successful or not.

(async) setTvShowWatchlistStatusAsync(sessionId, mediaId, watchlist) → {Promise.<boolean>}

Sets the watchlist status of the TV show with the specified ID.
Source:
Parameters:
Name Type Description
sessionId string The session ID.
mediaId string The ID of the TV show.
watchlist boolean A value indicating whether the TV show should be in the watchlist or not.
Returns:
Type:
Promise.<boolean>
A Promise of a boolean value indicating whether the watchlist update was successful or not.