You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
721 B
40 lines
721 B
using Newtonsoft.Json;
|
|
|
|
namespace Booru.Net
|
|
{
|
|
public class BooruImage
|
|
{
|
|
[JsonProperty("id")]
|
|
public int ID { get; set; }
|
|
|
|
[JsonProperty("score")]
|
|
public int Score { get; set; }
|
|
|
|
[JsonProperty("rating")]
|
|
private string Prating { get; set; }
|
|
|
|
public virtual string ImageUrl { get; set; }
|
|
|
|
public virtual string PostUrl { get; set; }
|
|
|
|
public Rating Rating
|
|
{
|
|
get
|
|
{
|
|
if(Prating.ToLowerInvariant().StartsWith("s"))
|
|
{
|
|
return Rating.Safe;
|
|
}
|
|
if(Prating.ToLowerInvariant().StartsWith("q"))
|
|
{
|
|
return Rating.Questionable;
|
|
}
|
|
if(Prating.ToLowerInvariant().StartsWith("e"))
|
|
{
|
|
return Rating.Explicit;
|
|
}
|
|
return Rating.None;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|