Appearance
@gracious.tech/fetch-client / client / BibleClientConfig
Interface: BibleClientConfig
client.BibleClientConfig
The options available for configuring a BibleClient
Properties
endpoints
• Optional
endpoints: string
[]
A list of CDN endpoints to connect to that defaults to the official CDN (https://collection.fetch.bible/). You can optionally host your own fetch(bible) collection and use that instead, or you could use it in addition to the official CDN by listing it first. The values can be relative URLs but all must end in a slash.
Defined in
data_endpoint
• Optional
data_endpoint: string
The endpoint desired for generic data like crossrefs, defaulting to the first endpoint.
Defined in
usage
• Optional
usage: Partial
<UsageConfig
>
Configure how you’ll be using Bible translations to automatically filter out those which have incompatible licenses. You can alternatively do this per translation when fetching actual passages.
All options default to false
which results in having access to the most translations.
commercial
:true
if you will use translations in a commercial mannerattributionless
:true
if you will be using Bible translations without including attribution to the ownerslimitless
:true
if you will be using translations in full without any limitations to the number of verses that can be quotedderivatives
:true
if you’ll be modifying the translations, orsame-license
if you’ll be sharing modifications under the same license as the original
Defined in
remember_fetches
• Optional
remember_fetches: boolean
Whether to store internally the results of fetch_*
methods (default true).
This client will auto-preserve the results of fetch_*
methods to avoid duplicate network requests. This is convenient for most users but may result in a large use of memory if a significant amount of resources are requested. In such cases it is best to rely on service worker caching, or self-preserving frequently used results of requests.
It is best practice to use service worker caching either way, as this will not only speed up runtime execution but also revisits to your app.
Note that fetch_collection()
results will always be preserved due to its frequency of use.