aboutsummaryrefslogtreecommitdiff
path: root/mal/search.go
diff options
context:
space:
mode:
Diffstat (limited to 'mal/search.go')
-rw-r--r--mal/search.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/mal/search.go b/mal/search.go
index d667edb..2968611 100644
--- a/mal/search.go
+++ b/mal/search.go
@@ -23,10 +23,14 @@ import (
a "github.com/MikunoNaka/MAL2Go/anime"
)
-func SearchAnime(searchString string) []a.Anime {
+func SearchAnime(searchString string, extraFields []string) []a.Anime {
// TODO: load limit, offset and (maybe) fields from config
limit, offset := 10, 0
+
fields := []string{"title", "id"}
+ for _, i := range extraFields {
+ fields = append(fields, i)
+ }
res, err := animeClient.SearchAnime(searchString, limit, offset, fields)
if err != nil {