Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshpetit/biblia-interface
An interface for interacting with api.biblia.com
https://github.com/joshpetit/biblia-interface
bible bibles biblia-interface christian proclaim religion verses
Last synced: 23 days ago
JSON representation
An interface for interacting with api.biblia.com
- Host: GitHub
- URL: https://github.com/joshpetit/biblia-interface
- Owner: joshpetit
- License: mit
- Created: 2020-06-30T14:55:35.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-25T13:58:41.000Z (over 2 years ago)
- Last Synced: 2024-08-10T21:34:43.666Z (4 months ago)
- Topics: bible, bibles, biblia-interface, christian, proclaim, religion, verses
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/biblia-interface
- Size: 32.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# biblia-Interface
biblia-interface is an npm package written in TypeScript to help with easier interactions with the [bibliaapi](https://bibliaapi.com/docs/). It contains nearly full documentation for autocomplete and ease of use.
*This FOSS package is not affiliated with the FaithLife corporation, but is meant to help with ease of use for their api*### Installation
npm install biblia-interface
### Getting Startedlet { Biblia } = require('./index.js');
//Takes an optional second parameter of a specific bible version, defaults to "asv"
let bible = new Biblia("", "byz");
### Usage
Nearly every method takes an optional second object parameter with different formatting options offered by bibliaapi.
### Getting a Passage (options)
bible.getPassage("Matthew 2:1-20")
.then(res =>{
console.log(res.text)
})
### Getting a List and Description of Bibles (options)
//Returns an array of bibles with their information
bible.getBibles()
.then(res => {
console.log(res.bibles[0].title) // "1890 Darby Bible"
})
### Getting an Updated list of Bible Names
This queries for all the bible namesbible.getBibleNames()
.then(res => {
console.log(res[0]) //darby
})
### Scanning Text for Verses (options)
bible.scanText("I like Genesis 1:1 and Revelation 22:21 is cool!")
.then(res => {
console.log(res.results[1].passage) //"Revelation 22:21"
})
### Parsing Bible Verses (options)
bible.parseText("II Kgs 1:1-2, 3-5")
.then(res => {
console.log(res.passages[1].passage) // "2 Kings 1:3–5"
})
### Searching for text (options)
bible.search("Abraham", {limit: 5}) //The limit option only returns the first 5 results
.then(res => {
console.log(res.results[0].title) //"Genesis 22:1"
})
### Compare Verses
bible.compare("Genesis 3:1", "Genesis 3:4")
.then(res => {
console.log(res.equal); //false
})
### Change the Bible version
`bible.setBible("Bible_Version")`For more information on these services, visit the [bibliaapi docs](https://bibliaapi.com/docs/). If you find a bug or an improvement don't hesitate to send a pull request!