diff --git a/README.md b/README.md index 4d40f7b..ea9bbb2 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ package main import ( "github.com/buttercms/buttercms-go" "fmt" + "encoding/json" ) func main() { @@ -112,6 +113,20 @@ func main() { } } } + + contentParams := map[string]string{} + contentKeys := []string{"somethings"} + contentResp, err := ButterCMS.GetContentFields(contentKeys, contentParams) + if err != nil { + panic(err.Error()) + } + + j, err := json.Marshal(contentResp) + if err != nil { + fmt.Println(err) + } + + fmt.Println(string(j)) } ``` diff --git a/api.go b/api.go index d5faf23..0d31de0 100644 --- a/api.go +++ b/api.go @@ -72,5 +72,5 @@ type FeedAPIResponse struct { // Content Fields type ContentFieldsAPIResponse struct { - Data map[string]string `json:"data"` + Data map[string]interface{} `json:"data"` }