Skip to content

Models: Bible

Paceaux edited this page Jul 7, 2021 · 1 revision

The Bible Classes are not required. They're just an ORM-style convenience for working with data.

Bible
Book
Chapter
Verse
Passage

Bible : undefined

Kind: global typedef

Bible : undefined

Kind: global typedef

bible.books : Array.<Book>

All books in the bible. populated after running refreshData()

Kind: instance property of Bible Access: public

bible.refreshData()

Retrieves data from API and populates data property and books property.

Kind: instance method of Bible

bible.getBooks(params) ⇒ Promise.<Array.<Book>>

Gets all of the books associated with the Bible

Kind: instance method of Bible Returns: Promise.<Array.<Book>> -

Shallow copies of books

Param Type Description
params BooksRequestParam

parameters for retrieving books

bible.prepareRequest(params, requestId) ⇒ object

formats a request object so it to have the bible's id as id

Kind: instance method of Bible Returns: object -

request object with bibleId as id

Param Type Description
params object

parameters to submit to a request

requestId string

dude idk

bible.getBook(params) ⇒ Promise.<Book>

Gets a book from the Bible

Kind: instance method of Bible Returns: Promise.<Book> -

Data for book of the bible

Param Type Description
params BookRequestParam | string

either an object with id or bookId, or a string that is the bookId

bible.getChapter(params) ⇒ Promise.<Chapter>

Gets a chapter by Id from the Bible

Kind: instance method of Bible Returns: Promise.<Chapter> -

fully-populated chapter object

Param Type Description
params ChapterRequestParam | string

options to pass into request

bible.getPassage(params) ⇒ Promise.<Passage>

Gets a passage (range of verses)

Kind: instance method of Bible Returns: Promise.<Passage> -

fully-populated chapter object

Param Type Description
params PassageRequestParam | string

options to pass into request

bible.getVerse(params) ⇒ Promise.<Verse>

Gets a verse by Id from the Bible

Kind: instance method of Bible Returns: Promise.<Verse> -

fully-populated verse object

Param Type Description
params VerseRequestParam | string

options to pass into request

Book ⇐ BibleEntity

Kind: global class Extends: BibleEntity

new Book()

Book of a Bible

book.chapters : Array.<Chapter>

All chapters in the book. populated after running refreshData()

Kind: instance property of Book Access: public

book.name : string

Name of the book

Kind: instance property of Book

book.longName : string

Full name (or short description)

Kind: instance property of Book

book.abbreviation : string

Abbreviation used by the API

Kind: instance property of Book

book.refreshData() ⇒ Promise.<void>

Populates data if constructed with a string, or retrieves data not present at instantiation This will load the chapters property with chapters

Kind: instance method of Book

book.getChapters([params]) ⇒ Promise.<Array.<Chapter>>

Retrieves all chapters for this book

Kind: instance method of Book Returns: Promise.<Array.<Chapter>> -

an array of chapters in the book

Param Type Description
[params] ChapterRequestParam

request parameters

BookResponse : BookResponse

Kind: global typedef

Chapter ⇐ BibleEntity

Kind: global class Extends: BibleEntity

new Chapter()

Chapter of a Book

chapter.name : string | undefined

Name of book and chapter, or undefined if data not refreshed

Kind: instance property of Chapter

chapter.bookId : string

id for the book which contains this chapter

Kind: instance property of Chapter

chapter.number : number

chapter number. Intros will return 0

Kind: instance property of Chapter

chapter.content : string

Trimmed raw content from API if data has been refreshed or loaded

Kind: instance property of Chapter

chapter.verseCount : number

number of verses in the chapter or 0 if data has not been refreshed or loaded

Kind: instance property of Chapter

chapter.verseList : Array.<string>

Array of verses if data has been refreshed or loaded

Kind: instance property of Chapter

chapter.previousChapter : Chapter | null

The previous chapter in the book, or null if data is not refreshed/loaded

Kind: instance property of Chapter

chapter.nextChapter : Chapter | null

The next chapter in the book, or null if data is not refreshed/loaded

Kind: instance property of Chapter

chapter.getPrevious() ⇒ Chapter | null

gets previous chapter in the book

Kind: instance method of Chapter Returns: Chapter | null -

preceding chapter in book

chapter.getNext() ⇒ Chapter | null

gets next chapter in the book

Kind: instance method of Chapter Returns: Chapter | null -

succeeding chapter in book

chapter.refreshData() ⇒ Promise.<void>

Populates data if constructed with a string, or retrieves data not present at instantiation This will load the content, verses, and previous/nextChapters properties

Kind: instance method of Chapter

ChapterResponse : ChapterResponse

Kind: global typedef

Verse ⇐ BibleEntity

Kind: global class Extends: BibleEntity

new Verse()

Verse of a Chapter

verse.name : string | undefined

Name of book and chapter, or undefined if data not refreshed

Kind: instance property of Verse

verse.bookId : string

id for the book which contains this chapter

Kind: instance property of Verse

verse.chapterId : string

id for the chapter which contains this chapter

Kind: instance property of Verse

verse.number : number

chapter number. Intros will return 0

Kind: instance property of Verse

verse.chapter : Chapter

Chapter that contains the verse

Kind: instance property of Verse

verse.content : string

Trimmed raw content from API if data has been refreshed or loaded

Kind: instance property of Verse

verse.previousVerse : Chapter | null

The previous verse in the chapter, or null if data is not refreshed/loaded

Kind: instance property of Verse

verse.nextVerse : Chapter | null

The next verse in the chapter, or null if data is not refreshed/loaded

Kind: instance property of Verse

verse.getPrevious() ⇒ Verse | null

gets previous verse in the book

Kind: instance method of Verse Returns: Verse | null -

preceding verse in chapter

verse.getNext() ⇒ Verse | null

gets next verse in the book

Kind: instance method of Verse Returns: Verse | null -

succeeding verse in chapter

verse.refreshData() ⇒ Promise.<void>

Populates data if constructed with a string, or retrieves data not present at instantiation This will load the content, verses, and previous/nextChapters properties

Kind: instance method of Verse

VerseResponse : VerseResponse

Kind: global typedef

Passage ⇐ BibleEntity

Kind: global class Extends: BibleEntity

new Passage()

Passage of a Bible

passage.name : string | undefined

Name of book and chapter, or undefined if data not refreshed

Kind: instance property of Passage

passage.firstVerseId : string

Id of the first verse in the passage

Kind: instance property of Passage

passage.lastVerseId : string

Id of the last verse in the passage

Kind: instance property of Passage

passage.bookId : string

id for the book which contains this passage

Kind: instance property of Passage

passage.chapterIds : Array.<string>

ids for the chapters the passage spans

Kind: instance property of Passage

passage.chapters : Array.<string>

Chapters the passage spans

Kind: instance property of Passage

passage.verseCount : number

number of verses in the chapter or 0 if data has not been refreshed or loaded

Kind: instance property of Passage

passage.verseList : Array.<string>

Array of verses if data has been refreshed or loaded

Kind: instance property of Passage

passage.content : string

Trimmed raw content from API if data has been refreshed or loaded

Kind: instance property of Passage

passage.refreshData() ⇒ Promise.<void>

Populates data if constructed with a string, or retrieves data not present at instantiation This will load the content, verses, and previous/nextChapters properties

Kind: instance method of Passage

PassageResponse : PassageResponse

Kind: global typedef

Clone this wiki locally