Sinatra web app that serves RESTful JSON web API for open and public domain bibles
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bibles @ 5c552f5
views
.gitignore
.gitmodules
.ruby-gemset
.ruby-version
Gemfile
Gemfile.lock
LICENSE
README.md
app.rb
config.ru
import.rb

README.md

bible_api

Sinatra web app that serves RESTful JSON web API for the World English Bible.

mysql -uroot -e "create database bible_api; grant all on bible_api.* to user@localhost identified by 'password';"
BIBLE_API_DB="mysql2://user:password@localhost/bible_api" ruby import.rb
BIBLE_API_DB="mysql2://user:password@localhost/bible_api" ruby app.rb

http://localhost:4567/John+3:16

{
  "reference": "John 3:16",
  "verses": [
    {
      "book_id":   "JHN",
      "book_name": "John",
      "chapter":   3,
      "verse":     16,
      "text":      "\nFor God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.\n\n"
    }
  ],
  "text": "\nFor God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.\n\n"
}

Copyright Tim Morgan. Licensed under The MIT License (MIT). See LICENSE for more info.