wabbajack/Wabbajack.Downloaders.IPS4OAuth2Downloader/IPS4OAuthFilesResponse.cs

290 lines
7.2 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
2021-09-27 12:42:46 +00:00
using System.Text.Json.Serialization;
2021-09-27 12:42:46 +00:00
namespace Wabbajack.Downloaders.IPS4OAuth2Downloader
{
public class IPS4OAuthFilesResponse
{
// Root myDeserializedClass = JsonConvert.DeserializeObject<Root>(myJsonResponse);
public class Category
{
2021-09-27 12:42:46 +00:00
[JsonPropertyName("id")]
public int Id { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("name")]
public string? Name { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("url")]
public string? Url { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("class")]
public string? Class { get; set; }
}
public class PrimaryGroup
{
2021-09-27 12:42:46 +00:00
[JsonPropertyName("id")]
public int Id { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("name")]
public string? Name { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("formattedName")]
public string? FormattedName { get; set; }
}
public class Author
{
2021-09-27 12:42:46 +00:00
[JsonPropertyName("id")]
public int? Id { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("name")]
public string? Name { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("title")]
public string? Title { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("formattedName")]
public string? FormattedName { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("primaryGroup")]
public PrimaryGroup? PrimaryGroup { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("joined")]
public DateTime Joined { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("reputationPoints")]
public int ReputationPoints { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("photoUrl")]
public string? PhotoUrl { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("photoUrlIsDefault")]
public bool PhotoUrlIsDefault { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("coverPhotoUrl")]
public string? CoverPhotoUrl { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("profileUrl")]
public string? ProfileUrl { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("posts")]
public int Posts { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("lastActivity")]
2021-06-19 04:05:58 +00:00
public DateTime? LastActivity { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("lastVisit")]
2021-06-19 04:05:58 +00:00
public DateTime? LastVisit { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("lastPost")]
2021-06-19 04:05:58 +00:00
public DateTime? LastPost { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("profileViews")]
public int? ProfileViews { get; set; }
}
public class File
{
2021-09-27 12:42:46 +00:00
[JsonPropertyName("name")]
public string? Name { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("url")]
public string? Url { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("size")]
public long? Size { get; set; }
}
public class Screenshot
{
2021-09-27 12:42:46 +00:00
[JsonPropertyName("name")]
public string? Name { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("url")]
public string? Url { get; set; }
}
public class PrimaryScreenshot
{
2021-09-27 12:42:46 +00:00
[JsonPropertyName("name")]
public string? Name { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("url")]
public string? Url { get; set; }
}
public class Forum
{
2021-09-27 12:42:46 +00:00
[JsonPropertyName("id")]
public int Id { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("name")]
public string? Name { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("topics")]
public int Topics { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("url")]
public string? Url { get; set; }
}
public class FirstPost
{
2021-09-27 12:42:46 +00:00
[JsonPropertyName("id")]
public int Id { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("item_id")]
public int ItemId { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("author")]
public Author? Author { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("date")]
public DateTime Date { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("content")]
public string? Content { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("hidden")]
public bool Hidden { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("url")]
public string? Url { get; set; }
}
public class LastPost
{
2021-09-27 12:42:46 +00:00
[JsonPropertyName("id")]
public int Id { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("item_id")]
public int ItemId { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("author")]
public Author? Author { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("date")]
public DateTime Date { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("content")]
public string? Content { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("hidden")]
public bool Hidden { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("url")]
public string? Url { get; set; }
}
public class Topic
{
2021-09-27 12:42:46 +00:00
[JsonPropertyName("id")]
public int Id { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("title")]
public string? Title { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("forum")]
public Forum? Forum { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("posts")]
public int Posts { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("views")]
public int Views { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("locked")]
public bool Locked { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("hidden")]
public bool Hidden { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("pinned")]
public bool Pinned { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("featured")]
public bool Featured { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("archived")]
public bool Archived { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("url")]
public string? Url { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("rating")]
public double Rating { get; set; }
}
public class Root
{
2021-09-27 12:42:46 +00:00
[JsonPropertyName("id")]
public int Id { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("title")]
public string? Title { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("category")]
public Category? Category { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("author")]
public Author? Author { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("date")]
public DateTime Date { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("description")]
public string? Description { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("version")]
public string? Version { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("changelog")]
public string? Changelog { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("files")] public List<File> Files { get; set; } = new();
2021-09-27 12:42:46 +00:00
[JsonPropertyName("screenshots")] public List<Screenshot> Screenshots { get; set; } = new();
2021-09-27 12:42:46 +00:00
[JsonPropertyName("primaryScreenshot")]
public PrimaryScreenshot PrimaryScreenshot { get; set; } = new();
2021-09-27 12:42:46 +00:00
[JsonPropertyName("downloads")]
public int Downloads { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("comments")]
public int Comments { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("reviews")]
public int Reviews { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("views")]
public int Views { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("tags")] public List<string?> Tags { get; set; } = new ();
2021-09-27 12:42:46 +00:00
[JsonPropertyName("locked")]
public bool Locked { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("hidden")]
public bool Hidden { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("pinned")]
public bool Pinned { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("featured")]
public bool Featured { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("url")]
public string? Url { get; set; }
2021-09-27 12:42:46 +00:00
[JsonPropertyName("topic")] public Topic Topic { get; set; } = new();
}
}
}