|
| 1 | +require 'sinatra' |
| 2 | + |
| 3 | +set :bind, '0.0.0.0' |
| 4 | + |
| 5 | +get '/api' do |
| 6 | + content_type :json |
| 7 | + { "response_code": 0, |
| 8 | + "results": [ |
| 9 | + {"category":"Animals","type":"multiple","difficulty":"medium","question":"A carnivorous animal eats flesh, what does a nucivorous animal eat?","correct_answer":"Nuts","incorrect_answers":["Nothing","Fruit","Seaweed"]}, |
| 10 | + {"category":"Animals","type":"multiple","difficulty":"easy","question":"The K\u0101k\u0101p\u014d is a large, flightless, nocturnal parrot native to which country?","correct_answer":"New Zealand","incorrect_answers":["South Africa","Australia","Madagascar"]}, |
| 11 | + {"category":"Animals","type":"multiple","difficulty":"medium","question":"Cashmere is the wool from which kind of animal?","correct_answer":"Goat","incorrect_answers":["Sheep","Camel","Llama"]}, |
| 12 | + {"category":"Animals","type":"multiple","difficulty":"easy","question":"How many legs do butterflies have?","correct_answer":"6","incorrect_answers":["2","4","0"]}, |
| 13 | + {"category":"Animals","type":"multiple","difficulty":"hard","question":"What scientific suborder does the family Hyaenidae belong to?","correct_answer":"Feliformia","incorrect_answers":["Haplorhini","Caniformia","Ciconiiformes"]}, |
| 14 | + {"category":"Animals","type":"multiple","difficulty":"hard","question":"How many known living species of hyenas are there?","correct_answer":"4","incorrect_answers":["8","2","6"]}, |
| 15 | + {"category":"Animals","type":"multiple","difficulty":"hard","question":"What is the Gray Wolf's scientific name?","correct_answer":"Canis Lupus","incorrect_answers":["Canis Aureus","Canis Latrans","Canis Lupus Lycaon"]}, |
| 16 | + {"category":"Animals","type":"multiple","difficulty":"medium","question":"Which of these species is not extinct?","correct_answer":"Komodo dragon","incorrect_answers":["Japanese sea lion","Tasmanian tiger","Saudi gazelle"]}, |
| 17 | + {"category":"Animals","type":"multiple","difficulty":"easy","question":"Which class of animals are newts members of?","correct_answer":"Amphibian","incorrect_answers":["Fish","Reptiles","Mammals"]}, |
| 18 | + {"category":"Animals","type":"multiple","difficulty":"medium","question":"What is the fastest animal?","correct_answer":"Peregrine Falcon","incorrect_answers":["Golden Eagle","Cheetah","Horsefly"]} |
| 19 | + ] |
| 20 | + }.to_json |
| 21 | +end |
| 22 | + |
0 commit comments