PrayTeam / scriptured-prayer

GNU Affero General Public License v3.0
1 stars 0 forks source link

Pull Scripture Reference From an API #4

Closed Soyokaze-42 closed 5 months ago

Soyokaze-42 commented 6 months ago

As a developer, I want to use an API to get the referenced scripture on a card so that I easily manage bible versions/languages and avoid maintaining bibles in the app.

some options:

AC:

Soyokaze-42 commented 6 months ago

Bible Gateway answered my request. They do not offer a bible api at this time, so we can use the alternative above or find another one. I know Andy has looked at these extensively, so I will ask him for a little input.

Soyokaze-42 commented 6 months ago

I'm looking at scripture.api.bible, and I think this will work well. I'd like a second opinion, though. It turns out all the copyright holding around different versions makes this more complicated that I thought.

These guys allow 5,000 calls a day for free, non-commercial use. They also reserve rights to boot us for practically any reason (which should be fine - if they do, we will have to find another source and/or switch versions).

Here are their ToS: https://docs.api.bible/terms-and-conditions

Soyokaze-42 commented 6 months ago

I like to add these secrets to a .env file so we can keep them out of the repo. I'll do that unless y'all have a better idea.

Soyokaze-42 commented 6 months ago

I signed up for access to the api.bible. It turns out that only public domain bibles are in that API. As much as we would like a single API for all the versions, I don't think we are going to get it.

Now, we are between individual APIs for every version, loading the scriptures into the database and serving them from there, or both. I'm leaning toward loading the scriptures into the database from ebible.org.