Add language to inventaire search book
This commit is contained in:
@@ -27,12 +27,15 @@ func computeInventaireApiUrl(paths ...string) (*url.URL, error) {
|
||||
return callapiutils.ComputeUrl(baseUrl, paths...)
|
||||
}
|
||||
|
||||
func CallInventaireSearch(searchterm string, limit int, offset int) (InventaireSearchResult, error) {
|
||||
func CallInventaireSearch(searchterm string, lang string, limit int, offset int) (InventaireSearchResult, error) {
|
||||
var queryResult InventaireSearchResult
|
||||
u, err := computeInventaireApiUrl("search")
|
||||
if err != nil {
|
||||
return queryResult, err
|
||||
}
|
||||
if lang != "" {
|
||||
callapiutils.AddQueryParam(u, "lang", lang)
|
||||
}
|
||||
if limit != 0 {
|
||||
callapiutils.AddQueryParamInt(u, "limit", limit)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user