For action=flow:
- The "flowaction" parameter lacks a description.
- The "page" parameter lacks a description.
- The "flowaction" parameter does not list available actions.
- The "params" parameter is poorly documented. Passing a json blob of "params" is rather awful. I might rather see a setup where "flowaction" selects a submodule, along the lines of how action=query works, so these parameters could actually be documented in api.php.
- getExamples() should be properly implemented.
- getHelpUrls() should be implemented.
- I'm assuming at least some of the possible flowactions are write actions. isWriteMode() should therefore return true.
- I note that ApiBase is already a ContextSource, so there is no need for $this->getContext()->getUser() instead of just $this->getUser().
- I see you're setting "_element" directly. Use ApiResult's method to handle that instead, please. The same goes if you're setting "*" directly anywhere.
- I see that sometimes the "result" element in the result will be an associative array and sometimes it will be the string "error". I'd rather see a "status" element of some sort that is always a string and have "result" always be an associative array when it is present.
- I see you have a "doRenderer" protected method that is never actually called.
For list=flow:
- The link returned by getHelpUrls() does not actually document this API module.
- The "flowaction" parameter does not list available actions.
- Same criticisms of the "params" blob as above.
- You are setting "_element" directly instead of using ApiResult's methods.
- You should be checking the return from ApiResult's addValue method and properly handling failure.
Version: master
Severity: normal