https://bugzilla.wikimedia.org/show_bug.cgi?id=57659
Web browser: ---
Bug ID: 57659
Summary: Flow: API module issues
Product: MediaWiki extensions
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Flow
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
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.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l