The project is in a healthy, maintained state
A Ruby gem wrapper around the YouVersion Bible API. Includes: Bibles, Highlights, Languages, Licenses, Organizations, and Verse of the Day endpoints.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 0.14
~> 13.0
~> 3.13
~> 1.35

Runtime

~> 0.109
>= 2.0
 Project Readme

Youversion Bible API - Ruby

A Ruby wrapper for the YouVersion Platform Bible API built using Excon.

This gem provides a Ruby client for interacting with the following YouVersion API resources:

  • Bibles
  • Highlights
  • Languages
  • Licenses
  • Organizations
  • Verse of the Day

Installation

Add this line to your application's Gemfile:

gem "youversion_bible"

Then execute:

bundle install

Configuration

You must provide your YouVersion Platform App Key.

YouversionBible.configure do |config|
  config.app_key = ENV["YVP_APP_KEY"]
end

Optional Configuration

YouversionBible.configure do |config|
  config.app_key  = ENV["YVP_APP_KEY"]
  config.base_url = "https://api-dev.youversion.com/v1"
end

Usage

Create a client instance:

client = YouversionBible.client

Bibles

client.bibles(language_ranges: ["en"])
client.bible(100)
client.bible_index(100)

client.passage(
  bible_id: 100,
  passage_id: "JHN.3.16"
)

client.books(100)

client.book(
  bible_id: 100,
  book_id: "GEN"
)

client.chapters(
  bible_id: 100,
  book_id: "GEN"
)

client.chapter(
  bible_id: 100,
  book_id: "GEN",
  chapter_id: 1
)

client.verses(
  bible_id: 100,
  book_id: "GEN",
  chapter_id: 1
)

client.verse(
  bible_id: 100,
  book_id: "GEN",
  chapter_id: 1,
  verse_id: 1
)

Languages

client.languages
client.language("en")

Organizations

client.organizations
client.organization("organization_id")
client.organization_bibles("organization_id")

Verse of the Day

client.verse_of_the_day_calendar
client.verse_of_the_day(32)

Highlights

(Under Construction) Documentation limited and doesn't work with normal API key

client.highlights(
  bible_id: 100,
  passage_id: "JHN.3.16"
)

client.upsert_highlight(
  bible_id: 100,
  passage_id: "JHN.3.16",
  color: "44aa44"
)

client.clear_highlights(
  bible_id: 100,
  passage_id: "JHN.3.16"
)

Licenses

(Under Construction) Documentation limited and doesn't work with normal API key

client.licenses

Error Handling

All API errors raise a subclass of:

YouversionBible::ApiError

Examples:

YouversionBible::Unauthorized
YouversionBible::NotFound
YouversionBible::RateLimited
YouversionBible::ServerError

Handle them as needed:

begin
  client.bible(999999)
rescue YouversionBible::NotFound => e
  puts e.message
end

License

MIT