mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 17:11:10 +00:00
Maps OpenLibrary MARC publish_country to ReleaseCountry
Adds publish_country to the Open Library edition response, translates MARC 21 country codes into the ReleaseCountry enumeration through a private table, and drops the city based publish_places mapping. Closes #222
This commit is contained in:
1 parent
3350f19c1d
commit
c6469e70cf
7 files changed
+365
-27
No files matched your search
+3
-3
@@ -25,7 +25,7 @@ internal class OpenLibraryEditionResponseFixture
|
||||
/// <param name="notes">Optional. The notes of the edition.</param>
|
||||
/// <param name="publishDate">Optional. The publication date of the edition.</param>
|
||||
/// <param name="publishers">Optional. The publishers of the edition.</param>
|
||||
/// <param name="publishPlaces">Optional. The publication places of the edition.</param>
|
||||
/// <param name="publishCountry">Optional. The MARC 21 country code of the publication place of the edition.</param>
|
||||
/// <param name="numberOfPages">Optional. The number of pages of the edition.</param>
|
||||
/// <param name="physicalFormat">Optional. The physical format of the edition.</param>
|
||||
/// <param name="editionName">Optional. The name of the edition.</param>
|
||||
@@ -49,7 +49,7 @@ internal class OpenLibraryEditionResponseFixture
|
||||
JsonElement? notes = null,
|
||||
string? publishDate = null,
|
||||
List<string>? publishers = null,
|
||||
List<string>? publishPlaces = null,
|
||||
string? publishCountry = null,
|
||||
int? numberOfPages = null,
|
||||
string? physicalFormat = null,
|
||||
string? editionName = null,
|
||||
@@ -74,7 +74,7 @@ internal class OpenLibraryEditionResponseFixture
|
||||
Notes = notes ?? default,
|
||||
PublishDate = publishDate,
|
||||
Publishers = publishers ?? [],
|
||||
PublishPlaces = publishPlaces ?? [],
|
||||
PublishCountry = publishCountry,
|
||||
NumberOfPages = numberOfPages,
|
||||
PhysicalFormat = physicalFormat,
|
||||
EditionName = editionName,
|
||||
|
||||
-3
@@ -28,7 +28,6 @@ internal class OpenLibrarySearchDocumentResponseFixture
|
||||
/// <param name="languages">Optional. The languages of the search document.</param>
|
||||
/// <param name="publishers">Optional. The publishers of the search document.</param>
|
||||
/// <param name="subjects">Optional. The subjects of the search document.</param>
|
||||
/// <param name="publishPlaces">Optional. The publication places of the search document.</param>
|
||||
/// <param name="numberOfPagesMedian">Optional. The median number of pages of the search document.</param>
|
||||
/// <param name="ratingsAverage">Optional. The average rating of the search document.</param>
|
||||
/// <param name="ratingsCount">Optional. The number of ratings of the search document.</param>
|
||||
@@ -50,7 +49,6 @@ internal class OpenLibrarySearchDocumentResponseFixture
|
||||
List<string>? languages = null,
|
||||
List<string>? publishers = null,
|
||||
List<string>? subjects = null,
|
||||
List<string>? publishPlaces = null,
|
||||
int? numberOfPagesMedian = null,
|
||||
decimal? ratingsAverage = null,
|
||||
int? ratingsCount = null,
|
||||
@@ -73,7 +71,6 @@ internal class OpenLibrarySearchDocumentResponseFixture
|
||||
Languages = languages ?? [],
|
||||
Publishers = publishers ?? [],
|
||||
Subjects = subjects ?? [],
|
||||
PublishPlaces = publishPlaces ?? [],
|
||||
NumberOfPagesMedian = numberOfPagesMedian,
|
||||
RatingsAverage = ratingsAverage,
|
||||
RatingsCount = ratingsCount,
|
||||
|
||||
Reference in new issue
Block a user