Constructor
new Section(name, parent, apiKey, language)
Initializes this object.
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
name |
string
|
The name of this section. | |
parent |
exports.Section
|
null | The parent section of this section. |
apiKey |
string
|
The TMDb API key. | |
language |
string
|
en-US | The language of queries, the default is "en-US". |
Members
Methods
createChild(name) → {exports.Section}
Creates a new child section instance.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
The name of the child section. |
Returns:
- Type:
-
exports.Section
A section that is a child of this one.
(async) getChildQueryResultAsync(childName, urlParameters, appendUrlParameters) → {Promise.<*>}
Gets the query results of the child
section with the passed name.
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
childName |
string
|
The name of the child section. | |
urlParameters |
Object
|
The url parameters to use. If null, the API key and language of this object will be used. | |
appendUrlParameters |
boolean
|
true | A value indicating whether to append the passed URL parameters to the base set or to replace it. |
Returns:
- Type:
-
Promise.<*>
A Promise of JSON data based on the child section.
(async) getQueryResultAsync(urlParameters, appendUrlParameters) → {Promise.<*>}
Gets the section data from TMDb.
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
urlParameters |
Object
|
The url parameters to use. If null, the API key and language of this object will be used. | |
appendUrlParameters |
boolean
|
true | A value indicating whether to append the passed URL parameters to the base set or to replace it. |
Returns:
- Type:
-
Promise.<*>
A Promise of JSON data based on this section.
toString() → {string}
Returns this section in a string format.
- Source:
Returns:
- Type:
-
string
This object as a string.