Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Modrinth.Net/Http/Requester.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class Requester : IRequester
PropertyNameCaseInsensitive = true,
Converters =
{
new ColorConverter(),
new ModrinthColorConverter(),
new JsonStringEnumConverter(JsonNamingPolicy.SnakeCaseLower)
},
PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Modrinth.JsonConverters;

/// <inheritdoc />
public class ColorConverter : JsonConverter<Color?>
public class ModrinthColorConverter : JsonConverter<Color?>
{
/// <inheritdoc />
public override Color? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Expand Down
2 changes: 2 additions & 0 deletions src/Modrinth.Net/Models/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Drawing;
using System.Text.Json.Serialization;
using Modrinth.Helpers;
using Modrinth.JsonConverters;
using Modrinth.Models.Enums;
using Modrinth.Models.Enums.Project;

Expand Down Expand Up @@ -172,6 +173,7 @@ public class Project
/// <summary>
/// The RGB color of the project, automatically generated from the project icon
/// </summary>
[JsonConverter(typeof(ModrinthColorConverter))]
public Color? Color { get; set; }

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions src/Modrinth.Net/Models/SearchResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Drawing;
using System.Text.Json.Serialization;
using Modrinth.Helpers;
using Modrinth.JsonConverters;
using Modrinth.Models.Enums;
using Modrinth.Models.Enums.Project;

Expand Down Expand Up @@ -124,6 +125,7 @@ public class SearchResult
/// <summary>
/// The RGB color of the project, automatically generated from the project icon
/// </summary>
[JsonConverter(typeof(ModrinthColorConverter))]
public Color? Color { get; set; }

/// <summary>
Expand Down
Loading