Returns json data definitions and references for an identifier via text or numeric id search.
-
URL
/search?needle=:needle
or/search?id=:id
-
Method:
GET
-
URL Params
Required:
needle=[string]
orid=[integer]
-
Data Params
None
-
Success Response:
- Code: 200
Content:{ defs : [ { file_name: <file_name>, lines: [] } ], refs : [ { file_name: <file_name>, lines: [] } ] }
- Code: 200
-
Error Response:
- Code: 500 Internal Server Error
Content:"Bad search string"
OR
- Code: 500 Internal Server Error
Content:"Bad id: <id>"
- Code: 500 Internal Server Error
-
Sample Call:
$.ajax({ url: "/search?needle=off_t", dataType: "json", type : "GET", success : function(r) { console.log(r); } });
Returns json data for source directory or file.
-
URL
/src/:path/:filename
-
Method:
GET
-
URL Params
None
-
Data Params
None
-
Success Response:
- Code: 200
Content:{ Directory : { path : [], files: [] } }
OR
- Code: 200
Content:{ Source : { path : [], lines: [] } }
- Code: 200
-
Error Response:
- Code: 500 Internal Server Error
Content:io::Error reading or writing path
- Code: 500 Internal Server Error
-
Sample Call:
$.ajax({ url: "/src/src/lib.rs", dataType: "json", type : "GET", success : function(r) { console.log(r); } });
Returns json array of impls for a struct or enum by id.
-
URL
/find?impls=:id
-
Method:
GET
-
URL Params
Required:
impls=[integer]
-
Data Params
None
-
Success Response:
- Code: 200
Content:{ results : [ { file_name : <filename>, lines: [] } ] }
- Code: 200
-
Error Response:
- Code: 500 Internal Server Error
Content:"Unknown argument to find"
OR
- Code: 500 Internal Server Error
Content:"Bad id: <id>"
- Code: 500 Internal Server Error
-
Sample Call:
$.ajax({ url: "/find?impls=8", dataType: "json", type : "GET", success : function(r) { console.log(r); } });