Countries

Countries module allows you to generate quizes such as guess the capital or guess the country from an image of the flag. It is a simple and useful module for creating applications to test and practice knowledge of all countries.

Generating capital quiz

Guess capital

GET https://shadify.yurace.pro/api/countries/capital-quiz
ParameterDescription
variantsOptional

A number from 2 to 6 corresponding to the number of different options from which you have to choose the correct capital of the given country.

The default value is 4.
amountOptional

A number from 1 to 20 which is responsible for the number of quizzes returned. The use of this parameter ensures that among all quizzes received, all will be unique.

The default value is 1.

Returned response:

{
    "country": "Cyprus",
    "flag": "https://flagcdn.com/w320/cy.png",
    "variants": ["Nicosia", "Juba", "Oslo", "Jamestown"],
    "answer": "Nicosia"
}
  • country - the country for which you must guess the capital.
  • flag - country's flag image (it powered by Flagpedia API, so you can customize it).
  • variants - possible options for answering.
  • answer - correct answer.

Generating country quiz

Guess country

GET https://shadify.yurace.pro/api/countries/country-quiz
ParameterDescription
variantsOptional

A number from 2 to 6 corresponding to the number of different options from which you have to choose the correct country of the given flag image.

The default value is 4.
amountOptional

A number from 1 to 20 which is responsible for the number of quizzes returned. The use of this parameter ensures that among all quizzes received, all will be unique.

The default value is 1.

Returned response:

{
    "flag": "https://flagcdn.com/w320/dk.png",
    "variants": ["Yemen", "Denmark", "Norfolk Island", "Vietnam"],
    "answer": "Denmark"
}

flag - the flag of the country you have to guess.
variants - possible options for answering.
answer - correct answer.