new RateableSection(name, parent, apiKey, language)
Sets properties.
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
name |
string
|
The name of this section. | |
parent |
exports.Section
|
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". |
Methods
(async) deleteRatingAsync(sessionId, guestSessionId) → {Promise.<boolean>}
Deletes the rating from the movie in question.
The sessionId and guestSessionId parameters are mutually exclusive.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
sessionId |
string
|
The session ID. |
guestSessionId |
string
|
The guest session ID. |
Returns:
- Type:
-
Promise.<boolean>
A Promise of a boolean value,
which will be true if the deletion was successful.
(async) rateAsync(rating, sessionId, guestSessionId) → {Promise.<boolean>}
Rates the movie in question. The parameters sessionId and
guestSessionId are mutually exclusive.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
rating |
Number
|
The rating, in the range [0.5, 10]. |
sessionId |
string
|
The session id. |
guestSessionId |
string
|
The guest session id. |
Returns:
- Type:
-
Promise.<boolean>
A Promise of a boolean value, which will be true
if the rating is successful.