Mercurial > minori
diff include/core/anime.h @ 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 | 53e3c015a973 |
children | 1b5c04268d6a |
line wrap: on
line diff
--- a/include/core/anime.h Tue Jun 11 15:11:09 2024 -0400 +++ b/include/core/anime.h Wed Jun 12 04:07:10 2024 -0400 @@ -111,7 +111,7 @@ ScoreFormat::Point10, ScoreFormat::Point5, ScoreFormat::Point3}; struct ListInformation { - int id = 0; + std::string id; int progress = 0; int score = 0; // this will ALWAYS be in POINT_100 format internally ListStatus status = ListStatus::NotInList; @@ -135,7 +135,7 @@ std::vector<std::string> genres; std::vector<std::string> producers; SeriesFormat format = SeriesFormat::Unknown; - int audience_score = 0; + double audience_score = 0; std::string synopsis; int duration = 0; std::string poster_url; @@ -144,6 +144,7 @@ class Anime { public: /* User list data */ + std::string GetUserId() const; ListStatus GetUserStatus() const; int GetUserProgress() const; int GetUserScore() const; @@ -156,6 +157,7 @@ uint64_t GetUserTimeUpdated() const; std::string GetUserNotes() const; + void SetUserId(const std::string& id); void SetUserStatus(ListStatus status); void SetUserScore(int score); void SetUserProgress(int progress); @@ -179,7 +181,7 @@ std::vector<std::string> GetProducers() const; SeriesFormat GetFormat() const; SeriesSeason GetSeason() const; - int GetAudienceScore() const; + double GetAudienceScore() const; std::string GetSynopsis() const; int GetDuration() const; std::string GetPosterUrl() const; @@ -196,7 +198,7 @@ void SetGenres(std::vector<std::string> const& genres); void SetProducers(std::vector<std::string> const& producers); void SetFormat(SeriesFormat format); - void SetAudienceScore(int audience_score); + void SetAudienceScore(double audience_score); void SetSynopsis(std::string synopsis); void SetDuration(int duration); void SetPosterUrl(std::string poster);