-
Notifications
You must be signed in to change notification settings - Fork 2
Feature Requirements
/api/v1/quiz/12 The # is the day of class that we're in. Expect 5 random questions from days 1 through ##-1 Output expected:
{
count:5,
results: [
{
question: "How many feet do dogs have?",
answers: [1,2,3,4,5,6],
correctAnswer: 4,
},
...
]
}
models/quiz.js Fetch from guide repo a list of all day folders Fetch /quiz.json from each day's folder
POST /api/vi/code/run Send code from front end, day, filename Run it Save it to the right day's demo folder at GH (ACP) Send back and object with the output POST: { day: 22, filename: 'arraysplit', code: '....' }
GET /api/v1/code/12?name=arraysplit Go to GH for that day, get the "arraysplit.js" from the repo Send back and object: { day: 22, filename: 'arraysplit', code: '....' }
models/code.js constructor(payload) save() "run" do the run thing And send it out to GitHub
fetchOne() gets the specified code from GitHub
/api/v1/roster Give the whole class
{ count: 16, results: [ {} ] }
/api/v1/roster/pairs Give the pairs
{
count: 8,
results: [
[person1,person2],
...
]
}
/api/v1/roster/random Give the pairs { count: 1, results: [ "person" ] }
CRUD ROUTE for the classes /api/v1/classes GET/POST/PUT/DELETE { classCode: '401n5', canvasClassId: '8fds9adsu', githubRepo: 'git@github.com/.../' }