Constructor
# new Rating(data)
Creates animation rating data holder
Parameters:
| Name | Type | Description |
|---|---|---|
data |
object
|
Classes
Methods
# async static fromDatabase(data, ctx)
Parameters:
| Name | Type | Description |
|---|---|---|
data |
DBRating
|
DBRatingWithAnimation
|
DBRatingWithAuthor
|
DBRatingFull
|
|
ctx |
RequestContext
|
# async static getRating(id, ctx) → {Promise.<Rating>}
Returns rating with specified id
Parameters:
| Name | Type | Description |
|---|---|---|
id |
SnowflakeResolvable
|
|
ctx |
RequestContext
|
Promise.<Rating>
# async static getUserRating(user, animation, ctx) → {Promise}
Fetches a rating from given user and animation
Parameters:
| Name | Type | Description |
|---|---|---|
user |
UserResolvable
|
|
animation |
AnimationResolvable
|
|
ctx |
RequestContext
|
Promise