34 lines
872 B
Go
Raw Normal View History

2019-06-03 09:32:43 +00:00
package arn
2019-09-10 00:49:51 +00:00
const (
// DefaultRating is the default rating value.
DefaultRating = 0.0
2019-06-03 09:32:43 +00:00
2019-09-10 00:49:51 +00:00
// AverageRating is the center rating in the system.
// Note that the mathematically correct center would be a little higher,
// but we don't care about these slight offsets.
AverageRating = 5.0
2019-06-03 09:32:43 +00:00
2019-09-10 00:49:51 +00:00
// MaxRating is the maximum rating users can give.
MaxRating = 10.0
2019-06-03 09:32:43 +00:00
2019-09-10 00:49:51 +00:00
// RatingCountThreshold is the number of users threshold that, when passed, doesn't dampen the result.
RatingCountThreshold = 4
)
2019-06-03 09:32:43 +00:00
2019-09-10 00:49:51 +00:00
// AnimeRating represents the rating information for an anime.
2019-06-03 09:32:43 +00:00
type AnimeRating struct {
AnimeListItemRating
// The amount of people who rated
Count AnimeRatingCount `json:"count"`
}
// AnimeRatingCount ...
type AnimeRatingCount struct {
Overall int `json:"overall"`
Story int `json:"story"`
Visuals int `json:"visuals"`
Soundtrack int `json:"soundtrack"`
}