Constructor
# new Animation(data)
Creates new animation data object
Parameters:
| Name | Type | Description |
|---|---|---|
data |
object
|
Extends
Classes
Methods
# static checkData(data) → {boolean}
Checks animation data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
any
|
boolean
# async comment(commentResolvable) → {Promise.<Comment>}
comments on the animation
Parameters:
| Name | Type | Description |
|---|---|---|
commentResolvable |
Comment
|
string
|
Promise.<Comment>
# async getAverageRating() → {Promise.<(number|null)>}
Promise.<(number|null)>
# async getComments(max, page) → {Promise.<Collection.<SnowflakeString, Comment>>}
Fetches comments on the animation
Parameters:
| Name | Type | Description |
|---|---|---|
max |
number
|
items per page |
page |
number
|
Promise.<Collection.<SnowflakeString, Comment>>
# getRatingCount() → {Promise.<number>}
Promise.<number>
# getRatingFrom(user) → {Promise.<(Rating|null)>}
Returns a rating from given user, if any
Parameters:
| Name | Type | Description |
|---|---|---|
user |
UserResolvable
|
Promise.<(Rating|null)>
# async getRatings(max, page) → {Promise.<Collection.<SnowflakeString, Rating>>}
Fetches ratings on the animation
Parameters:
| Name | Type | Description |
|---|---|---|
max |
number
|
items per page |
page |
number
|
Promise.<Collection.<SnowflakeString, Rating>>
# async rate(rateResolvable) → {Promise.<Rating>}
rates the animation
Parameters:
| Name | Type | Description |
|---|---|---|
rateResolvable |
Rating
|
number
|
Promise.<Rating>
# async registerView() → {Promise.<void>}
Promise.<void>
# toJSON() → {Object}
Converts animations to JSON-compatible object for saving resources
- Overrides:
Object
# toMinimal(includeAuthor) → {object}
Returns minimum animation representation
Parameters:
| Name | Type | Description |
|---|---|---|
includeAuthor |
boolean
|
object