Appearance
@gracious.tech/fetch-client / client / FetchClient
Class: FetchClient
Defined in: client/src/client.ts:66
A client for interacting with a fetch(bible) CDN
Constructors
Constructor
new FetchClient(
config?):FetchClient
Defined in: client/src/client.ts:86
Create a new FetchClient, defaulting to the official fetch(bible) collection
Parameters
config?
FetchClientConfig = {}
Returns
FetchClient
Properties
collection
collection:
FetchCollection|undefined
Defined in: client/src/client.ts:81
Synchronous access to collection if it has already been fetched with fetch_collection()
requester
requester:
RequestHandler
Defined in: client/src/client.ts:83
Access to request handler and its caching methods
Methods
fetch_collection()
fetch_collection():
Promise<FetchCollection>
Defined in: client/src/client.ts:94
Fetch the collection’s manifest and return a FetchCollection object for interacting with it
Returns
Promise<FetchCollection>
fetch_book()
Call Signature
fetch_book(
resource,book,format?):Promise<BibleBookHtml>
Defined in: client/src/client.ts:112
Manually fetch contents of book for a translation without needing to request FetchCollection
Parameters
resource
string
book
string
format?
"html"
Returns
Promise<BibleBookHtml>
Call Signature
fetch_book(
resource,book,format):Promise<BibleBookUsx>
Defined in: client/src/client.ts:113
Manually fetch contents of book for a translation without needing to request FetchCollection
Parameters
resource
string
book
string
format
"usx"
Returns
Promise<BibleBookUsx>
Call Signature
fetch_book(
resource,book,format):Promise<BibleBookUsfm>
Defined in: client/src/client.ts:114
Manually fetch contents of book for a translation without needing to request FetchCollection
Parameters
resource
string
book
string
format
"usfm"
Returns
Promise<BibleBookUsfm>
Call Signature
fetch_book(
resource,book,format):Promise<BibleBookTxt>
Defined in: client/src/client.ts:115
Manually fetch contents of book for a translation without needing to request FetchCollection
Parameters
resource
string
book
string
format
"txt"
Returns
Promise<BibleBookTxt>
fetch_translation_extras()
fetch_translation_extras(
resource):Promise<TranslationExtra>
Defined in: client/src/client.ts:132
Manually fetch extra metadata for a translation without needing to request FetchCollection
Parameters
resource
string
Returns
Promise<TranslationExtra>
fetch_glosses()
fetch_glosses(
resource,book):Promise<GlossesBook>
Defined in: client/src/client.ts:141
Manually fetch glosses for book without needing to request FetchCollection
Parameters
resource
string
book
string
Returns
Promise<GlossesBook>
fetch_notes()
fetch_notes(
resource,book,format?):Promise<NotesBook>
Defined in: client/src/client.ts:148
Manually fetch study notes for book without needing to request FetchCollection
Parameters
resource
string
book
string
format?
"html" | "txt"
Returns
Promise<NotesBook>
fetch_crossref()
fetch_crossref(
book,size?):Promise<BookCrossref>
Defined in: client/src/client.ts:155
Fetch cross-reference data for a book
Parameters
book
string
size?
"small" | "medium" | "large"
Returns
Promise<BookCrossref>
fetch_search()
fetch_search(
id,format):Promise<SearchWords>
Defined in: client/src/client.ts:163
Fetch search data for a testament
Parameters
id
string
format
"strongs" | "original"
Returns
Promise<SearchWords>