Renames project paths from Lumina to Nemera

This commit is contained in:
BinaryAlley committed 2026-11-27 15:34:43 +02:00
1 parent ce6fddb4c9
commit 0f659a4877
6450 files changed

No files matched your search

@@ -0,0 +1,29 @@
#region ========================================================================= USING =====================================================================================
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Plugins.OpenLibrary.Common.Models.Contracts.Responses;
/// <summary>
/// Represents a response for an author from the Open Library API.
/// </summary>
internal sealed record OpenLibraryAuthorResponse
{
/// <summary>
/// Gets the key of the author.
/// </summary>
[JsonPropertyName("key")]
public string? Key { get; init; }
/// <summary>
/// Gets the name of the author.
/// </summary>
[JsonPropertyName("name")]
public string? Name { get; init; }
/// <summary>
/// Gets the personal name of the author.
/// </summary>
[JsonPropertyName("personal_name")]
public string? PersonalName { get; init; }
}
@@ -0,0 +1,145 @@
#region ========================================================================= USING =====================================================================================
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Plugins.OpenLibrary.Common.Models.Contracts.Responses;
/// <summary>
/// Represents a response for an edition from the Open Library API.
/// </summary>
internal sealed record OpenLibraryEditionResponse
{
/// <summary>
/// Gets the key of the edition.
/// </summary>
[JsonPropertyName("key")]
public string? Key { get; init; }
/// <summary>
/// Gets the title of the edition.
/// </summary>
[JsonPropertyName("title")]
public string? Title { get; init; }
/// <summary>
/// Gets the subtitle of the edition.
/// </summary>
[JsonPropertyName("subtitle")]
public string? Subtitle { get; init; }
/// <summary>
/// Gets the notes of the edition.
/// </summary>
[JsonPropertyName("notes")]
public JsonElement Notes { get; init; }
/// <summary>
/// Gets the publication date of the edition.
/// </summary>
[JsonPropertyName("publish_date")]
public string? PublishDate { get; init; }
/// <summary>
/// Gets the publishers of the edition.
/// </summary>
[JsonPropertyName("publishers")]
public List<string> Publishers { get; init; } = [];
/// <summary>
/// Gets the MARC 21 country code of the publication place of the edition.
/// </summary>
[JsonPropertyName("publish_country")]
public string? PublishCountry { get; init; }
/// <summary>
/// Gets the number of pages of the edition.
/// </summary>
[JsonPropertyName("number_of_pages")]
public int? NumberOfPages { get; init; }
/// <summary>
/// Gets the physical format of the edition.
/// </summary>
[JsonPropertyName("physical_format")]
public string? PhysicalFormat { get; init; }
/// <summary>
/// Gets the name of the edition.
/// </summary>
[JsonPropertyName("edition_name")]
public string? EditionName { get; init; }
/// <summary>
/// Gets the series the edition belongs to.
/// </summary>
[JsonPropertyName("series")]
public List<string> Series { get; init; } = [];
/// <summary>
/// Gets the volume of the edition within its series.
/// </summary>
[JsonPropertyName("volume")]
public string? Volume { get; init; }
/// <summary>
/// Gets the ISBN-10 identifiers of the edition.
/// </summary>
[JsonPropertyName("isbn_10")]
public List<string> Isbn10 { get; init; } = [];
/// <summary>
/// Gets the ISBN-13 identifiers of the edition.
/// </summary>
[JsonPropertyName("isbn_13")]
public List<string> Isbn13 { get; init; } = [];
/// <summary>
/// Gets the LCCN identifiers of the edition.
/// </summary>
[JsonPropertyName("lccn")]
public List<string> Lccn { get; init; } = [];
/// <summary>
/// Gets the OCLC numbers of the edition.
/// </summary>
[JsonPropertyName("oclc_numbers")]
public List<string> OclcNumbers { get; init; } = [];
/// <summary>
/// Gets the external identifiers of the edition, keyed by identifier name.
/// </summary>
[JsonPropertyName("identifiers")]
public JsonElement Identifiers { get; init; }
/// <summary>
/// Gets the source records of the edition.
/// </summary>
[JsonPropertyName("source_records")]
public List<string> SourceRecords { get; init; } = [];
/// <summary>
/// Gets the languages of the edition.
/// </summary>
[JsonPropertyName("languages")]
public List<OpenLibraryKeyReferenceResponse> Languages { get; init; } = [];
/// <summary>
/// Gets the authors of the edition.
/// </summary>
[JsonPropertyName("authors")]
public List<OpenLibraryKeyReferenceResponse> Authors { get; init; } = [];
/// <summary>
/// Gets the works the edition belongs to.
/// </summary>
[JsonPropertyName("works")]
public List<OpenLibraryKeyReferenceResponse> Works { get; init; } = [];
/// <summary>
/// Gets the contributions of the edition.
/// </summary>
[JsonPropertyName("contributions")]
public List<string> Contributions { get; init; } = [];
}
@@ -0,0 +1,18 @@
#region ========================================================================= USING =====================================================================================
using System.Collections.Generic;
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Plugins.OpenLibrary.Common.Models.Contracts.Responses;
/// <summary>
/// Represents a response for the editions of a work from the Open Library API.
/// </summary>
internal sealed record OpenLibraryEditionsResponse
{
/// <summary>
/// Gets the editions of the work.
/// </summary>
[JsonPropertyName("entries")]
public List<OpenLibraryEditionResponse> Entries { get; init; } = [];
}
@@ -0,0 +1,17 @@
#region ========================================================================= USING =====================================================================================
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Plugins.OpenLibrary.Common.Models.Contracts.Responses;
/// <summary>
/// Represents a response for a reference to a resource of the Open Library API by its key.
/// </summary>
internal sealed record OpenLibraryKeyReferenceResponse
{
/// <summary>
/// Gets the key of the referenced resource.
/// </summary>
[JsonPropertyName("key")]
public string? Key { get; init; }
}
@@ -0,0 +1,23 @@
#region ========================================================================= USING =====================================================================================
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Plugins.OpenLibrary.Common.Models.Contracts.Responses;
/// <summary>
/// Represents a response for the summary of the ratings of a work from the Open Library API.
/// </summary>
internal sealed record OpenLibraryRatingSummaryResponse
{
/// <summary>
/// Gets the average rating of the work.
/// </summary>
[JsonPropertyName("average")]
public decimal? Average { get; init; }
/// <summary>
/// Gets the number of ratings of the work.
/// </summary>
[JsonPropertyName("count")]
public int? Count { get; init; }
}
@@ -0,0 +1,17 @@
#region ========================================================================= USING =====================================================================================
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Plugins.OpenLibrary.Common.Models.Contracts.Responses;
/// <summary>
/// Represents a response for the ratings of a work from the Open Library API.
/// </summary>
internal sealed record OpenLibraryRatingsResponse
{
/// <summary>
/// Gets the summary of the ratings of the work.
/// </summary>
[JsonPropertyName("summary")]
public OpenLibraryRatingSummaryResponse? Summary { get; init; }
}
@@ -0,0 +1,126 @@
#region ========================================================================= USING =====================================================================================
using System.Collections.Generic;
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Plugins.OpenLibrary.Common.Models.Contracts.Responses;
/// <summary>
/// Represents a response for a search document from the Open Library API.
/// </summary>
internal sealed record OpenLibrarySearchDocumentResponse
{
/// <summary>
/// Gets the key of the search document.
/// </summary>
[JsonPropertyName("key")]
public string? Key { get; init; }
/// <summary>
/// Gets the title of the search document.
/// </summary>
[JsonPropertyName("title")]
public string? Title { get; init; }
/// <summary>
/// Gets the author names of the search document.
/// </summary>
[JsonPropertyName("author_name")]
public List<string> AuthorNames { get; init; } = [];
/// <summary>
/// Gets the author keys of the search document.
/// </summary>
[JsonPropertyName("author_key")]
public List<string> AuthorKeys { get; init; } = [];
/// <summary>
/// Gets the first publication year of the search document.
/// </summary>
[JsonPropertyName("first_publish_year")]
public int? FirstPublishYear { get; init; }
/// <summary>
/// Gets the edition keys of the search document.
/// </summary>
[JsonPropertyName("edition_key")]
public List<string> EditionKeys { get; init; } = [];
/// <summary>
/// Gets the ISBNs of the search document.
/// </summary>
[JsonPropertyName("isbn")]
public List<string> Isbns { get; init; } = [];
/// <summary>
/// Gets the languages of the search document.
/// </summary>
[JsonPropertyName("language")]
public List<string> Languages { get; init; } = [];
/// <summary>
/// Gets the publishers of the search document.
/// </summary>
[JsonPropertyName("publisher")]
public List<string> Publishers { get; init; } = [];
/// <summary>
/// Gets the subjects of the search document.
/// </summary>
[JsonPropertyName("subject")]
public List<string> Subjects { get; init; } = [];
/// <summary>
/// Gets the median number of pages of the search document.
/// </summary>
[JsonPropertyName("number_of_pages_median")]
public int? NumberOfPagesMedian { get; init; }
/// <summary>
/// Gets the average rating of the search document.
/// </summary>
[JsonPropertyName("ratings_average")]
public decimal? RatingsAverage { get; init; }
/// <summary>
/// Gets the number of ratings of the search document.
/// </summary>
[JsonPropertyName("ratings_count")]
public int? RatingsCount { get; init; }
/// <summary>
/// Gets the Amazon identifiers of the search document.
/// </summary>
[JsonPropertyName("id_amazon")]
public List<string> AmazonIds { get; init; } = [];
/// <summary>
/// Gets the Goodreads identifiers of the search document.
/// </summary>
[JsonPropertyName("id_goodreads")]
public List<string> GoodreadsIds { get; init; } = [];
/// <summary>
/// Gets the Google identifiers of the search document.
/// </summary>
[JsonPropertyName("id_google")]
public List<string> GoogleIds { get; init; } = [];
/// <summary>
/// Gets the LibraryThing identifiers of the search document.
/// </summary>
[JsonPropertyName("id_librarything")]
public List<string> LibraryThingIds { get; init; } = [];
/// <summary>
/// Gets the LCCN identifiers of the search document.
/// </summary>
[JsonPropertyName("lccn")]
public List<string> Lccn { get; init; } = [];
/// <summary>
/// Gets the OCLC identifiers of the search document.
/// </summary>
[JsonPropertyName("oclc")]
public List<string> Oclc { get; init; } = [];
}
@@ -0,0 +1,18 @@
#region ========================================================================= USING =====================================================================================
using System.Collections.Generic;
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Plugins.OpenLibrary.Common.Models.Contracts.Responses;
/// <summary>
/// Represents a response for a search from the Open Library API.
/// </summary>
internal sealed record OpenLibrarySearchResponse
{
/// <summary>
/// Gets the documents that match the search.
/// </summary>
[JsonPropertyName("docs")]
public List<OpenLibrarySearchDocumentResponse> Documents { get; init; } = [];
}
@@ -0,0 +1,23 @@
#region ========================================================================= USING =====================================================================================
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Plugins.OpenLibrary.Common.Models.Contracts.Responses;
/// <summary>
/// Represents a response for an author reference within a work from the Open Library API.
/// </summary>
internal sealed record OpenLibraryWorkAuthorResponse
{
/// <summary>
/// Gets the author of the work.
/// </summary>
[JsonPropertyName("author")]
public OpenLibraryKeyReferenceResponse? Author { get; init; }
/// <summary>
/// Gets the key of the author reference.
/// </summary>
[JsonPropertyName("key")]
public string? Key { get; init; } // Older records can contain a direct key rather than an author wrapper.
}
@@ -0,0 +1,67 @@
#region ========================================================================= USING =====================================================================================
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Plugins.OpenLibrary.Common.Models.Contracts.Responses;
/// <summary>
/// Represents a response for a work from the Open Library API.
/// </summary>
internal sealed record OpenLibraryWorkResponse
{
/// <summary>
/// Gets the key of the work.
/// </summary>
[JsonPropertyName("key")]
public string? Key { get; init; }
/// <summary>
/// Gets the title of the work.
/// </summary>
[JsonPropertyName("title")]
public string? Title { get; init; }
/// <summary>
/// Gets the original title of the work.
/// </summary>
[JsonPropertyName("original_title")]
public string? OriginalTitle { get; init; }
/// <summary>
/// Gets the description of the work.
/// </summary>
[JsonPropertyName("description")]
public JsonElement Description { get; init; }
/// <summary>
/// Gets the first publication date of the work.
/// </summary>
[JsonPropertyName("first_publish_date")]
public string? FirstPublishDate { get; init; }
/// <summary>
/// Gets the subjects of the work.
/// </summary>
[JsonPropertyName("subjects")]
public List<string> Subjects { get; init; } = [];
/// <summary>
/// Gets the genres of the work.
/// </summary>
[JsonPropertyName("genres")]
public List<string> Genres { get; init; } = [];
/// <summary>
/// Gets the authors of the work.
/// </summary>
[JsonPropertyName("authors")]
public List<OpenLibraryWorkAuthorResponse> Authors { get; init; } = [];
/// <summary>
/// Gets the original languages of the work.
/// </summary>
[JsonPropertyName("original_languages")]
public List<OpenLibraryKeyReferenceResponse> OriginalLanguages { get; init; } = [];
}