| Description | Endpoint |
|---|---|
| Sign-up | POST /api/auth/create-account/ |
| Sign-in | POST /api/auth/sign-in/ |
| Verify User | GET /api/auth/verify/ |
| Sign-out User | GET /api/auth/sign-out |
| Get all Decks | GET /api/decks/ |
| Get a Card | POST /api/card/ |
| Create a Play | POST /api/play/ |
| Get a user's deck progress | POST /api/progress |
Fetches all decks in the database
[
{
"_id": "575462759373c5503b4afcfc",
"updatedAt": "2016-06-05T17:33:41.390Z",
"createdAt": "2016-06-05T17:33:41.390Z",
"name": "Deck 1"
},
{
"_id": "575462759373c5503b4afcfd",
"updatedAt": "2016-06-05T17:33:41.390Z",
"createdAt": "2016-06-05T17:33:41.390Z",
"name": "Deck 2"
}
]Returns the next card to study.
{
"deckId": "575462759373c5503b4afcfc",
"userId": "575462759373c5503b4afcfa"
}{
"_id": "575462759373c5503b4afcfe",
"deckId": "575462759373c5503b4afcfc",
"question": {
"text": "What is 3 + 3"
},
"answer": {
"text": "6",
"explanation": "Basic addition"
}
}Saves a play.
{
"userId": "575462759373c5503b4afcfa",
"deckId": "575462759373c5503b4afcfc",
"cardId": "575462759373c5503b4afcfe",
"side": 1,
"rating": -1
}This response is not used by the application.
{
"_id": "575462759373c5503b4afd10",
"userId": "575462759373c5503b4afcfa",
"deckId": "575462759373c5503b4afcfc",
"cardId": "575462759373c5503b4afcfe",
"side": 1,
"rating": -1
}```
## `POST /api/progress`
Retrieves the percentage of cards in a deck that have been studied by a user.
### Example Request
```json
{
"deckId": "575462759373c5503b4afcfc",
}"70%"