Пример #1
0
 public static AnimeRate GetRateByTitleId(int title_id)
 {
     try
     {
         return(new AnimeRate(ShikiApiStatic.GetAnimeFullInfo(title_id).UserRate));
     }
     catch (Exception)
     {
         return(null); // not found title
     }
 }
Пример #2
0
        public AnimeRate(_UserRate_v2 rate_upd)
        {
            CompletedEpisodes = rate_upd.episodes;
            UserStatus        = rate_upd.status;
            Score             = rate_upd.score;
            UserRateId        = rate_upd.id;
            TitleId           = rate_upd.target_id;

            var title = ShikiApiStatic.GetAnimeFullInfo(TitleId);

            Name          = title.Name;
            RusName       = title.RusName;
            Poster        = title.Poster;
            Url           = title.Url;
            Kind          = title.Kind;
            TitleStatus   = title.TitleStatus;
            AiredOn       = title.AiredOn;
            ReleasedOn    = title.ReleasedOn;
            TotalEpisodes = title.TotalEpisodes;
            AiredEpisodes = title.AiredEpisodes;
        }