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

15
arn/AnimePopularity.go Normal file
View File

@ -0,0 +1,15 @@
package arn
// AnimePopularity shows how many users have that anime in a certain list.
type AnimePopularity struct {
Watching int `json:"watching"`
Completed int `json:"completed"`
Planned int `json:"planned"`
Hold int `json:"hold"`
Dropped int `json:"dropped"`
}
// Total returns the total number of users that added this anime to their collection.
func (p *AnimePopularity) Total() int {
return p.Watching + p.Completed + p.Planned + p.Hold + p.Dropped
}