Mercurial > minori
diff src/core/anime.cc @ 317:b1f4d1867ab1
services: VERY initial Kitsu support
it only supports user authentication for now, but it's definitely
a start.
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 12 Jun 2024 04:07:10 -0400 |
parents | 91ac90a34003 |
children | 5d3c9b31aa6e |
line wrap: on
line diff
--- a/src/core/anime.cc Tue Jun 11 15:11:09 2024 -0400 +++ b/src/core/anime.cc Wed Jun 12 04:07:10 2024 -0400 @@ -33,6 +33,11 @@ list_info_.reset(); } +std::string Anime::GetUserId() const { + assert(list_info_.has_value()); + return list_info_->id; +} + ListStatus Anime::GetUserStatus() const { assert(list_info_.has_value()); return list_info_->status; @@ -117,6 +122,11 @@ return list_info_->notes; } +void Anime::SetUserId(const std::string& id) { + assert(list_info_.has_value()); + list_info_->id = id; +} + void Anime::SetUserStatus(ListStatus status) { assert(list_info_.has_value()); list_info_->status = status; @@ -235,7 +245,7 @@ return (month.has_value() ? GetSeasonForMonth(month.value()) : SeriesSeason::Unknown); } -int Anime::GetAudienceScore() const { +double Anime::GetAudienceScore() const { return info_.audience_score; } @@ -311,7 +321,7 @@ info_.format = format; } -void Anime::SetAudienceScore(int audience_score) { +void Anime::SetAudienceScore(double audience_score) { info_.audience_score = audience_score; }