jadeocr docs
Class
Class
The jadeocr class API handles teachers, students, assignments, and other functions to make jadeocr easier to use in the classroom.
Create Class (teachers only)
Request
This section is not finished yet.
Response
This section is not finished yet.
Delete Class (teachers only)
Request
Send a POST request to https://api.jadeocr.com/api/class/remove
with the
following body:
Key | Example Value |
---|---|
classCode | 123456 |
Response
If the requester is the teacher of the class, the server will send a 200
status code response. Otherwise, it will send an error message in the response.
Assign Decks (teachers only)
Request
Send a POST request to https://api.jadeocr.com/api/class/assign
with the
following body. Make sure to read the following table carefully:
Key | Example Value | Description | Accepted Values | Default | Required | Notes |
---|---|---|---|---|---|---|
classCode | 123456 | 6-digit class code | true | |||
deckId | "5fd8251c8149c1516f92345a" | Unique deck ID to assign | true | |||
mode | "learn" | Review mode to assign students | "learn", "srs", "quiz" | true | ||
handwriting | true | Enable handwriting | true, false | false | false | Value is ignored if the mode is "quiz" |
front | "pinyin" | Which value to show on the front of cards | "character", "pinyin", "definition", "handwriting" | true | Cannot be "handwriting" if the mode is "quiz" | |
scramble | true | Scramble the order of cards | true, false | false | false | Only send this value if the mode is "learn"; doing otherwise may result in errors |
repetitions | 3 | Number of reviews to assign | 1 | false | ||
dueDate | 1609719690223 | UNIX epoch time in ms | true |
Response
This section is not finished yet.
Unassign Decks (teachers only)
Send a POST request to https://api.jadeocr.com/api/class/unassign
with the
following body. The assignmentId
is the value that comes from getting the
assignments from a class as a teacher.
Key | Example Value |
---|---|
classCode | 123456 |
deckId | "5fd8251c8149c1516f92345a" |
assignmentId | "602c74041ed11d2047853448" |
Join Class (students only)
Request
Send a POST request to https://api.jadeocr.com/api/class/join
with the
following body:
Key | Example Value |
---|---|
classCode | 123456 |
Response
If the class exists, and student is not already in the class, the server will
send a 200
status code response. Otherwise, you will receive a 400
with an
error message.
Leave Class (students only)
Request
Send a POST request to https://api.jadeocr.com/api/class/leave
with the
following body:
Key | Example Value |
---|---|
classCode | 123456 |
Response
If the class exists, and the requester is a student of that class, the server
will send a 200
response. Otherwise, the server will send an error message in
the response.
Submit reviewed deck (students only)
Request
Send a POST request to https://api.jadeocr.com/api/class/TO_BE_DETERMINED
with the
following body. Make sure to read the following table carefully. All values
are required.
Key | Example Value | Description | Accepted Values | Notes |
---|---|---|---|---|
classCode | 123456 | 6-digit class code | ||
deckId | "5fd8251c8149c1516f92345a" | Unique deck ID to assign | ||
mode | "learn" | Review mode to assign students | "learn", "srs", "quiz" | |
quizResults | myQuizResults | An object with the quiz results, see Deck API for examples | Only needed if mode is "quiz" |
Response
This section is not finished yet.
Note: Client development
When students review, make one call to this route to add the data to the class, then make another call using the Deck API to add the results to the student's personal stats.
Edit this page on GitHub