Labs/Bespin/ServerAPI: Difference between revisions

Line 31: Line 31:
* POST /file/close/[path] to mark the file closed. The server will discard your edit history.  
* POST /file/close/[path] to mark the file closed. The server will discard your edit history.  
* GET /file/listopen/ to list open files for the current user. a JSON dictionary of <tt>{ project: { name: filename,  mode: r|rw } }</tt> will be returned. For example, if subdir1/subdir2/test.py is open read/write, openfiles will return <tt>{ "subdir1": { name: "somedir2/test.py", mode: "rw" } }</tt>
* GET /file/listopen/ to list open files for the current user. a JSON dictionary of <tt>{ project: { name: filename,  mode: r|rw } }</tt> will be returned. For example, if subdir1/subdir2/test.py is open read/write, openfiles will return <tt>{ "subdir1": { name: "somedir2/test.py", mode: "rw" } }</tt>
* GET /preview/at/[path] to retrieve file contents for previewing. The raw file is served up with an appropriate content type, so the browser should be able to view it. Relative links will also work.


== Projects ==
== Projects ==
canmove, Confirmed users, Bureaucrats and Sysops emeriti
1,093

edits