Core code will need to be changed for both limit and the CLI: 1) limits -- just change the apiBase to check if the $this->getMain()->isInternalMode() is false before checking the limits. That function needs to be created in the ApiMain to return the value of $this->mInternalMode
2) You do not really need a CLIApiMain object - just use the $api = new ApiMain($params); $api->execute(); directly. There probably should be an extra function in main to generate output for a given format in addition to $api->getResultData() : $api->getFormattedResult($format) 3) Sometimes the parameter string is very long. For example when you try to get data for a long list of titles. The command line is not going to be enough. On 7/11/07, Jim Wilson <[EMAIL PROTECTED]> wrote: > In your response to the bug, you mentioned that: > > > It is fairly simple to remove maximum limit checks when processing an > internal > query. > > Can you expand on this? I'm in the process of creating my own cliApi.php - > the meat of which is this: > > ------ > parse_str($argv[0], $params); > $request = new FauxRequest($params); > $processor = new CLIApiMain($request, $wgEnableWriteAPI); > $processor->execute(); > ------ > > I was hoping to extend ApiMain, but because of all the private "modules" and > such, it's non-trivial to simply "override" the limit check. Could you > provide some suggestions on how to easily abolish all checks? Does this > require changing core code? I was hoping it wouldn't - thanks in advance. > > -- Jim > > On 7/11/07, Yuri Astrakhan <[EMAIL PROTECTED]> wrote: > > Sounds like a reasonable request. API can already be used internally - > > http://www.mediawiki.org/wiki/API:Calling_internally , > but it > > currently checks the user limits. > > > > Please file a bug and I will fix it to allow any limit value for > > internal calls (the limits will still be there, just won't be checked > > against the maximum allowed). > > > > On 7/11/07, Jim Wilson < [EMAIL PROTECTED]> wrote: > > > Hi all, > > > > > > I'd really like to see a CLI version of the api.php that doesn't have > any > > > limits on volume of output (since it's CLI, it's assumed to be trusted). > > > > > > This would be incredibly useful for various types of dumps and > statistics > > > gathering. Your thoughts? > > > > > > -- Jim R. Wilson (jimbojw) > > > > > > _______________________________________________ > > > Mediawiki-api mailing list > > > [email protected] > > > > http://lists.wikimedia.org/mailman/listinfo/mediawiki-api > > > > > > > > > > _______________________________________________ Mediawiki-api mailing list [email protected] http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
