Added arn to the main repository
This commit is contained in:
15
arn/AnimePopularity.go
Normal file
15
arn/AnimePopularity.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user