Files
m3o-go/examples/quran/verses/getVersesOfAChapter.go
2021-10-29 10:44:29 +00:00

20 lines
379 B
Go
Executable File

package example
import (
"fmt"
"os"
"go.m3o.com/quran"
)
// Lookup the verses (ayahs) for a chapter including
// translation, interpretation and breakdown by individual
// words.
func GetVersesOfAchapter() {
quranService := quran.NewQuranService(os.Getenv("M3O_API_TOKEN"))
rsp, err := quranService.Verses(&quran.VersesRequest{
Chapter: 1,
})
fmt.Println(rsp, err)
}