MovieSection

tmdb-js/sections/types. MovieSection

A class that represents the movie section in TMDb.

Constructor

new MovieSection(apiKey, language)

Initializes this object.
Source:
Parameters:
Name Type Default Description
apiKey string The TMDb API key.
language string en-US The language of queries, the default is "en-US".

Methods

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

Gets movie certifications.
Source:
Returns:
Type:
Promise.<*>
A Promise of JSON data with movie certifications.

(async) getChangesAsync(startDate, endDate, page) → {Promise.<*>}

Gets movie changes.
Source:
Parameters:
Name Type Default Description
startDate string The start date.
endDate string The end date.
page Number null The page.
Returns:
Type:
Promise.<*>
A Promise of JSON data with movie changes.

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

Gets the latest movies.
Source:
Returns:
Type:
Promise.<*>
A Promise of JSON data with the latest movies.

getMovie(id) → {exports.Movie}

Gets a Movie instance, based on the passed ID.
Source:
Parameters:
Name Type Description
id string The ID of the movie.
Returns:
Type:
exports.Movie
A Movie object with the passed ID.

(async) getNowPlayingAsync(page, region) → {Promise.<*>}

Gets a list of movies currently playing in theatres.
Source:
Parameters:
Name Type Default Description
page Number null The page.
region string The region.
Returns:
Type:
Promise.<*>
A Promise of JSON data with the movies that are currently playing.

(async) getPopularAsync(page, region) → {Promise.<*>}

Gets popular movies.
Source:
Parameters:
Name Type Default Description
page Number null The page.
region string The region.
Returns:
Type:
Promise.<*>
A Promise of JSON data with popular movies.

(async) getTopRatedAsync(page, region) → {Promise.<*>}

Gets top rated movies.
Source:
Parameters:
Name Type Default Description
page Number null The page.
region string The region.
Returns:
Type:
Promise.<*>
A Promise of JSON data with top rated movies.

(async) getUpcomingAsync(page, region) → {Promise.<*>}

Gets upcoming movies.
Source:
Parameters:
Name Type Default Description
page Number null The page.
region string The region.
Returns:
Type:
Promise.<*>
A Promise of JSON data with upcoming movies.