SearchSection

tmdb-js/sections/types. SearchSection

A class that represents the search section in TMDb.

Constructor

new SearchSection(apiKey, language)

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

Methods

(async) multiSearchAsync(searchTerm, startPage, pageCount, includeAdult) → {Promise.<*>}

Gets data from a multi search in TMDb.
Source:
Parameters:
Name Type Default Description
searchTerm string The search term (query).
startPage Number 1 The first search result page to return data from. The default is 1.
pageCount Number 1 The number of search result pages to return data from. The default is 1.
includeAdult Boolean true true if adult content will be included. The default is true.
Returns:
Type:
Promise.<*>
A Promise of JSON data with multi-search results.

(async) searchCollectionsAsync(searchTerm, startPage, pageCount) → {Promise.<*>}

Gets data from a collection search in TMDb.
Source:
Parameters:
Name Type Default Description
searchTerm string The search term (query).
startPage Number 1 The first search result page to return data from. The default is 1.
pageCount Number 1 The number of search result pages to return data from. The default is 1.
Returns:
Type:
Promise.<*>
A Promise of JSON data with search results of collections.

(async) searchCompaniesAsync(searchTerm, startPage, pageCount) → {Promise.<*>}

Gets data from a company search in TMDb.
Source:
Parameters:
Name Type Default Description
searchTerm string The search term (query).
startPage Number 1 The first search result page to return data from. The default is 1.
pageCount Number 1 The number of search result pages to return data from. The default is 1.
Returns:
Type:
Promise.<*>
A Promise of JSON data with search results of companies.

(async) searchKeywordsAsync(searchTerm, startPage, pageCount) → {Promise.<*>}

Gets data from a keyword search in TMDb.
Source:
Parameters:
Name Type Default Description
searchTerm string The search term (query).
startPage Number 1 The first search result page to return data from. The default is 1.
pageCount Number 1 The number of search result pages to return data from. The default is 1.
Returns:
Type:
Promise.<*>
A Promise of JSON data with search results of keywords.

(async) searchMoviesAsync(searchTerm, startPage, pageCount, includeAdult, region, year, primaryReleaseYear) → {Promise.<*>}

Gets data from a movie search in TMDb.
Source:
Parameters:
Name Type Default Description
searchTerm string The search term (query).
startPage Number 1 The first search result page to return data from. The default is 1.
pageCount Number 1 The number of search result pages to return data from. The default is 1.
includeAdult Boolean true true if adult content will be included. The default is true.
region string The region.
year Number The year.
primaryReleaseYear Number The primary release year.
Returns:
Type:
Promise.<*>
A Promise of JSON data with search results of movies.

(async) searchPeopleAsync(searchTerm, startPage, pageCount, includeAdult, region) → {Promise.<*>}

Gets data from a people search in TMDb.
Source:
Parameters:
Name Type Default Description
searchTerm string The search term (query).
startPage Number 1 The first search result page to return data from. The default is 1.
pageCount Number 1 The number of search result pages to return data from. The default is 1.
includeAdult Boolean true true if adult content will be included. The default is true.
region string The region.
Returns:
Type:
Promise.<*>
A Promise of JSON data with search results of people.

(async) searchTvShowsAsync(searchTerm, startPage, pageCount, includeAdult, firstAirDateYear) → {Promise.<*>}

Gets data from a TV show search in TMDb.
Source:
Parameters:
Name Type Default Description
searchTerm string The search term (query).
startPage Number 1 The first search result page to return data from. The default is 1.
pageCount Number 1 The number of search result pages to return data from. The default is 1.
includeAdult Boolean true true if adult content will be included. The default is true.
firstAirDateYear Number The first air date year.
Returns:
Type:
Promise.<*>
A Promise of JSON data with search results of TV shows.