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:

KeyExample Value
classCode123456

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:

KeyExample ValueDescriptionAccepted ValuesDefaultRequiredNotes
classCode1234566-digit class codetrue
deckId"5fd8251c8149c1516f92345a"Unique deck ID to assigntrue
mode"learn"Review mode to assign students"learn", "srs", "quiz"true
handwritingtrueEnable handwritingtrue, falsefalsefalseValue is ignored if the mode is "quiz"
front"pinyin"Which value to show on the front of cards"character", "pinyin", "definition", "handwriting"trueCannot be "handwriting" if the mode is "quiz"
scrambletrueScramble the order of cardstrue, falsefalsefalseOnly send this value if the mode is "learn"; doing otherwise may result in errors
repetitions3Number of reviews to assign1false
dueDate1609719690223UNIX epoch time in mstrue

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.

KeyExample Value
classCode123456
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:

KeyExample Value
classCode123456

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:

KeyExample Value
classCode123456

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.

KeyExample ValueDescriptionAccepted ValuesNotes
classCode1234566-digit class code
deckId"5fd8251c8149c1516f92345a"Unique deck ID to assign
mode"learn"Review mode to assign students"learn", "srs", "quiz"
quizResultsmyQuizResultsAn object with the quiz results, see Deck API for examplesOnly 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