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