-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Will Zeng edited this page Jan 31, 2015
·
2 revisions
Welcome to the Cograph wiki!
Some more than basic information about API routes will be kept here.
/ -> user-index.jade/login -> login.jade/signup -> signup.jade-
/logout ->logs the user out -
/profile -> profile.jadeshows the profile of the logged in user /landing -> landing.jade-
/:userName/ -> profile.jaderenders the profile of userName. This is the fallback route. It redirects to/if no user with that name is found.
-
/new ->creates a new document and redirects to:/:creatorUserName/document/:docId -
/:creatorUserName/document/:docId -> index.jaderenders the specified graphDoc -
/:docId -> index.jaderenders the specified graphDoc
-
/:creatorUserName/document/:docId/view/:viewId -> index.jaderenders the specified graphDoc and view -
/:docId/view/:viewId -> index.jaderenders the specified graphDoc and view -
/:creatorUserName/document/:docId/search/:tag -> index.jaderenders the specified graphDoc with nodes of only the specified tags -
/:docId/search/:tag -> index.jaderenders the specified graphDoc graphDoc with nodes of only the specified tags
-
/mobile/:docId -> mobile.jadefor the specified document
/errors/missingDocument -> errors/missingDocument.jade
This gives an overview of the static API. There's more that we do with sockets only that is not included here.
router.post '/document', documents.createrouter.get '/document/:id', documents.readrouter.get '/document', documents.getAllrouter.put '/document/:id', documents.updaterouter.delete '/document/:id', documents.destroy
router.get '/document/:id/analytics', documents.analyticsrouter.get '/document/:id/fullgraph', documents.fullgraph
router.post '/document/:docId/nodes', nodes.createrouter.get '/document/:docId/nodes/:id', nodes.readrouter.get '/document/:docId/nodes', nodes.getAllrouter.get '/document/:docId/nodes/:id/neighbors/', nodes.getNeighborsrouter.get '/document/:docId/nodes/:id/spokes/', nodes.getSpokesrouter.post '/document/:docId/nodes/:id/get_connections/', nodes.getConnectionsrouter.put '/document/:docId/nodes/:id', nodes.updaterouter.delete '/document/:docId/nodes/:id', nodes.destroy
router.post '/document/:docId/connections', connections.createrouter.get '/document/:docId/connections/:id', connections.readrouter.get '/document/:docId/connections', connections.getAllrouter.put '/document/:docId/connections/:id', connections.updaterouter.delete '/document/:docId/connections/:id', connections.destroy
router.get '/document/:docId/nodes/names', search.getNodeNamesrouter.get '/document/:docId/getNodeByName', search.getNodeByNamerouter.get '/document/:docId/getNodesByTag', search.getNodesByTagrouter.get '/document/:docId/getConnsByName', search.getConnsByNamerouter.get '/document/:docId/tags', search.getTagNames