Guess Verse

This feature is designed to create continuous verse questions. It's as if you're asking, what is the continuation of this verse?

Available modes in this feature:

Guess Verse - By Surah

This mode will generate questions from a list of surahs. The questions will be generated from the verses of the surahs.

Properties

  • Name
    amount
    Type
    number
    Description

    Amount of questions to generate.

  • Name
    select
    Type
    array of number
    Description

    List of surahs to generate questions from. From 1 to 114.

Example

Request

import { guessVerse } from 'quran-quiz'

const data = await guessVerse.bySurah({
  amount: 3,
  select: [113, 114],
})

Response

{
  "data": [
    {
      "question": " قُلْ أَعُوذُ بِرَبِّ ٱلْفَلَقِ",
      "options": [
        {
          "text": "وَمِن شَرِّ حَاسِدٍ إِذَا حَسَدَ",
          "value": 0
        },
        {
          "text": "ٱلَّذِى يُوَسْوِسُ فِى صُدُورِ ٱلنَّاسِ",
          "value": 0
        },
        {
          "text": "إِلَـٰهِ ٱلنَّاسِ",
          "value": 0
        },
        {
          "text": "مِن شَرِّ مَا خَلَقَ",
          "value": 1
        }
      ]
    },
    // ...
  ],
  "meta": {
    "type": "guessVerseBySurah",
    "select": [
      113,
      114
    ],
    "amount": 3
  }
}

Guess Verse - By Juz

This mode will generate questions from a list of juz. The questions will be generated from the verses of the juz.

  • Name
    amount
    Type
    number
    Description

    Amount of questions to generate.

  • Name
    select
    Type
    array of number
    Description

    List of juz to generate questions from. From 1 to 30.

Example

Request

import { guessVerse } from 'quran-quiz'

const data = await guessVerse.byJuz({
  amount: 3,
  select: [30],
});

Response

{
  "data": [
    {
      "question": "جَزَآءً وِفَاقًا",
      "options": [
        {
          "text": "كَلَّا ۖ بَلْ ۜ رَانَ عَلَىٰ قُلُوبِهِم مَّا كَانُوا۟ يَكْسِبُونَ",
          "value": 0
        },
        {
          "text": "سَيَصْلَىٰ نَارًا ذَاتَ لَهَبٍ",
          "value": 0
        },
        {
          "text": "إِنَّهُمْ كَانُوا۟ لَا يَرْجُونَ حِسَابًا",
          "value": 1
        },
        {
          "text": "فَٱلسَّـٰبِقَـٰتِ سَبْقًا",
          "value": 0
        }
      ]
    },
    // ...
  ],
  "meta": {
    "type": "guessVerseByJuz",
    "select": [
      30
    ],
    "amount": 3
  }
}