Introduction
The Bible SDK Typescript client is the easiest way to consume our Bible SDK API. It provides a clean interface to our REST API endpoints with full TypeScript support.
Feature highlights
- Helpful suite of functions to get the most out of our API
- Full TypeScript definitions for all functions, parameters, and return types
- Distributed via npm for easy installation
- Built to target ES2020 for modern browser support
- Includes a simple LRU cache to reduce network calls and improve performance
- Implements retry logic with timeouts and exponential backoff for resiliency
Installation
Install with npm
npm install biblesdk
Basic Usage
import { listBooks, getVerse } from 'biblesdk';
// List all books
const books = await listBooks();
// Get a specific range of verses
const verse = await getVerses('GEN', 1, [1, 5]);
Interactive Examples
Try out the SDK functions directly in your browser. All examples use real data from the NET Bible. These functions correspond to our REST API endpoints.
listBooks()
List all books in the Bible
listChapters(book)
List chapters in a book
getBookMetadata(book)
Get metadata for a specific book
getChapterMetadata(book, chapter)
Get metadata for a specific chapter
read(book, chapter, cursor?, take?, withConcordanceInfo?)
Read phrases from a chapter with pagination
getPhrases(book, chapter, verseRange, withConcordanceInfo?)
Get phrases for a verse range
getVerses(book, chapter, verseRange)
Get raw verses for a verse range
getSearchResults(query)
Search for verses matching a query
Support
For issues, questions, or feature requests, please open a Github Issue at https://github.com/biblesdk/issues/issues.
Scripture quotations are from the NET Bible® copyright ©1996, 2019 by Biblical Studies Press, L.L.C. http://netbible.com All rights reserved.