Inventaire API: display search image
This commit is contained in:
@@ -15,16 +15,21 @@ type InventaireSearchBook struct {
|
||||
ID string `json:"id"`
|
||||
Label string `json:"label"`
|
||||
Description string `json:"description"`
|
||||
Image string `json:"image"`
|
||||
}
|
||||
|
||||
func computeInventaireUrl(paths ...string) (*url.URL, error) {
|
||||
baseUrl := "https://inventaire.io/api"
|
||||
func GetBaseInventaireUrl() string {
|
||||
return "https://inventaire.io"
|
||||
}
|
||||
|
||||
func computeInventaireApiUrl(paths ...string) (*url.URL, error) {
|
||||
baseUrl := GetBaseInventaireUrl() + "/api"
|
||||
return callapiutils.ComputeUrl(baseUrl, paths...)
|
||||
}
|
||||
|
||||
func CallInventaireSearch(searchterm string, limit int, offset int) (InventaireSearchResult, error) {
|
||||
var queryResult InventaireSearchResult
|
||||
u, err := computeInventaireUrl("search")
|
||||
u, err := computeInventaireApiUrl("search")
|
||||
if err != nil {
|
||||
return queryResult, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user