papercloudapp-quiz
v1.0.2
Published
npm papercloudapp quiz creator
Downloads
6
Readme
PaperCloudApp Quiz
This is a quick lightweight library for anyone looking to embed quiz questions into their app.
Installation
Use the package manager npm to install foobar.
npm install papercloudapp-quiz
Usage
const createQuiz = require('papercloudapp-quiz')
# returns 'quiz as []'
const response = await createQuiz(numberOfQuestions, quizCategory, quizDifficulty, quizType);
# returns 'promise'
const quizPromise = createQuiz(numberOfQuestions, quizCategory, quizDifficulty, quizType);
JSON schema
{
results: [
{
category: 'General Knowledge',
type: 'multiple',
difficulty: 'easy',
question: 'What is the shape of the toy invented by Hungarian professor Ernő Rubik?',
correct_answer: 'Cube',
incorrect_answers: [Array]
}
],
statusCode: 200,
status: 'OK'
}