@amanda-mitchell/biblia-api
This is a Javascript client for the Biblia API.
Installation
yarn add @amanda-mitchell/biblia-api
Usage
const bibliaApi = require('@amanda-mitchell/biblia-api');
const fetch = require('node-fetch');
const apiKey =
'Go to https://bibliaapi.com/docs/API_Keys to generate an API key.';
const client = bibliaApi.createBibliaApiClient({ apiKey, fetch });
client
.content({
passage: 'Genesis 1:1',
format: 'txt',
bible: 'leb',
})
.then(console.log)
.catch(console.error);
Available methods
Each of these methods takes an options
object containing the keys that are described in the official API docs.
Endpoints that return JSON are parsed into Javascript objects, plain text and html responses are returned as strings, and anything else is returned as a binary blob object.
content
: returns Bible content.tableOfContents
: returns books and chapters of a given version.search
: searches the text of a Bible version.findBible
: return information about a specific version.find
: return information about versions that match a query (or all available versions).image
: return an image binary for the cover of a version.parse
: parse text into one or more Bible references.scan
: find Bible references contained within a larger block of text.tag
: add html tags around Bible references contained within a larger block of text.compare
: compare two Bible references.