Documentation ¶
Index ¶
- type Chapter
- type ChaptersRequest
- type ChaptersResponse
- type Interpretation
- type QuranService
- func (t *QuranService) Chapters(request *ChaptersRequest) (*ChaptersResponse, error)
- func (t *QuranService) Search(request *SearchRequest) (*SearchResponse, error)
- func (t *QuranService) Summary(request *SummaryRequest) (*SummaryResponse, error)
- func (t *QuranService) Verses(request *VersesRequest) (*VersesResponse, error)
- type Result
- type SearchRequest
- type SearchResponse
- type SummaryRequest
- type SummaryResponse
- type Translation
- type Verse
- type VersesRequest
- type VersesResponse
- type Word
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chapter ¶
type Chapter struct { // The arabic name of the chapter ArabicName string `json:"arabicName"` // The complex name of the chapter ComplexName string `json:"complexName"` // The id of the chapter as a number e.g 1 Id int32 `json:"id"` // The simple name of the chapter Name string `json:"name"` // The pages from and to e.g 1, 1 Pages []int32 `json:"pages"` // Should the chapter start with bismillah PrefixBismillah bool `json:"prefixBismillah"` // The order in which it was revealed RevelationOrder int32 `json:"revelationOrder"` // The place of revelation RevelationPlace string `json:"revelationPlace"` // The translated name TranslatedName string `json:"translatedName"` // The number of verses in the chapter Verses int32 `json:"verses"` }
type ChaptersRequest ¶
type ChaptersRequest struct { // Specify the language e.g en Language string `json:"language"` }
type ChaptersResponse ¶
type ChaptersResponse struct {
Chapters []Chapter `json:"chapters"`
}
type Interpretation ¶
type QuranService ¶
type QuranService struct {
// contains filtered or unexported fields
}
func NewQuranService ¶
func NewQuranService(token string) *QuranService
func (*QuranService) Chapters ¶
func (t *QuranService) Chapters(request *ChaptersRequest) (*ChaptersResponse, error)
List the Chapters (surahs) of the Quran
func (*QuranService) Search ¶
func (t *QuranService) Search(request *SearchRequest) (*SearchResponse, error)
Search the Quran for any form of query or questions
func (*QuranService) Summary ¶
func (t *QuranService) Summary(request *SummaryRequest) (*SummaryResponse, error)
Get a summary for a given chapter (surah)
func (*QuranService) Verses ¶
func (t *QuranService) Verses(request *VersesRequest) (*VersesResponse, error)
Lookup the verses (ayahs) for a chapter including translation, interpretation and breakdown by individual words.
type Result ¶
type Result struct { // The associated arabic text Text string `json:"text"` // The related translations to the text Translations []Translation `json:"translations"` // The unique verse id across the Quran VerseId int32 `json:"verseId"` // The verse key e.g 1:1 VerseKey string `json:"verseKey"` }
type SearchRequest ¶
type SearchResponse ¶
type SearchResponse struct { // The current page Page int32 `json:"page"` // The question asked Query string `json:"query"` // The results for the query Results []Result `json:"results"` // The total pages TotalPages int32 `json:"totalPages"` // The total results returned TotalResults int32 `json:"totalResults"` }
type SummaryRequest ¶
type SummaryResponse ¶
type Translation ¶
type Verse ¶
type Verse struct { // The unique id of the verse in the whole book Id int32 `json:"id"` // The interpretations of the verse Interpretations []Interpretation `json:"interpretations"` // The key of this verse (chapter:verse) e.g 1:1 Key string `json:"key"` // The verse number in this chapter Number int32 `json:"number"` // The page of the Quran this verse is on Page int32 `json:"page"` // The arabic text for this verse Text string `json:"text"` // The basic translation of the verse TranslatedText string `json:"translatedText"` // The alternative translations for the verse Translations []Translation `json:"translations"` // The phonetic transliteration from arabic Transliteration string `json:"transliteration"` // The individual words within the verse (Ayah) Words []Word `json:"words"` }
type VersesRequest ¶
type VersesRequest struct { // The chapter id to retrieve Chapter int32 `json:"chapter"` // Return the interpretation (tafsir) Interpret bool `json:"interpret"` // The language of translation Language string `json:"language"` // The verses per page Limit int32 `json:"limit"` // The page number to request Page int32 `json:"page"` // Return alternate translations Translate bool `json:"translate"` // Return the individual words with the verses Words bool `json:"words"` }
type VersesResponse ¶
type Word ¶
type Word struct { // The character type e.g word, end CharType string `json:"charType"` // The QCF v2 font code Code string `json:"code"` // The id of the word within the verse Id int32 `json:"id"` // The line number Line int32 `json:"line"` // The page number Page int32 `json:"page"` // The position of the word Position int32 `json:"position"` // The arabic text for this word Text string `json:"text"` // The translated text Translation string `json:"translation"` // The transliteration text Transliteration string `json:"transliteration"` }
Click to show internal directories.
Click to hide internal directories.