Files
services/examples/quran/chapters/go/listChapters.go
2021-09-16 12:52:36 +01:00

17 lines
328 B
Go
Executable File

package example
import (
"fmt"
"github.com/micro/services/clients/go/quran"
"os"
)
// List the Chapters (surahs) of the Quran
func ListChapters() {
quranService := quran.NewQuranService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := quranService.Chapters(&quran.ChaptersRequest{
Language: "en",
})
fmt.Println(rsp, err)
}