Added inventaire import from ISBN

This commit is contained in:
2026-02-02 20:31:57 +01:00
parent 21162cc63e
commit 82db737d30
7 changed files with 167 additions and 48 deletions

View File

@@ -125,3 +125,27 @@ func TestCallInventaireEdition(t *testing.T) {
},
result)
}
func TestCallInventaireEditionFromISBN(t *testing.T) {
result, err := CallInventaireFromISBN("9782070379248", "fr")
if err != nil {
t.Error(err)
}
assert.Equal(t,
&InventaireEditionDetailedSingleResult{
Id: "isbn:9782070379248",
Title: "Du côté de chez swann",
Author: &InventaireAuthorResult{
ID: "Q7199",
Name: "Marcel Proust",
Description: "écrivain, critique et essayiste français",
},
Description: "roman de Marcel Proust",
ISBN: "978-2-07-037924-8",
Publisher: "Éditions Gallimard",
ReleaseDate: "1988",
Image: "https://inventaire.io/img/entities/646a3ef031d6a1adc27cb5f556d2a403a2f525a7",
Lang: "fr",
},
result)
}