fix(bible): fixed api requests not being structured to return fums data
Some checks failed
Actions / Lint Code (Pylint) (push) Failing after 16s
Actions / Build Documentation (MkDocs) (push) Successful in 12s

This commit is contained in:
Seaswimmer 2024-02-02 01:37:38 -05:00
parent d24d8f9603
commit 0980c7cbf2
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -65,6 +65,7 @@ class Bible(commands.Cog):
"include-verse-numbers": str(include_verse_numbers).lower(),
"include-verse-spans": "false",
"use-org-id": "false",
"fums-version": 3,
}
async with self.session.get(url, headers=headers, params=params) as response:
@ -104,8 +105,11 @@ class Bible(commands.Cog):
"""Get the books of the Bible from the API.bible API."""
url = f"https://api.scripture.api.bible/v1/bibles/{bible_id}/books"
headers = await self.bot.get_shared_api_tokens("api.bible")
params = {
"fums-version": 3,
}
async with self.session.get(url, headers=headers) as response:
async with self.session.get(url, headers=headers, params=params) as response:
data = await response.json()
self.logger.debug(
"_get_books executed with a response code of: %s\n%s",
@ -142,8 +146,11 @@ class Bible(commands.Cog):
"""Get the chapters of a book from the API.bible API."""
url = f"https://api.scripture.api.bible/v1/bibles/{bible_id}/books/{book_id}/chapters"
headers = await self.bot.get_shared_api_tokens("api.bible")
params = {
"fums-version": 3,
}
async with self.session.get(url, headers=headers) as response:
async with self.session.get(url, headers=headers, params=params) as response:
data = await response.json()
self.logger.debug(
"_get_chapters executed with a response code of: %s\n%s",
@ -180,8 +187,11 @@ class Bible(commands.Cog):
"""Get the verses of a chapter from the API.bible API."""
url = f"https://api.scripture.api.bible/v1/bibles/{bible_id}/chapters/{book_id}.{chapter}/verses"
headers = await self.bot.get_shared_api_tokens("api.bible")
params = {
"fums-version": 3,
}
async with self.session.get(url, headers=headers) as response:
async with self.session.get(url, headers=headers, params=params) as response:
data = await response.json()
self.logger.debug(
"_get_verses executed with a response code of: %s\n%s",