Files
nadekobot/src/NadekoBot/Modules/Searches/Common/AnimeResult.cs
Kwoth d5fd6aae8e - More code cleanup and codestyle updates
- Fixed some possible nullref exceptions
- Methods signatures now have up to 3 parameters before breakaing down each parameter in a separate line
- Method invocations have the same rule, except the first parameter will be in the same line as the invocation to prevent some ugliness when passing lambas as arguments
- Applied many more codestyles
- Extensions folder fully reformatted
2021-12-26 17:28:39 +01:00

24 lines
866 B
C#

using Newtonsoft.Json;
namespace NadekoBot.Modules.Searches.Common;
public class AnimeResult
{
public int Id { get; set; }
public string AiringStatus => AiringStatusParsed.ToTitleCase();
[JsonProperty("airing_status")]
public string AiringStatusParsed { get; set; }
[JsonProperty("title_english")]
public string TitleEnglish { get; set; }
[JsonProperty("total_episodes")]
public int TotalEpisodes { get; set; }
public string Description { get; set; }
[JsonProperty("image_url_lge")]
public string ImageUrlLarge { get; set; }
public string[] Genres { get; set; }
[JsonProperty("average_score")]
public string AverageScore { get; set; }
public string Link => "http://anilist.co/anime/" + Id;
public string Synopsis => Description?[..(Description.Length > 500 ? 500 : Description.Length)] + "...";
}