-
-
Notifications
You must be signed in to change notification settings - Fork 0
BibleService Examples
Paceaux edited this page Jul 7, 2021
·
1 revision
Before getting verses, chapters, or passages, you need a bibleId
. The only way to know that is to look at all of the Bibles, first.
- Request Options ( an array)
async function doThings() {
const bibles = await service.getBibles();
}
- Response (an array)
async function doThings() {
const bibles = await service.getBibles({
language: 'eng'
});
}
- Response
- Request: only a string
Once you've found a bibleId
, you can get some information on it.
async function doThings() {
const bible = await service.getBible('06125adad2d5898a-01');
}
About bookId
:
A bookId
is typically the first 3-letters of the name of a book.
e.g.
- Exodus => EXO
- Mark => MAR
- Request Options
- Response (an array)
- A Single parameter can be passed, an object, containing
id
forbibleId
with additional options. Here, all that's passed is thebibleId
as a string.
async function doThings() {
const books = await service.getBooks('06125adad2d5898a-01');
}
- Request Options
- Response (an array)
- A Single parameter can be passed, an object, containing
id
forbibleId
with additional options.includeChapters
is an option that's passed in.
async function doThings() {
const books = await service.getBooks({
id: '06125adad2d5898a-01'
includeChapters: true,
});
}
About chapterId
:
- Take the three-letter abbrevation ( EXO)
- Add a
.
- Then add the number
e.g.
- Exodus 1 => EXO.1
- Mark 8 => MAR.8
- Request Options
- Response (an array)
- A Single parameter can be passed, an object, containing
id
forbibleId
andbookId
with additional options.
async function doThings() {
const exodusChapters = await service.getChaptersFromBook('c315fa9f71d4af3a-01', 'EXO');
}
- Request Options
- Response
- A Single parameter can be passed, an object, containing
id
forbibleId
andchapterId
with additional options.
async function doThings(){
const chapter = service.getChapter('c315fa9f71d4af3a-01', 'EXO.1');
}
About verseId
:
- Take the
chapterId
( EXO.1) - Add a
.
- Then add the number
e.g.
- Exodus 1:1 => EXO.1.1
- Mark 8:8 => MAR.8.8
- Response (as array)
Note that this will not give you the content of the verses. It may be useful, however, in getting verseId
s
async function doThings(){
const chapter = service.getVersesFromChapter('c315fa9f71d4af3a-01', 'EXO.1');
}
- Request Options
- Response
- A Single parameter can be passed, an object, containing
id
forbibleId
andverseId
with additional options.
Note that This only returns one verse, for multiples you want a passage.
async function doThings(){
const chapter = service.getVerse('c315fa9f71d4af3a-01', 'EXO.1.1');
}
Note: This is an alias for getPassage()
async function doThings(){
const chapter = service.getPassage('c315fa9f71d4af3a-01', 'EXO.1.1-EXO.1.20');
}
About verseId
:
- Take the
verseId
( EXO.1.1) - Add a
-
- Then add the
verseId
for the last verse
e.g.
- Exodus 1:1-20 => EXO.1.1-EXO.1.20
- Mark 8:8-14 => MAR.8.8-MAR.8.14
- Request Options
- Response
- A Single parameter can be passed, an object, containing
id
forbibleId
andpassageId
with additional options.
async function doThings(){
const chapter = service.getPassage('c315fa9f71d4af3a-01', 'EXO.1.1-EXO.1.20');
}