Add a config to get inventaire.io URL
This commit is contained in:
@@ -24,9 +24,9 @@ func (e *ErrorEditionNotFound) Error() string {
|
||||
return fmt.Sprintf("No edition found on inventaire for id %s\n", e.InventaireId)
|
||||
}
|
||||
|
||||
func CallInventaireEdition(inventaireId string, lang string) (InventaireEditionDetailedSingleResult, error) {
|
||||
func CallInventaireEdition(inventaireUrl string, inventaireId string, lang string) (InventaireEditionDetailedSingleResult, error) {
|
||||
var result InventaireEditionDetailedSingleResult
|
||||
editionQueryResults, err := callInventaireEditionEntities([]string{inventaireId})
|
||||
editionQueryResults, err := callInventaireEditionEntities(inventaireUrl, []string{inventaireId})
|
||||
if err != nil {
|
||||
return result, err
|
||||
}
|
||||
@@ -39,7 +39,7 @@ func CallInventaireEdition(inventaireId string, lang string) (InventaireEditionD
|
||||
|
||||
var publisher string
|
||||
if editionQueryResult.EditionId != "" {
|
||||
publisher, err = callInventairePublisherGetName(editionQueryResult.EditionId, lang)
|
||||
publisher, err = callInventairePublisherGetName(inventaireUrl, editionQueryResult.EditionId, lang)
|
||||
if err != nil {
|
||||
return result, err
|
||||
}
|
||||
@@ -48,7 +48,7 @@ func CallInventaireEdition(inventaireId string, lang string) (InventaireEditionD
|
||||
var author *InventaireAuthorResult
|
||||
var description string
|
||||
if editionQueryResult.WorkId != "" {
|
||||
workQueryResult, err := callInventaireBook(editionQueryResult.WorkId, lang)
|
||||
workQueryResult, err := callInventaireBook(inventaireUrl, editionQueryResult.WorkId, lang)
|
||||
if err != nil {
|
||||
return result, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user