Files
m3o-go/examples/sunnah/chapters/listTheChaptersInABook/main.go
2021-12-09 15:06:12 +00:00

19 lines
338 B
Go
Executable File

package main
import (
"fmt"
"os"
"go.m3o.com/sunnah"
)
// Get all the chapters of a given book within a collection.
func main() {
sunnahService := sunnah.NewSunnahService(os.Getenv("M3O_API_TOKEN"))
rsp, err := sunnahService.Chapters(&sunnah.ChaptersRequest{
Book: 1,
Collection: "bukhari",
})
fmt.Println(rsp, err)
}