Members
(constant) getConfig
Returns configuration information from TMDb.
(constant) getTVGenres
Returns a TV Genre map from TMDb.
(constant) getMovieGenres
Returns a Movie Genre map from TMDb.
Methods
initTMDB(apiKey, options)
Initialization function that MUST be run before any other function can be accessed. Set a number of constants that can be accessed by calling the getTMDBConsts() function or by importing the constants themselves
Parameters:
Name | Type | Description |
---|---|---|
apiKey |
string | required API Key to access TMDB |
options |
object | options object { dateFormatString //dateFormatString as used by fns-date https://date-fns.org/v2.7.0/docs/format } |
updateAPIOptions(options)
Updates the API_OPTIONS objects
Parameters:
Name | Type | Description |
---|---|---|
options |
object | options object { dateFormatString //dateFormatString as used by fns-date https://date-fns.org/v2.7.0/docs/format } |
getTMDBConsts()
This function returns the needed constants that the TDMB calls need to get their data
Parameters:
Type | Description |
---|---|
object | TMDB Constants |
convertGenreToObj(genres)
Take array of genre objects and convert to object: { [id]: genre name, }
Parameters:
Name | Type | Description |
---|---|---|
genres |
object |
Type Definitions
ErrorObj
- Source:
Properties:
Name | Type | Description |
---|---|---|
error |
Object | the error object thrown from original error. Assuming from axios |
status |
string | err.response.request.status |
status |
string | err.response.request.statusText |
status |
string | err.response.request.responseURL |
Type:
- Object
searchForPersonId_typedef
- Source:
Properties:
Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | the data object Properties
|
|||||||||||||||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
getPersonDetails_typedef
- Source:
Properties:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | results of the search Properties
|
||||||||||||||||||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
getPersonImages_typedef
- Source:
Properties:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
array | results of the search Properties
|
|||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
imagesReturn_typedef
- Source:
Properties:
Name | Type | Description |
---|---|---|
data |
Array | Array of image URLs |
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
movieWatchProviders_typedef
- Source:
Properties:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | the data object Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
movieSearchByTitle_typedef
- Source:
Properties:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | the data object Properties
|
|||||||||||||||||||||||||||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
movieDetails_typedef
- Source:
Properties:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | the data object Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
movieVideos_typedef
- Source:
Properties:
Name | Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Array | the data array is an array of objects Properties
|
|||||||||||||||||||||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
moviesRecommendations_typedef
- Source:
Properties:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | the data object Properties
|
|||||||||||||||||||||||||||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
moviesPopular_typedef
- Source:
Properties:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | the data object Properties
|
|||||||||||||||||||||||||||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
movieCredits_typedef
- Source:
Properties:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | the data object Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
moviePersonCredits_typedef
- Source:
Properties:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | the data object Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
movieDiscover_typedef
- Source:
Properties:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | the data object Properties
|
|||||||||||||||||||||||||||||||||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
movieDiscoverCriteria_typedef
- Source:
Properties:
Name | Type | Description |
---|---|---|
genres |
Array | genre Ids |
releaseYear |
int | Primary Release Year |
releaseDateGTE |
date | string | movies with release date >= date YYYY-MM-DD format either JS Date or string "YYYY-MM-DD" |
releaseDateLTE |
date | string | movies with release date <= date YYYY-MM-DD format either JS Date or string "YYYY-MM-DD" |
cast |
Array | person Ids. Only include movies that have one of the Id's added as an actor |
crew |
Array | person Ids. Only include movies that have one of the Id's added as a crew member |
watchProviders |
Array | Watch providers ids to search limit search by. Couple with region if desired |
watchRegions |
Array | An ISO 3166-1 code. Combine this filter with with_watch_providers in order to filter your results by a specific watch provider in a specific region. > As of 2/2021 a region must be used or no filtering will occur. US is sent over as a default. |
sortBy |
string | Options
|
Type:
- Object
tvGetImages_typedef
- Source:
Properties:
Name | Type | Description |
---|---|---|
data |
Array | array of image URLs (https://...) |
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
tvSearchByTitle_typedef
- Source:
Properties:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | the data object Properties
|
||||||||||||||||||||||||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
tvShowDetails_typedef
- Source:
Properties:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | the data object Properties
|
||||||||||||||||||||||||||||||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object
tvCredits_typedef
- Source:
Properties:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | the data object Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
apiCall |
string | the API call used to hit endpoint |
Type:
- Object