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