Current api uses query parameters over path parameters.
Create a new api version that uses both for more human readable urls and that are easier to use.
Tasks
- Use path parameters for the
book, chapter, and verse. (/api/v2/bible/book/chapter/verse)
/api/v2/bible/genesis/1/1
- Provide
bible_version and book_group as query parameters as is the current case. bible_version defaults to NIV and book_group defaults to Any.
/api/v2/bible/genesis/1/1-2?bible_version=NIV
- Provide a boolean query parameter,
strict, that toggles whether to strictly check if the book given is in the book_group specified. strict defaults to False if not given. If strict is False, then the book is used and the book_group ignored.
/api/v2/bible/random/genesis?book_group=Poetry&strict
- The random verse will be mapped to the endpoint
/api/v2/bible/random/book/chapter. It will accept book, chapter and verse path parameters and bible_version, book_group , strict and verse_range query parameters. The verse_range query parameter can be set to determine the number of verses to return. verse range defaults to 1.
/api/v2/bible/random
/api/v2/bible/random/genesis?verse_range=2
- The daily verse will be mapped to the endpoint
/api/v2/bible/today. Accepts the bible_version query parameter.
/api/v2/bible/today?bible_version=KJV
Current api uses query parameters over path parameters.
Create a new api version that uses both for more human readable urls and that are easier to use.
Tasks
book,chapter, andverse. (/api/v2/bible/book/chapter/verse)bible_versionandbook_groupas query parameters as is the current case.bible_versiondefaults to NIV andbook_groupdefaults to Any.strict, that toggles whether to strictly check if the book given is in thebook_groupspecified.strictdefaults to False if not given. If strict is False, then the book is used and the book_group ignored./api/v2/bible/random/book/chapter. It will acceptbook,chapterandversepath parameters andbible_version,book_group,strictandverse_rangequery parameters. Theverse_rangequery parameter can be set to determine the number of verses to return.verse rangedefaults to 1./api/v2/bible/today. Accepts thebible_versionquery parameter.