Added arn to the main repository

This commit is contained in:
2019-06-03 18:32:43 +09:00
parent cf258573a8
commit 29a48d94a5
465 changed files with 15968 additions and 288 deletions

31
arn/AnimeRating.go Normal file
View File

@ -0,0 +1,31 @@
package arn
// DefaultRating is the default rating value.
const DefaultRating = 0.0
// 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.
const AverageRating = 5.0
// MaxRating is the maximum rating users can give.
const MaxRating = 10.0
// RatingCountThreshold is the number of users threshold that, when passed, doesn't dampen the result.
const RatingCountThreshold = 4
// AnimeRating ...
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"`
}