fix(bible): fixed api requests not being structured to return fums data
This commit is contained in:
parent
d24d8f9603
commit
0980c7cbf2
1 changed files with 13 additions and 3 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue