Skip to content

Commit

Permalink
Add GetContentFields usage to the example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
failedguidedog committed May 7, 2021
1 parent ee62850 commit fbe574b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ package main
import (
"github.com/buttercms/buttercms-go"
"fmt"
"encoding/json"
)

func main() {
Expand Down Expand Up @@ -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))
}
```

Expand Down

0 comments on commit fbe574b

Please sign in to comment.