Socket
Socket
Sign inDemoInstall

freebibleapi

Package Overview
Dependencies
3
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    freebibleapi

NodeJS wrapper for the Free Bible API (freebibleapi.com)


Version published
Maintainers
1
Install size
445 kB
Created

Readme

Source

Bible API

NodeJS wrapper for the Free Bible API service (https://freebibleapi.com)

Installation

Install the library with npm npm install freebibleapi.

Authentication

  1. Sign-up for a free API key at https://freebibleapi.com
  2. Create a .env file with BIBLE_API_KEY=<your api key here> or pass it into the BibleAPI class constructor

Usage

getTranslation

Get a single translation.

const { BibleAPI } = require('freebibleapi');

const bibleApi = new BibleAPI();

const kjvTranslation: Translation = await bibleApi.getTranslation('KJV');

getTranslations

Get a list of currently supported translations.

const { BibleAPI } = require('freebibleapi');

const bibleApi = new BibleAPI();

const translations: Translation[] = await bibleApi.getTranslations();

getBooks

Get a list of all books in a translation.

const { BibleAPI } = require('freebibleapi');

const bibleApi = new BibleAPI();

const books: Book[] = await bibleApi.getBooks('KJV');

getBook

Get a specific book from the Bible for a chosen translation.

const { BibleAPI } = require('freebibleapi');

const bibleApi = new BibleAPI();

const genesis: Book = await bibleApi.getBook('KJV', 1);

getChapters

Get all chapters in a book of the Bible

const { BibleAPI } = require('freebibleapi');

const bibleApi = new BibleAPI();

const genesisChapters: Chapter[] = await bibleApi.getChapters('KJV', 1);

getChapter

Get a chapter in a book of the Bible

const { BibleAPI } = require('freebibleapi');

const bibleApi = new BibleAPI();

const genesisChapterOne: Chapter = await bibleApi.getBookChapter('KJV', 1, 1);

getVerses

Get the verses in a chapter of the Bible

const { BibleAPI } = require('freebibleapi');

const bibleApi = new BibleAPI();

const genesisChapterOneVerses: Verse[] = await bibleApi.getVerses('KJV', 1, 1);

getVerse

Get a verses in a chapter of the Bible

const { BibleAPI } = require('freebibleapi');

const bibleApi = new BibleAPI();

const genesisChapterOneVerseOne: Verse = await bibleApi.getVerse('KJV', 1, 1, 1);

Donate

If you like this package and the Free Bible API Service, please think about donating to support server costs and further development on the project.

Donate Here

Keywords

FAQs

Last updated on 14 Sep 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc