Appearance
@gracious.tech/fetch-client / translation / TranslationExtra
Class: TranslationExtra
translation.TranslationExtra
Access to local book names, sections, and chapter headings for a translation
Methods
get_book_name
▸ get_book_name(book
): Object
Get local name data for a book. This will throw if the book doesn’t exist or will contain empty strings if no data available. You should call get_books()
on the collection instance for more intuitive access. It will automatically make use of local name data after fetching it.
Parameters
Name | Type |
---|---|
book | string |
Returns
Object
Name | Type | Description |
---|---|---|
normal | string | WARN All of these may be an empty string if the data isn’t available |
long | string | - |
abbrev | string | - |
Defined in
get_chapters
▸ get_chapters(book
): { number
: number
; heading
: string
}[]
Get list of chapters for book which also includes a heading property for each
Parameters
Name | Type |
---|---|
book | string |
Returns
{ number
: number
; heading
: string
}[]
Defined in
get_chapter_heading
▸ get_chapter_heading(book
, chapter
): string
Get the heading for a specific chapter
Parameters
Name | Type |
---|---|
book | string |
chapter | number |
Returns
string
Defined in
get_sections
▸ get_sections(book
): { start_chapter
: number
; start_verse
: number
; end_chapter
: number
; end_verse
: number
; heading
: string
}[]
Get list of sections for a book which includes a heading for each and verse range
Parameters
Name | Type |
---|---|
book | string |
Returns
{ start_chapter
: number
; start_verse
: number
; end_chapter
: number
; end_verse
: number
; heading
: string
}[]