Document API
rdallman opened this issue · 0 comments
There should be comments for most of the expected inputs for the API (all the JSON stuff). If there aren't, it should be easy enough to figure out from the struct within that method what is to be expected. See URL's in server.go for what needs to be documented that we have finished and is to some degree in "staging" to be stable.
Outputs can be determined mostly from the writeErr() and writeSuccess() methods within session.go along with comments for certain functions. Document as if you were parsing. There is a critical step for simply figuring out whether the request was successful or not that should be rather evident, then info can be parsed (if any). Certain methods don't return any information. Maybe we should. Maybe you should figure that out. If you can't determine the output, go write a test and get the output. Most of the methods work (if they're commented out in server.go, they don't work).