quran-go

Read Qur'an right in the terminal.
git clone http://git.hanabi.in/repos/quran-go.git
Log | Files | Refs | README | LICENSE

chapter-details.go (379B)


      1 package fetch
      2 
      3 import (
      4 	"fmt"
      5 
      6 	q "git.hanabi.in/gitbox/quran-go/src/quran-com"
      7 	t "git.hanabi.in/gitbox/quran-go/src/types"
      8 )
      9 
     10 // Fetch chapter details based on chapter ID.
     11 func ChapterDetails(chapterID t.Chap) (chapDetails t.ChapterDetails, err error) {
     12 
     13 	uri := fmt.Sprintf("%s/chapters/%d", q.API, chapterID)
     14 	err = q.HttpGet(uri, &chapDetails)
     15 
     16 	return chapDetails, err
     17 
     18 }