Skip to content

Instantly share code, notes, and snippets.

@deconstructionalism
Created June 1, 2019 16:10
Show Gist options
  • Save deconstructionalism/3fc763cb636fc0ae526261cfb595bed3 to your computer and use it in GitHub Desktop.
Save deconstructionalism/3fc763cb636fc0ae526261cfb595bed3 to your computer and use it in GitHub Desktop.

COURSE ROUTES

verb route body
GET courses
GET courses/:course_id
CREATE courses { name }
CREATE courses/:course_id/next-version
UPDATE courses/:course_id { name, status }
UPDATE courses/:course_id/move { new_index }
DELETE courses/:course_id

UNIT ROUTES

verb route body
GET units
GET units/:unit_id
CREATE units { name, course_id }
UPDATE units { name }
UPDATE courses/:course_id/move { new_index }
DELETE units/:unit_id

MATERIAL ROUTES

verb route body
GET materials
GET materials/:material_id
CREATE materials { material_type, course_id, name, content }
UPDATE materials/:material_id { name }
DELETE materials/:material_id

NON-GRADABLE (LIST STRUCTURE) MATERIALS ONLY

verb route body
UPDATE materials/:material_id { content }
UPDATE materials/:material_id/move { new_unit_id, new_index }

GRADABLE (GRAPH STRUCTURE) MATERIALS ONLY

verb route body
GET materials/:material_id/nodes
GET materials/:material_id/nodes/:node_id
GET materials/:material_id/nodes/:node_id/graph { reverse }
CREATE materials/:material_id/nodes { name, content }
UPDATE materials/:material_id/nodes/:node_id/pop
UPDATE materials/:material_id/nodes/:node_id/disconnect { disconnectNodeId, type }
UPDATE materials/:material_id/nodes/:node_id/insert { insertNodeId, location }
UPDATE materials/:material_id/nodes/:node_id/connect { connectNodeId, location }
DELETE materials/:material_id/nodes/:node_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment