Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Verse Key in Question/Answer Format Response #22

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dotslashf
Copy link

I think adding verse key in question/answer object will make it easier to parse an audio

Context:
i'm trying to build a quiz client side for this api, but i think one of the best solution to guess a verse is by listening an audio + reciting it, by adding verseKey will make it easier to identify which verses of this question/answer, so it can be attach with an audio from external library, i'll use this library for the audio quran

i know this is changing the api format, so it can be a major changes, sorry for the inconvenience.

I hope you can reconsider this idea, thank you 🚀 🍀

@zakiego
Copy link
Owner

zakiego commented Nov 6, 2023

I'll take a look immediately. Thanks for your suggestion!

@zekhoi
Copy link
Collaborator

zekhoi commented Nov 6, 2023

to avoid major / schema changes for now, you can add it as questionVerseKey or maybe just verseKey in the object for each question. In the next major update, we will implement it as you suggested, which is a better approach

example

{
  "data": [
    {
      "question": " قُلْ هُوَ ٱللَّهُ أَحَدٌ",
      "verseKey": "112:1",
      "options": [
        {
          "text": "Al-Masad",
          "value": 0
        },
        {
          "text": "Al-Falaq",
          "value": 0
        },
        {
          "text": "An-Nas",
          "value": 0
        },
        {
          "text": "Al-Ikhlas",
          "value": 1
        }
      ]
    }
    // ...
  ],
  "meta": {
    "type": "guessSurahBySurah",
    "select": [111, 112, 113, 114],
    "amount": 3
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants