Book of Mormon API

Discussions around Mobile Development
Locked
donjuanica
New Member
Posts: 3
Joined: Wed Oct 07, 2015 12:06 am

Book of Mormon API

#1

Post by donjuanica »

I thought I'd share this with the group. I've seen a lot of posts about an open BoM API for use in web/mobile apps. I put together a quick NodeJS + Express + MongoDB API that will give you access to the BoM verses. I imported the data from the Book of Mormon found in the Gutenberg Library.

For now this is running in RedHat openshift on the free tier. If it gets too much traffic I suppose they'll contact me and complain, but for now I'd appreciate any testing/feedback.

You can access the API at:

http://bomapi-happycloud.rhcloud.com/v1/verses

The root URL will return 100 verses from the BoM but you can specify any granularity you want (all other endpoints will return a max of 10 verses):

http://bomapi-happycloud.rhcloud.com/v1 ... ter/:verse

e.g.

http://bomapi-happycloud.rhcloud.com/v1/verses/Moroni
http://bomapi-happycloud.rhcloud.com/v1 ... /Moroni/10
http://bomapi-happycloud.rhcloud.com/v1 ... oroni/10/4

Have fun.
samtwarnick
New Member
Posts: 2
Joined: Thu Oct 08, 2015 1:48 pm

Re: Book of Mormon API

#2

Post by samtwarnick »

This looks great! Is there any way to request multiple verses at once ( i.e. http://bomapi-happycloud.rhcloud.com/v1 ... oni/10/3-5 ) or get all verses in a chapter? Thanks
donjuanica
New Member
Posts: 3
Joined: Wed Oct 07, 2015 12:06 am

Re: Book of Mormon API

#3

Post by donjuanica »

You can get multiple verses by leaving off the last segment of the API path. Right now the API limits to returning a max of 10 verses, but I may remove that restriction at some point.

To get up to 10 verses from Moroni 10 you would use:

/v1/verses/Moroni/10

To get the first 10 verses of Moroni You would use:

/v1/verses/Moroni

I kind of like your idea to specify a range of verses as the last part of the path:

/v1/verses/Moroni/10/3-5 - right now that doesn't work but I think I'll add support for it.

Thanks
donjuanica
New Member
Posts: 3
Joined: Wed Oct 07, 2015 12:06 am

Re: Book of Mormon API

#4

Post by donjuanica »

I added the ability to specify ranges of verses:

/v1/verses/Moroni/10/3/5 would give you Moroni 10:3-5

So instead of passing a range as the final path param, you add an additional path param to define the range:

/v1/verses/:book/:chapter/:start_verse/:end_verse

HTH
samtwarnick
New Member
Posts: 2
Joined: Thu Oct 08, 2015 1:48 pm

Re: Book of Mormon API

#5

Post by samtwarnick »

Just saw that you updated this. Thanks for adding the ability to get more than one verse. I'll play around with it some more.
bartoleria
New Member
Posts: 2
Joined: Sun Nov 09, 2014 2:25 pm

Re: Book of Mormon API

#6

Post by bartoleria »

Nice, great job!

Are you maintaining the project? Do you plan to keep working on it?
dancej
New Member
Posts: 2
Joined: Sat May 27, 2017 10:27 pm

Re: Book of Mormon API

#7

Post by dancej »

Are you still maintaining this? Looks cool and I would like to use it.
mattalui
New Member
Posts: 1
Joined: Sun Sep 17, 2017 8:59 pm

Re: Book of Mormon API

#8

Post by mattalui »

Wow! This is great!

How exactly to we request information from books like Nephi with multiple books?
Locked

Return to “Mobile Development”