Constructor
new TrendingSection(timeWindow, apiKey, language)
Initializes this object.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
timeWindow |
string
|
The time window of this trending section (see tmdb_utils.timeWindows). | |
apiKey |
string
|
The TMDb API key. | |
language |
string
|
en-US | The language of queries, the default is "en-US". |
Members
_timeWindow
The time window of this trending section.
Methods
(async) getAllAsync() → {Promise.<*>}
Gets the all trending media (movies, TV shows, people)
in the passed time window. See tmdb_utils.timeWindow for the valid types.
Returns:
- Type:
-
Promise.<*>
A Promise of trending media data in JSON format.
(async) getMoviesAsync() → {Promise.<*>}
Gets the trending movies in the passed time window.
See tmdb_utils.timeWindow for the valid types.
Returns:
- Type:
-
Promise.<*>
A Promise of trending movie data in JSON format.
(async) getPeopleAsync() → {Promise.<*>}
Gets the trending people in the passed time window.
See tmdb_utils.timeWindow for the valid types.
Returns:
- Type:
-
Promise.<*>
A Promise of trending people data in JSON format.
(async) getTvShowsAsync() → {Promise.<*>}
Gets the trending TV shows in the passed time window.
See tmdb_utils.timeWindow for the valid types.
Returns:
- Type:
-
Promise.<*>
A Promise of trending TV show data in JSON format.