When working with this API developers shall have the ability to CREATE
, READ
, UPDATE
, and DELETE
, Topics, Quizzes, Questions with answers.
This will allow their users to the endpoints: GET
& POST
and the developers to PUT
& DELETE
.
This form will send its data to a path that resolves to the /quizzes/create action. The path for this link will follow the standard nested RESTful convention
/<<PARENT RESOURCE PLURAL>>/<<PARENT ID>>/<<MIDDLE RESOURCE PLURAL>>/<<MIDDLE ID>>/<<CHILD PLURAL>>/<<CHILD ID>>
i.e topics/:Cities/quizzes/:San-Francisco/questions/:1-10
Send a request to /
to render the index and get the following response:
Welcome to my Custom API for Quizzes
This is just the index
Send a request to /about
to get the following response:
{
message: 'This was design to be a functioning Quiz API!'
}
Send a GET request to /topics/
to get a list of all topics. The data should look like:
[
{
_id: 5e5ae438df263c3123996d59,
title: 'Cities',
quizzes: [],
}
{
_id: ,
title: 'Board-Games',
quizzes: [],
}
]
Send a GET request to /topics/:title
to get the details of a specific topic. The data should look like:
{
_id: 5e5ae438df263c3123996d59,
title: 'Cities',
quizzes: [],
}
Send a POST request to /topics/new
with the following information:
title: string,
Send a PUT request to /topics/
with the following information:
title: string,
Send a DELETE request to /topics/:title
Send a GET request to /quizzes/
to get a list of all quizzes. The data should look like:
[
{
_id: 5e5b0205410f30432c22e257,
name: 'San-Francisco',
questions: ['How Many Boroughs Does SF Have?', 'What State is SF in?'],
}
{
_id: ,
name: 'Monopoly',
questions: [],
}
]
Send a GET request to /quizzes/:name
to get the details of a specific quiz. The data should look like:
{
_id: 5e5b0205410f30432c22e257,
name: 'San-Francisco',
questions: ['How Many Boroughs Does SF Have?', 'What State is SF in?'],
}
Send a POST request to /quizzes/new
with the following information:
name: string,
Send a PUT request to /quizzes/:name
with the following information:
name: string,
Send a DELETE request to /quizzes/:name
Send a GET request to /questions/
to get a list of all quizzes. The data should look like:
[
{
myid: 1
question: 'How Many Boroughs Does SF Have?',
answers: [5, 7, 30, 37],
answers_given: [],
corrects: [37],
}
{
myid: 1
question: 'What State is SF in?',
answers: ['Washington', 'California', 'New York'],
answers_given: [],
corrects: ['California'],
}
{
myid: 3,
title: 'How Many Properties Does The Monopoly Game Have?',
answers: [2, 4, 22, 28, 40],
answers_given: [],
corrects: [28],
}
]
Send a GET request to /questions/ID_GOES_HERE
to get the details of a specific quiz. The data should look like:
{
myid: 1
question: 'How Many Boroughs Does SF Have?',
answers: [5, 7, 30, 37],
answers_given: [],
corrects: [37],
}
Send a POST request to /questions/
with the following information:
question: string,
answers: [],
corrects: [],
Send a PUT request to `/questions/ID_GOES_HERE`` with the following information:
question: string,
answers: [],
corrects: [],
Send a DELETE request to /questions/ID_GOES_HERE